The pfSense Store

Author Topic: IPv4 DNS servers...  (Read 1219 times)

0 Members and 1 Guest are viewing this topic.

Offline rcfa

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +0/-0
    • View Profile
IPv4 DNS servers...
« on: May 22, 2012, 06:05:02 pm »
Here's another problem:

If my WAN interface  In System:Gatways there's always a WAN_DHCP6 gateway is configured for Static IPv4 and DHCP6, then I seemingly can't set IPv4 DNS server entries. If I try, this is what I get:

Code: [Select]
The following input errors were detected:

    The gateway specified for DNS server '8.8.8.8' is not from the same Address Family as gateway ''.
    The gateway specified for DNS server '8.8.4.4' is not from the same Address Family as gateway ''

I'd understand this error if the interface were ONLY configured for DHCP6, but why can't I set an IPv4 DNS server on an interface that offers IPv4 traffic???

Heck, even after I set the IPv6 configuration of the WAN interface to "none" and turn off IPv6 in System:Advanced:Networking by unchecking the "Allow IPv6" box, I still get this...
« Last Edit: May 22, 2012, 06:09:42 pm by rcfa »

Offline rcfa

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +0/-0
    • View Profile
Re: IPv4 DNS servers...
« Reply #1 on: May 22, 2012, 06:12:54 pm »
Uhm, insert foot in mouth, kind of...
...for some reason the Static IPv4 configuration of the WAN interface didn't have the default gatway selected, but "NONE".

Still, the error message is rather misleading. It's not really the wrong address family, it's a WAN interface that's not associated with a gateway. If there's a way to fix that error message, that might help put people on the right track should someone end up in a similar state.

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • Karma: +0/-0
  • It just might be your luck day, if you only knew.
    • View Profile
Re: IPv4 DNS servers...
« Reply #2 on: May 23, 2012, 03:38:40 am »
I can probably reword that message,  "I can't find a IPv4 gateway for 8.8.8.8 "

Offline rcfa

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +0/-0
    • View Profile
Re: IPv4 DNS servers...
« Reply #3 on: May 23, 2012, 12:00:32 pm »
I can probably reword that message,  "I can't find a IPv4 gateway for 8.8.8.8 "

I think that would be much more expressive. There can be many different reason for not being able to find a gateway, but at least that steers in the proper direction, so I think that would be a good change to make.

Offline rcfa

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +0/-0
    • View Profile
Re: IPv4 DNS servers...
« Reply #4 on: May 25, 2012, 03:24:45 pm »
Looks like some work was done on this, if I interpret the code properly:

https://github.com/bsdperimeter/pfsense/commit/020ba5fe8f190954acc8eaa37746fbf88bd5db73

But, while it has nicer wording for the case where the wrong type of gateway address family is active, I still don't see anything for the case where the gateway is plain missing, like was the case here.
Even the new messages will be misleading, if the cause isn't that the gateway is of the wrong type, but if it's just plain not there. Or have there been other changes made elsewhere that cover that case?

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • Karma: +0/-0
  • It just might be your luck day, if you only knew.
    • View Profile
Re: IPv4 DNS servers...
« Reply #5 on: May 25, 2012, 03:26:06 pm »
oh right, lossy memory and a beer later.

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • Karma: +0/-0
  • It just might be your luck day, if you only knew.
    • View Profile
Re: IPv4 DNS servers...
« Reply #6 on: May 25, 2012, 03:29:35 pm »
*ding*

Offline rcfa

  • Sr. Member
  • ****
  • Posts: 565
  • Karma: +0/-0
    • View Profile
Re: IPv4 DNS servers...
« Reply #7 on: May 25, 2012, 03:49:51 pm »
Cool! Thanks!

Would it make sense to have an alert that no valid gateway is given?
I mean, it could be that these are internal/local DNS servers that don't need a gateway, but it could also prevent needle-in-haystack searches...

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • Karma: +0/-0
  • It just might be your luck day, if you only knew.
    • View Profile
Re: IPv4 DNS servers...
« Reply #8 on: May 26, 2012, 04:26:12 am »
if no gateway is given, the choice is "none" which is valid.

if you have just a single gateway, this value is nill