Split DNS (I know, I know)…
-
Ok,
Lots of info on split dns using multiple hosts, what I'm having trouble with is single host with multiple ports.
1 server running multiple hosted apps accessed over a web interface via different port numbers:
Ex. 192.168.0.1:3342, 192.168.0.1:3343, 192.168.0.1:3344, etc..
I have a DYNDNS host call it example.us, and each app is accessed (either over browser or by client app) one of two ways:
home.example.us:3342 or appname.example.us (translates to ip:port)
home.example.us:3343 or appname2.example.us (translates to ip:port)
home.example.us:3344 or appname3.example.us (translates to ip:port)Designating port numbers usually always works with different client access software, where the sub-domains are inconsistent (I'd like to get both working internally). The client apps are installed on laptops that move around from inside the network to outside the network. I want to set them up to point to the dyn address(es) and stop having to change that dyn variabe in each app to the local IP when they come inside the network.
It seems the trouble is the port designation, whether it be a setting in an app or queried manually in a browser. PFsense doesn't like the port designation (:xxxx) at the end.
How do I solve this?
Thank you for any insight. From all I've read I know this may seem redundant, but I just haven't found anything in the searched that matches what I'm doing.
-Colter
-
Huh? The only way to do a port number in DNS that I know if is with a SRV record. Only certain protocols support looking up SRV records. Jabber is one. I don't think HTTP/HTTPS do. Not in any standard way anyway.
I don't think dyn is doing what you think they're doing in DNS. What they are probably doing is running a forwarder that takes connections to appname2.example.us and redirects the user to home.example.us:3343. Does the location in your browser change?
-
You need reverse proxy, not DynDNS.
-
-
dns has nothing do do with ports. You can have multiple records point to your IP, but the port aspect would be done on the client not in dns.
If you want to use fqdn resolution to get to different things behind pfsense then reserve proxy would be the way to do it.
-
Yeah, I've read a little on the reverse proxy setup (I'm not a novice but to say I'm beyond, ohhh.. 3rd grade would be a stretch) and it looks daunting.
What has been working is the dynaddress(WANIP) + :portnumber. Works flawlessly, but when the client is inside the network it obviously breaks as PFS doesn't like the WAN IP request coming from inside the LAN.
Does anyone have a guide or tutorial that explains reverse proxy in a simple manner. I catch on quickly, its the time I have to spend on this that keeps it from being implemented….
Thank you for the responses. I really appreciate y'all taking the time to help.
-Colter
-
All you need is host overrides in pfSense pointing the hostnames to the correct INTERNAL IP address. Then hostname:port will work fine.
-
Yeah split dns is how your resolve this problem
So you have xyz.publicdomainname.tld that resolves to pubicIP on the outside.. You then internally resolve xyz.publiddomainname.tld to your local rfc1918 – problem solved.
So your client is outside he resolves the public IP and uses his :port, while internally he resolves priviateip and still uses his port.
edit: What Derelict stated ;)
-
Ok, so I have done this and it's behaving oddly.
When I designate a port number:
home.example.us:xxxx
I get nothing, just a timeout.
When I type just the address without the port it brings up the pfsense box login (10.0.1.1). It seems to me that if I just type in the address is should at least point to the host's designated ip (10.0.1.5) and show the NAS box login.
The host is setup according to the pfesense documentation in the DNS Forwarder.
This is the issue I was having before.
-
Do you have multiple local interfaces and subnets? You need proper firewall rules if so.
-
It's an APU with a very simple setup:
1 WAN (re0)
1 LAN (bridged over re1, re2) with a Ubiquity WAP plugged into re2 and the NAS into re1. The rest of the house is wifi. -
Well, something is keeping the traffic from getting to the host. Check your firewall logs.
-
I have, checked both and nothing looks to be tied to what I'm trying to do. The firewall logs show literally hundreds of the entry shown in the attached screenshot.
![Screen Shot 2015-02-09 at 6.28.43 PM.png](/public/imported_attachments/1/Screen Shot 2015-02-09 at 6.28.43 PM.png)
![Screen Shot 2015-02-09 at 6.28.43 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2015-02-09 at 6.28.43 PM.png_thumb) -
That's DHCP on WAN. Unfortunate but completely unrelated to your problem.
-
Yeah, figured that out just before I read your comment.
So, I have DNS Forwarded on with:
"Register DHCP leases in DNS forwarder" Checked
"Register DHCP static mappings in DNS forwarder" CheckedThe host override for the dyn address is configured.
DNS in general settings is listed as follows (to be pushed to clients)
1. 10.0.1.1
2. 8.8.4.4
3. 156.154.71.1The macbook is not configured for it's own DNS it's only pulling from pf dhcp (so when you open that settings box DNS reflects the 10.0.1.1).
When I type the domain home.example.us into the browser is pulls up the pfsense web GUI (10.0.1.1). To me it should pull up 10.0.1.5 as the forwarder is configured to do so.
Ran a traceroute:
Traceroute has started… traceroute to home.example.us (184.167.179.204), 64 hops max, 72 byte packets 1 host-184-167-179-215.csp-wy.client.bresnan.net (184.167.179.215) 3.954 ms 1.046 ms 1.163 ms
So, it would seem that the DNS on PF is not doing it's job as this should come back with the box redirecting this host to a 10.0.1.5. No?
Firewall logs are clean and nothing shows the activity.
What I think is happening is PF is passing the host along to the DYN service which is then boomeranging the browser back to the WAN IP, hence the PF web GUI when I type it in.PF Doesn't respond to port 80 on the WAN.When I add ports is just hangs as always, but I think it logical to conclude that the PF box is not redirecting the host as it should?
-Colter
-
Redirecting what?? Are you really uisng home.example.com???
dude from a cmd line if you ping home.example.com and it doesn't return the private IP you put in the over ride then you did it WRONG!!!
This not freaking brain surgery here!!
I like to help people but sometimes I just am at complete loss for words how simple this is!! If its not working - is your client even using pfsense for dns?? Did you put your over ride in the forwarder section and your using the resolver "unbound" ?
-
You cannot push DNS servers to clients that will return different answers to the same queries and expect things to work. You can leave the pfSense DNS servers alone (Though I have no idea why you have 10.0.1.1 listed there. It should probably be removed.)
In your DHCP settings, tell the server to push the IP address of pfSense to your clients - usually the same IP as the default gateway. Nothing else. If you want two internal DNS servers, then you have to configure another one that will return the same answers to the same queries.
-
johnpoz:
No, no I am not. I replaced my DYN address with example.us for my own comfort reasons.
While I appreciate your input, try not to be rude to me. Humbly, I'm actually a very smart person and it's worth noting that I have felt frustrations with others when I find their problems elementary/minuscule in nature; but try to not degrade people.
I understand that there is a problem within the settings. What I can't find is where that error is as even everything you stated I have gone over and have a full understanding of.
If you read the last post I wrote you will see that I covered the part about ensuring my client (macbook) is using pfsense as it's primary DNS server, and the forwarder is setup with the host I am attempting to intercept.
I would say the only part about what you've stated that I don't connect to is this "unbound" terminology. I haven't seen that referenced in the literature I've read so far.
It's easy to be smart, it's harder to be kind. Especially when it's text on a screen with a shade of anonymity.
Thank you for your insights, I do appreciate what was constructive. :)
Derelict:
Thank you. I'll make the edits. I put the 10.0 in the list to just ensure the clients where getting the pfsense box as the first source (another member thought it worth the test). I'll fiddle with DHCP to ensure clients are getting the proper DNS.
-
If you read the last post I wrote you will see that I covered the part about ensuring my client (macbook) is using pfsense as it's primary DNS server, and the forwarder is setup with the host I am attempting to intercept.
There is no "interception" involved. When an internal host asks for the IP address of server1.example.com, it should get the internal address in response.
When an external host asks the global DNS for the IP address of server1.example.com, it should get the external address.
It's really that simple. Drop-dead easy with host overrides in pfSense's DNS Forwarder or DNS Resolver.
-
Ok, got that, poorly expressed on my part, but I understand that premise.
I did an NS lookup and this is what I get from the mac:
Samuels-MBP:~ Colter$ nslookup > home.example.us Server: 10.0.1.1 Address: 10.0.1.1#53 Non-authoritative answer: Name: home.example.us Address: 184.167.179.215
I checked and double checked that DNS is properly set on the mac to the PFsense box. The forwarder is on and configured to the exact point of the PF documentation with the host and everything as specified.