Static IPv4 and IPv6 address for the same hostname



  • 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


  • Rebel Alliance Developer Netgate

    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.



  • 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



  • 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.



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

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



  • 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.


  • Rebel Alliance Developer Netgate

    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.