Assigning IP addresses to hostnames?
harisund last edited by
I own harisund.com (not my real domain name). I have 2 A records, laptop1.harisund.com and laptop2.harisund.com. Both of them resolve to my WAN address / home IP address.
Now, at home, I have laptop1 assigned a static DHCP address (based on its MAC) of 192.168.56.20 and laptop2 assigned a static DHCP address (based on its MAC) of 192.168.56.30 in my 192.168.56.0/24 home LAN.
Laptop1 runs a SSH server on port 22, Laptop2 runs some other service on port 44. My idea is that I should be able to access the 2 services whether I am inside my home or outside using the same name.
From outside my home, laptop1.harisund.com:22 correctly resolves to my pfSense, which has a port forward setup to 192.168.56.20 (laptop1) on port 22. Similarly, laptop2.harisund.com:44 correctly resolves to my pfSense, which has a port forward setup to 192.168.56.30 (laptop2) on port 44. Everything works cleanly from outside my LAN.
Now, inside my LAN, how do I make pfSense resolve laptop1.harisund.com to 192.168.56.20 and laptop2.harisund.com to 192.168.56.30? I don't want to change the resolution of harisund.com, since I want harisund.com to go to my web hosting elsewhere. I just want to override the "laptop1.harisund.com" and "laptpo2.harisund.com" addresses. Technically I can do so by editing the hosts file of all my machines at home, but I am sure pfSense offers a way to do it?
Also, for the record, I used to do this on my dd-wrt by adding this line -
to my dnsmasq additional options. Is there something like that? Do I need to edit a conf file somewhere (I am comfortable doing that too by the way)
doktornotor Banned last edited by
Yeah, it's extremely well hidden in the DNS Resolver or DNS Forwarder GUI (Host Overrides)… ::)