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

    Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash)

    Scheduled Pinned Locked Moved DHCP and DNS
    31 Posts 6 Posters 3.8k 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.
    • bearhntrB
      bearhntr @bmeeks
      last edited by

      @bmeeks

      Apologies for the late response - I did not see that your response was out here.

      I am looking to have a central user base - logins for various systems. I am not specifically 'locked' into Windows AD - as I happen to know it, that is why I was looking down that path. I am familiar with setting up the AD environment (in most cases) -- but more in an office lab environment where there is already an established DNS and Internet Gateway.

      I know there are other LDAP methods, what specifically I am looking for is to be able to setup things like HomeAssistant, pfSense, NAS, and a few other systems with a single "domain" login and password - rather than individual logins on each of them. If that makes sense.

      As I work from home, and need the setup of a 'lab' domain to test various softwares and configurations - on VM servers - this is why I am looking to possibly setup an AD environment.

      bmeeksB 1 Reply Last reply Reply Quote 0
      • bmeeksB
        bmeeks @bearhntr
        last edited by

        @bearhntr said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

        @bmeeks

        Apologies for the late response - I did not see that your response was out here.

        I am looking to have a central user base - logins for various systems. I am not specifically 'locked' into Windows AD - as I happen to know it, that is why I was looking down that path. I am familiar with setting up the AD environment (in most cases) -- but more in an office lab environment where there is already an established DNS and Internet Gateway.

        I know there are other LDAP methods, what specifically I am looking for is to be able to setup things like HomeAssistant, pfSense, NAS, and a few other systems with a single "domain" login and password - rather than individual logins on each of them. If that makes sense.

        As I work from home, and need the setup of a 'lab' domain to test various softwares and configurations - on VM servers - this is why I am looking to possibly setup an AD environment.

        Sounds like what you really want is Single Sign-On (SSO). Windows AD can certainly provide that feature, but only if all of your devices/services are compatible with Active Directory. Not everything will work with Active Directory credentialling (at least not in native AD). More stuff is likely to work with Radius or maybe LDAP that in turn uses a Windows AD backend.

        I did a quick Google search for HomeAssisant and Active Directory or LDAP integration. Some things I found suggest it is possible- with some work- to get LDAP to work. But I did not find a ready-made tutorial. That tells me maybe it does not actually work well yet. The LDAP functionality of Active Directory is not necessarily "standard" as is the case with most things Microsoft implements to sort of mimic a published standard. Things like that frequently almost work correctly, but just not 100% correctly ๐Ÿ™‚.

        Kind of the same thing with a NAS. How well it works with AD authentication is going to be determined by the level of support the underlying operating system of the NAS has for Samba/Active Directory. Some Linux-type systems are better at this than others.

        1 Reply Last reply Reply Quote 0
        • Cool_CoronaC
          Cool_Corona
          last edited by

          We run this scenario at a client using Windows server as DHCP and DNS using pfsense only as a Firewall :)

          Works no issues.

          bearhntrB 1 Reply Last reply Reply Quote 0
          • bearhntrB
            bearhntr @Cool_Corona
            last edited by

            @cool_corona

            Thanks - I think what I really want is to have DHCP and DNS on pfSense, and maybe Windows Server 2019 Domain Controller as a backup to DNS. Since the majority of my home machines and lab machines will be Windows 7, 10, 11 and other servers - I truly feel this is the way I should go.

            I am really hoping that I can get it all setup and working, as I would like to have single sign-on methods using AD (LDAP). Shame I could not do the same thing for all of these streaming services, banking and other web-based logins. ๐Ÿ™„

            Cool_CoronaC johnpozJ S 3 Replies Last reply Reply Quote 0
            • Cool_CoronaC
              Cool_Corona @bearhntr
              last edited by

              @bearhntr Windows DNS is much better.

              Use only pfsense as GW and FW if you have the choice.

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

                @bearhntr said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                lab machines will be Windows 7, 10, 11 and other servers - I truly feel this is the way I should go.

                Which are windows.. Why would you not just use windows as your dns and dhcp? Especially if your going to run an AD, be it these machines are actual members of the AD or not, if your going to resolve and use AD in your setup.

                Pfsense dhcp and dns is great when you don't have anything else to use.. But if your MS shop, and have windows servers running already then why would you not just leverage it for dhcp and dns - this makes it much easier to all your AD stuff resolving correctly, etc.

                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.8, 24.11

                M 1 Reply Last reply Reply Quote 0
                • S
                  SteveITS Galactic Empire @bearhntr
                  last edited by

                  @bearhntr

                  Windows Server 2019 Domain Controller as a backup to DNS

                  As noted above set a domain override to forward AD queries to Windows or youโ€™ll have problems. (Login failures, slow login, group policy not found, etc.)

                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                  Upvote ๐Ÿ‘ helpful posts!

                  1 Reply Last reply Reply Quote 0
                  • M
                    mcury @johnpoz
                    last edited by mcury

                    @johnpoz Although it works great using AD DNS/DHCP, you will face some problems with pfblockerNG DNSBL and/or pihole.
                    You won't be able to know what IP is being blocked because all of them will reach pfsense using AD IP.

                    In this situation, I enable DHCP relay in pfsense and use DHCP from AD, in which will register A and reverse entries.
                    For users, I use DNS from pfsense, but there I create domain override and networks reverse entries.

                    It's working fine for a few customers..

                    Edit: Using AD DNS will also create a problem with DNSBL bypass.

                    dead on arrival, nowhere to be found.

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

                      @mcury said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                      you will face some problems with pfblockerNG DNSBL and/or pihole.

                      Nope, not an issue.. your clients point to your AD for dns, then your AD forwards to unbound, or shoot even forwards to your pihole, and then pihole forwards to unbound so you can use both pihole and pfblocker, etc.

                      with DNSBL bypass.

                      For clients you don't want to be filtered by unbound. Create a conditional forwarder in your AD dns that sends them somewhere else for dns that is not filtered by unbound. Say bind running on your pfsense that running on a different port even.

                      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.8, 24.11

                      M 2 Replies Last reply Reply Quote 0
                      • M
                        mcury @johnpoz
                        last edited by

                        @johnpoz When you check the Reports tab in pfblockerNG, all you can see is the AD IP as source of the connections.

                        dead on arrival, nowhere to be found.

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

                          @mcury see my edit... Yes all stuff going to unbound from your AD would be from the AD IP, but you can create a conditional forwarder that sends clients asking AD that you don't want to be filtered to go somewhere else for upstream dns, etc .

                          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.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • M
                            mcury @johnpoz
                            last edited by

                            @johnpoz said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                            For clients you don't want to be filtered by unbound. Create a conditional forwarder in your AD dns that sends them somewhere else for dns that is not filtered by unbound. Say bind running on your pfsense that running on a different port even.

                            ๐Ÿค” Hmmm, that is another option too..

                            dead on arrival, nowhere to be found.

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

                              @mcury said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                              Hmmm, that is another option too..

                              There are always multiple ways to skin a cat.. But if your running AD, it makes sense to use that is as your first DNS, and also have it hand out dhcp.. And then skin the cat using that for whatever other thing you want to do with the skin.. Make a coat, or a purse, etc.

                              You could have your AD resolve even, and for stuff you want filtered use a conditional forwarder for those clients that forward to unbound/pihole, etc.

                              If everything is using your AD for dhcp and dns, this would be first stop to resolve all local resources - what happens after that you can configure in the AD dns - be it forwards to something that filters, be it forwarded to something that doesn't or even just resolve.

                              But when you run AD, clients of the AD should use it for dns and dhcp - this makes AD run easier and smoother.

                              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.8, 24.11

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                mcury @johnpoz
                                last edited by mcury

                                @johnpoz I see your point.
                                I have been doing what I described above for a few years and no problems so far.

                                But next time, I'll check that bind option indeed.. Point users to AD and check how it goes.

                                dead on arrival, nowhere to be found.

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

                                  @mcury Sure if you know what your doing and how to setup domain forwards in unbound, etc, you can can have all your AD resolve, etc. But if your a MS shop, and your running AD.. It is cleaner to have your dns and dhcp via the AD.. What happens with filtering for dns records can either happen there in your AD dns.. or you can forward for your external filtered records to something that filters - be that pihole or unbound, etc.

                                  Like said there are many ways to skin a cat ;)

                                  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.8, 24.11

                                  M 1 Reply Last reply Reply Quote 1
                                  • M
                                    mcury @johnpoz
                                    last edited by

                                    @johnpoz said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                                    Like said there are many ways to skin a cat ;)

                                    Indeed :)

                                    dead on arrival, nowhere to be found.

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

                                      @mcury personally I am what is good for the goose is also good for the gander.. If I am going to "filter" something - then all things should be filtered..

                                      If there is some resource that should be able to resolve something, why would I filter it for just some and not all - the thing is either bad or its good.. Filtered or not filtered.. Not a fan of oh you can not lookup that fqdn, but my other device can..

                                      You also have to keep in mind when your going to filter for some and not for others - that you don't run into a caching issue where client A looks up something and he is not filtered, and now that something is cached so when client B asks for it - guess what he gets the answer from cache, when it should of been filtered for him, etc.

                                      Something is either filtered or not filtered - if you find you need to be able to resolve something or get to something for something to work.. Guess that something shouldn't be filtered in the first place, and all things should be able to get to it..

                                      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.8, 24.11

                                      M 1 Reply Last reply Reply Quote 2
                                      • M
                                        mcury @johnpoz
                                        last edited by mcury

                                        @johnpoz Me too, but sometimes that depends on what the customer needs.
                                        Squid requires so much maintenance that I'm not using it anymore, and some customers asks for web filtering.

                                        In this situation, I'm using pfblockerNG to create a few block lists, create a GPO to block DOH, DOT, QUIC, in the browsers..
                                        For the managers or VIPs, I just put them in the python bypass in DNSBL.

                                        Sometimes, when I need multiple filtering groups, I go for Squid but I only set it in the browsers, to avoid some applications problems.
                                        Explicit, with some bypasses directly from the client or using PAC, or directly in the browser configuration.
                                        When I do like this, I force the use of the proxy by GPO, not allowing the user to change this setting.

                                        dead on arrival, nowhere to be found.

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

                                          @mcury said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                                          Sometimes, when I need multiple filtering groups

                                          Maybe some education of your clients is what is needed here.. But yeah filtered of groups sometimes in a work setup is prudent.. While you might trust salaried guy to not spend his time shopping amazon while suppose to be working, while some group machine sitting on the plant floor that anyone can just walk by, etc.

                                          Still not a fan of playing internet nazi, but yeah sometime customers don't get it. So you think keeping the plant floor machine from going to amazon stops them from going to amazon? They prob just use their phone if the computer can't get there.. Just like boss man could..

                                          If it filtered it should be filtered for all, if its open - then its open for all.. I use to run web filtering for a large corp for many years, and they finally wised up and just used the same filtering set for all, vs like 5 different goups - oh these guys can go to shopping, these guys can only during lunch, etc. etc.. It just over complicates everything, and just leads to problems in all aspects - more work for the IT, more frustration for others - why can billy go to xyz.com while susan can't etc. etc.

                                          They went with policy of group type kiosk machines out on the floor were just limited to specific whitelist internet a few external sites like insurance website, etc. And then they could get to anything on the intranet.

                                          If you figured out a way to skin the cat to give the customer what they asked for then great.. But depending on the breed and size of the cat - there are always going to be multiple ways to skin it to make what you want out of the skin ;)

                                          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.8, 24.11

                                          M 1 Reply Last reply Reply Quote 1
                                          • M
                                            mcury @johnpoz
                                            last edited by

                                            @johnpoz said in Using pfSense as firewall and Windows Server as DHCP and DNS server (re-hash):

                                            If you figured out a way to skin the cat to give the customer what they asked for then great.. But depending on the breed and size of the cat - there are always going to be multiple ways to skin it to make what you want out of the skin ;)

                                            That is it.. :)

                                            dead on arrival, nowhere to be found.

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