PfSense mantains DNS Record for Interface IP
I hope you won't be mad at me that my first post is a try to get some support ;)
I've got the following problem:
I have a pfSense Box with multiple LAN-Interfaces, each having a static IPv4 Address to serve as a gateway. Also, the DNS Resolver is active.
The box is called gw.foo.bar, and somehow it mantains an A-Record for that with the IP of one of the Interfaces. But I don't see the option to either turn this off or how to choose, from which Interface pfSense should choose the IP as the A-Record's Value.
Maybe someone knows about this? Any help would be appreciated.
so you have lan, opt1, optX, etc..
and when you query for gw.foo.bar what do you get back? the lan ip or opt1, optx?
So what I have done is create new records in the overrides for the different interfaces.. So for example my dmz interface is pfsense.dmz.local.lan, and so on - see attached.
Hi, thankx for the hint, that's how i initially wanted to work around this.
I have the following interfaces:
wan - …
adminport - 192.168.16.1
lan - 172.16.1.1
and some interfaces for VLANs
pfsense has the hostname gw.foo.bar (well, not really, but I have to do some censorship because the setup is in my company ^^')
In the DNS Resolver I have a Host override:
- gw.foo.bar - 172.16.1.1
And when resolve gw.foo.bar from pfsense or from a client I get the two IPs from the DNS record and from the interface.
![Screen Shot 2016-01-20 at 13.58.31.png](/public/imported_attachments/1/Screen Shot 2016-01-20 at 13.58.31.png)
![Screen Shot 2016-01-20 at 13.58.31.png_thumb](/public/imported_attachments/1/Screen Shot 2016-01-20 at 13.58.31.png_thumb)
![Screen Shot 2016-01-20 at 14.02.18.png](/public/imported_attachments/1/Screen Shot 2016-01-20 at 14.02.18.png)
![Screen Shot 2016-01-20 at 14.02.18.png_thumb](/public/imported_attachments/1/Screen Shot 2016-01-20 at 14.02.18.png_thumb)
well yeah.. you need to create a subdomain like I did..
so gw.sub.foo.bar, gw.othersub.foo.bar, etc.. for your other interfaces.
Hey thanks very much for that solution.
But how do I tell pfSense which Interface-IP to use as its own Hostname A-Record? Just wondering what pfSense's logic is to determine which IP to use.
In my Home-Setup I have no problems with that, but I guess that's due to the fact I only have one LAN IP there…
Because it's a requirement that for the DNS-Lookup on gw.foo.bar we get 172.16.1.1...
Regards and thx again