Bug #6946
closedUnable to override dns servers in dhcp server
0%
Description
Trying to provide specific DNS servers for specific optX network. No matter what I set the dns server fields to, the firewall itself is always the first dns entry in the dhcp configuration.
For example, If the firewall IP is 192.168.1.1 and I set the DNS servers to 8.8.8.8 and 8.8.4.4 in the dhcp server configuration, the clients DNS is set to 192.168.1.1, 8.8.8.8, 8.8.4.4. I don't allow this network to access and RFC1918 networks so this is a problem. I have tried every configuration trick I can and I have concluded this is a bug because I can't make the pfsense not set the first dns server to itself in a dhcp distribution.
Thanks
Updated by Phillip Davis over 8 years ago
What appears in /var/dhcpd/etc/dhcpd.conf ?
When I put specific DNS servers in there, I get a line like:
option domain-name-servers 8.8.8.8,8.8.4.4;
Does that line have the firewall IP also?
Or does it look good, but dhcpd is still delivering the firewall IP to the client as a DNS server?
Updated by Jim Pingle over 8 years ago
- Status changed from New to Not a Bug
Most likely it's a configuration issue and not a bug. It's best to discuss this on the forum before opening a bug report to rule that out.
I have tested these settings thoroughly when I did the hangout on local DNS and again for the DHCP hangout a couple months back and it always worked exactly like it should:
- When using pfSense as a DHCP server, clients are automatically assigned DNS servers based on several criteria:
- If DNS servers are defined in the DHCP settings, they are always used, otherwise...
- If the DNS Resolver or DNS Forwarder are enabled, the IP address of the firewall is given to clients, otherwise...
- If DNS servers are defined under System > General Setup, those are given to clients, otherwise…
- If none of the above are defined, then DNS servers are not provided to DHCP clients
The only exception to the above that comes to mind is that a client with a static mapping will prefer the settings on the static mapping.
Check the DHCP config file as Phil suggested, and also run a packet capture looking at the DHCP exchange from the client to see if that is actually coming from the DHCP server and not some other source.
If it is actually coming from pfSense, we'll need to see a copy of your config.xml and /var/dhcpd/etc/dhcpd.conf.