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

    Static IPv4 and IPv6 address for the same hostname

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    7 Posts 4 Posters 1.7k 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.
    • S
      synapxe
      last edited by

      Hi,

      With 2.3.*, I've been able to enter a static IPv4 and a separate IPv6 address for the same hostname and can connect from new devices (v6 compatible) through IPv6 and older ones (v4 only) through IPv4 to that hostname.  Everything has been working fine – it would have been nice to have an option to have a single hostname entry (for either the resolver or forwarder) allow for a IPv4 and IPv6 address rather than managing two entries separately...

      I just tried the 2.4 Beta and for both the forwarder and resolver, I'm blocked from having two entries for the same host name.  I had a hard time going and deleting the second entry for exiting cases where I had a v4 and v6 entry for the same hostname...  Seems like the interface error checking was blocking things.

      Am I doing it wrong?  Is there a better way to create a static v4 and v6 entry for the same hostname?  It did seem to work okay with the 2.3 series.

      Thank all the ideas.

      -- S

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I just tried on 2.4 with the DNS Resolver and it worked OK.

        The overlap checks tests the address and only denies an overlap if the IP address type is the same on both entries. At least that's the intent.

        So if you add test.example.com with 1.2.3.4, and then test.example.com with fe80::1:2:3:4 it works, but if the second entry was for another IPv4 address that would fail.

        If you can make it fail we'll need to see the exact inputs (no masking/obfuscation) and the exact error message.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • S
          synapxe
          last edited by

          Hi,

          It appears that creating two new entries, one for v4 and one for v6 works fine (I tried in the forwarder).  What I seem to have encountered is that if I need to go and modify either one of them two addresses I just added, then I'm blocked.

          From your example, if you go back to either of the two entries (v4 or v6) for test.example.com you created, try to change the 4 to a 5 and then save.  I get the message "The following input errors were detected: This host/domain already exists".

          Hope this make sense.

          Thanks for your assistance and thoughts about this.

          – S

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            In 2.4 there seems to be a general bug with editing existing Host Overrides and changing the IP address - regardless of having 2 entries with IPv4 and IPv6 addresses. I raised Redmine issue:
            https://redmine.pfsense.org/issues/7435

            I am happy to have a look.

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • luckman212L
              luckman212 LAYER 8
              last edited by

              I think that may be one of the things that I fixed in this PR…

              https://github.com/pfsense/pfsense/pull/3599

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                I fixed it in PR https://github.com/pfsense/pfsense/pull/3678

                I found more places with this similar style of bug. A revised fix is in PR https://github.com/pfsense/pfsense/pull/3679
                It fixes the Edit-Save sequence in:
                DNS Forwarder/Resolver Host Override
                DNS Forwarder Domain Override
                Captive Portal Voucher Rolls

                Someone else can give that a spin to make sure I fixed it.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  I managed to reproduce that problem late yesterday but left myself a note to revisit it this morning to see what was going on. Figured it had to be something like the ID issue here or similar to https://redmine.pfsense.org/issues/7394

                  I merged the PR so it'll be in the next round of snapshots. Hopefully there aren't any more of these lurking around.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

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