Netgate SG-1000 microFirewall

Author Topic: DNS Resolver ignores DHCP domain  (Read 839 times)

0 Members and 1 Guest are viewing this topic.

Offline dpsi

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
DNS Resolver ignores DHCP domain
« on: October 16, 2016, 08:11:00 pm »
So I have 2 networks. Under system I have the domain aaa.bbb, under the DHCP server settings for network 2 I have ccc.ddd. Under DNS resolver I have enabled register DHCP clients. For some reason it will resolve clients from both network 1 and 2, but will only resolve it with clienthostname.aaa.bbb (the system domain) on both networks. How can I make it to resolve the specified DHCP domain?

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15127
  • Karma: +1412/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: DNS Resolver ignores DHCP domain
« Reply #1 on: October 17, 2016, 06:26:09 am »
I really don't think it works that way.

You can see on the resolver register dhcp clients it states
The domain in System: General Setup should also be set to the proper value.

The client registers their hostname and resolver uses the default domain with it..

I don't think the domain you hand out with dhcp comes into play.  I would have to do some testing.  But when you look at your client does he actually show his full name as the domain you handed out with your dhcp? Why exactly do you need/want 2 different domains?
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline dpsi

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: DNS Resolver ignores DHCP domain
« Reply #2 on: October 18, 2016, 04:23:53 pm »
The client registers their hostname and resolver uses the default domain with it..

I don't think the domain you hand out with dhcp comes into play.  I would have to do some testing.  But when you look at your client does he actually show his full name as the domain you handed out with your dhcp? Why exactly do you need/want 2 different domains?

Yes, the clients receive the correct domain name as specified under the DHCP server settings as seen in the attachment.

I use 2 different domains to divide 2 networks that share a WAN. Users on one network should be getting aaa.bb and users on the other should be getting ccc.aaa.bb

The clients get the correct domains but doing DNS lookups to the DNS resolver resolves all clients to $client.aaa.bb instead of $client.ccc.aaa.bb


Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15127
  • Karma: +1412/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: DNS Resolver ignores DHCP domain
« Reply #3 on: October 19, 2016, 03:42:57 pm »
Again if you have the dhcp server register their names, its going to just use its domain, ie the one you put pfsense in.

Now you could have your client register his name in dns. And it would use the domain it got from dhcp.  But I don't think you can set that up with unbound.  I think the bind package can do that.

- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline dpsi

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: DNS Resolver ignores DHCP domain
« Reply #4 on: October 20, 2016, 04:01:21 pm »
Again if you have the dhcp server register their names, its going to just use its domain, ie the one you put pfsense in.

Now you could have your client register his name in dns. And it would use the domain it got from dhcp.  But I don't think you can set that up with unbound.  I think the bind package can do that.

Thanks for clarifying. I guess I'll live with it now. Only wanted different domains so It'd be easier to too see which host was on what network but the IP scheme is different so I'll just rely on that.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15127
  • Karma: +1412/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: DNS Resolver ignores DHCP domain
« Reply #5 on: October 20, 2016, 04:09:27 pm »
If you really want them to use different domain.. You could setup reservations for dhcp and set their domains to be different that way.

To me if they are on my network and connecting to my pfsense, then they are all part of my network ;)  Don't really see the need for subdomain or different domains.  Now saying that I did setup subdomains for my pfsense different IPs..  So for example

user@ubuntu:~$ dig -x 192.168.2.253 +short
pfsense.wlan.local.lan.
user@ubuntu:~$ dig -x 192.168.3.253 +short
pfsense.dmz.local.lan.
user@ubuntu:~$ dig -x 192.168.4.253 +short
pfsense.wlanpsk.local.lan.

Which I can query real quick to remind me which network is which vlan ;) hehehe
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)