Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense mantains DNS Record for Interface IP

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      clippy
      last edited by

      Hi Everyone

      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.

      /clippy

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        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.

        multiinterfaces.png
        multiinterfaces.png_thumb

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • C
          clippy
          last edited by

          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)

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            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.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • C
              clippy
              last edited by

              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
              /clippy

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.