Forwarding dns and dhcp to windows server
I have Windows server and want to set it up as an Active Directory where it serves as the DNS and DHCP server for my network.
Right now pfSense is handling all of these requests . I have looked everywhere trying to set this up correctly but I cannot seem to get it to work.
I have three NICs , one is incoming , one is home and one is work where I run a remote computer lab. Is it possible for pfSense to allow the windows server to handle all DHCP and DNS? I have tried DHCP relay and it was not working for me , most likey because I have no set it up correctly.
I am also having issues with the fact Windows Server is a domain controller and uses a domain that is not local domain , it is myoffice.lan. If I change the domain on pfsense I get quite a few issues.
I am not really sure if posting any of my setup details right now would be of any help , I just want to know how one would setup such a thing…If anyone needs information I am glad to provide .
So is this AD dc you want to use on your work segment or your home segment?
If on your work segment and you want dhcp on your home segment to use it then you need dhcp relay.
If only one segment in question - juts turn off dhcp on pfsense, configure MS dhcp to hand out your pfsense as the gateway address and itself for dns. Done = this is all of 2 seconds to setup.
Does not matter what you set your pfsense domain to - your not using it for dns in an AD setup, and your not handing it out via dhcp, etc. So you could make it pfsense.doesnotmatter.lan for example. Or it could be in your AD domain as well - what does it matter your not using it for dns as you stated.. so what its domain and or fqdn has nothing to do with nothing.
If you want dhcp relay to work - there isn't much too it.. Listen on the interface you don't have dhcp server on.. In your case HOME, and then point it to the IP address in you work segment that your dhcp server is on. And make sure you have dhcp scope setup on it for your home network. So lets say home is 192.168.1.0/24 and work is 192.168.2.0/24
Your AD DC is say 192.168.2.14 – then on home interface setup dhcp relay to send to 192.168.2.14 and on .14 setup scope for 192.168.1.0/24 with the info you want to give out. 2.14 is your dns, pfsense address in 192.168.1.? is your gateway for that scope.
If still confused post your network layout and can give you exact instructions.
I have similar situation and also a bit confused with relaying. My situation is quite similar to arduino's one.
I have several VLAN's with dedicated pfSense NICs on each one. One VLAN hosts DC (Windows Server 2008 R2) which runs AD and DNS roles.
I use pfSense as DHCP server for all VLANs. It is configured to provide DC's domain name and DC's DNS to all clients.
The problem: A computer (say some W7 host) in one of VLAN's (different from the one where DC is hosted) gets IP, domain name, pointer to DNS from pfSense's DHCP and needs to inform DC's DNS about its new lease. For some reason this link (from W7 to DC) did not work for the purpose of updating A record in DC's DNS…
I started investigating and found many posts (including ones on pfSense forum) which suggested to move DHCP from pfSense to DC so both DNS and DHCP roles could communicate nicely one with the other. My situation is quite more difficult as I have many VLAN's and bunch of different hosts in those VLAN's which need AD authentication. I then found out that individual host (member of AD) can update A record on DC's DNS by itself if "Secure only" dynamic updates are enabled on DC's DNS. I then figured out that it is what I need... but for some reasons it didn't work for me as I mentioned before. For some reasons it started working after revising AD settings.
But I also found out that a host can only update A record on DC's DNS while leaving PTR record obsolete. They say it is pure responsibility of DHCP server to update PTR record. And here I find myself in the situation where pfSense's DHCP must communicate with DC's DNS to update records... which doesn't seem to be doable.
Having this said, I believe the only way to address the problem is to
setup pfSense as DHCP relay
disable pfSense's DHCP server (on all interfaces since DHCP relay can only be enabled when DHCP is not running at all)
setup DHCP server on DC and somehow instruct it to take care of ALL VLAN's IP addresses (not only about IP on VLAN where DC is hosted)
I'm not sure about correctness of the proposal, especially how to implement the last step. I greatly appreciate anyone's help.
Yeah I would suggest have your AD dhcp handle your dhcp.. Your correct, setup dhcp relay on your other segments to point to your dhcp server. On dhcp server setup scopes for your different segments. Its no different then setting up the scope for the segment your dhcp actually sits on.
In DHCP scopes on DC how will I know which VLAN needs the IP? My DC has one NIC so I guess all requests will come through this NIC and requester's membership to particular VLANs will be lost… Am I missing something?
Yeah your missing something ;)
When the dhcp traffic is relayed to your dhcp server it keeps what network it came from.
You seem to me a MS shop, running AD and all ;) So here maybe this helps
Understanding relay agents
It all worked! Just wanted to thank you.
I faced only one issue when DHCP did not update "reverse lookup zone" but it got fixed after specifying proper credentials for update account.