Created second Lan, but machines can't communicate between networks.
-
@johnpoz said in Created second Lan, but machines can't communicate between networks.:
None of that is required - he could just be using some dyndns?
Correct, but if he own this we could use it. So i ask for the best and if he havent that we can make it with some dyndns stuff.
-
@bepo Yes, I own a domain with DNS records pointing to the public IP for the server on Lan2. What would I need to do?
-
@bepo So, I went to DNS resolver and selected host overrides. Under 'host' I put the hostname displayed for hostname in the DHCP static mapping page. For domain I entered mydomain.com, and I entered the local address of the server as the 'IP to return to host'. That hasn't worked though, so was I on the right path or should I delete that host override?
-
@johnpoz Sorry, a lot of what I've said isn't very clear! My phone/web client try to access the server I have on Lan2 by using my domain name - example.com (I have public DNS records pointing to the public IP address for that server). PFSense obviously doesn't seem to like allowing something through the firewall that comes straight back to it, the question is what the method for me solving that is, and how to do that in PFsense.
-
@asfsfreh if your public domain is example.com, create a host override in your dns config and point example.com to your internal lan2 ip address.
From Internet example.com should resolve to your public ip.
From any pfsense network example.com should resolve to your internal LAN2 server ip. -
@bepo I've done that, but it isn't working. I ran traceroute to mydomain.com but it is only showing the public ip address, and I still can't log in to the server from Lan. Does anything need to be added/checked under 'DNS server settings' in general setup? At the moment that section is blank.
-
I would assume its something.example.com and not just example.com
But just create a record like this..
Now if your client points to pfsense it should resolve to that... Make sure you put it in the right place if your using the forwarder on pfsense you put it there, default is resolver (unbound) and you would put it there.
If your client is not using pfsense for dns - then you would have to use the redirect method.
if really is just example.com then the host would be example and the domain would just be com
query to validate
Clearly you would use your own local IP ;) I shouldn't have to say that - but you would be surprised! ;)
-
@asfsfreh please provide a screenshot of your dns config.
And maybe there is a dns cache on your device. Try to reboot your client. -
Or just flush the cache on your local device - but hard on phone.. Normally you would have to cycle the wifi connection. But its possible his app or phone is using public dns.. Which is why I brought up the whole redirecting dns thing.
-
@johnpoz in /etc/resolv/conf on my client my nameserver is listed as pfsense (192.168.1.1). Here's a screenshot of what I did, with my real domain replaced for the screenshot:
And here is what the DNS resolver page looks like. Shouldn't this work?
-
Your setting looks good on my first view.
Did you flushed your dns cache as recommended by @johnpoz? -
@bepo Yes, flushed cache but no change.
-
Maybe you can do some troubleshooting with nslookup. It helps to determine if the dns server knows the correct ip.