Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Forwarding dns and dhcp to windows server

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 3 Posters 11.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      arduino
      last edited by

      Hello everyone,

      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 .

      Thank you

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        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.

        dhcprelay.png
        dhcprelay.png_thumb

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • S
          simonbaev
          last edited by

          Hi All,

          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.

          –
          Simon

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            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.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • S
              simonbaev
              last edited by

              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?

              –
              Simon

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                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

                http://technet.microsoft.com/en-us/library/cc779610%28v=ws.10%29.aspx
                Understanding relay agents

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                1 Reply Last reply Reply Quote 0
                • S
                  simonbaev
                  last edited by

                  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.

                  –
                  Simon

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.