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

    Add DNS server on pfsense machine

    Scheduled Pinned Locked Moved General pfSense Questions
    23 Posts 5 Posters 9.7k 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.
    • dam034D
      dam034
      last edited by

      I didn't understand only one step: if the pfsense domain is "here", DHCP and static IPs create the DNS resolver, can I add more hostnames in "here" domain in host override?

      And if there is a DHCP client named "hello", and in DNS override I want to point "hello.here" to another IP, can I do it?

      Thanks

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

        you don't have to register dhcp clients in unbound.

        And then just create whatever host overrides you want.

        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
        • dam034D
          dam034
          last edited by

          Have I to disable the DHCP registration to override a DHCP client name?

          Thanks

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

            You don't have to but having the same name that points to 2 different ips is never good thing. But you could have 2 or more names that point to the same IP.

            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
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              No, you can add it as a host override and still register it. It overrides the dhcp lease registeration.

              Not sure why you would want to that though.

              Steve

              1 Reply Last reply Reply Quote 0
              • dam034D
                dam034
                last edited by

                I'm thinking like that because they could be some DHCP clients names already registered in host override section.
                Indeed, I tried to add a host override name "pohp.here" which points to an external IP, but when a DHCP client named "pohp" connects, the DNS points to the DHCP client machine, not to the external IP.

                Is it possible to override? Or have I to disable DHCP clients registration?

                Thanks

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

                  Why would you point pohp.here to an external IP if you have a client called pohp?

                  Really not understanding your use case... But if your going to put in by hand IP address for clients fqdn, then there is ZERO point to having them register dhcp address into unbound..

                  You have dhcp clients register in dns when your are NOT going to put in records by hand for them.

                  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
                  • dam034D
                    dam034
                    last edited by

                    I did an example, now I can explain better:

                    1. there is a DHCP client named "server";
                    2. I want to point "server.here" to it;
                    3. I add an host override "server.here" pointing to the machine written in step 1;
                    4. there could be another machine which the DHCP client name is "server".

                    I'm writing this because I don't administer fully the LAN, and some customers can connect to the wifi, and there could be some inconvenient DHCP clients names.

                    Should have I to disable the DHCP registration or is there a way to stay secure?

                    Thanks

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by stephenw10

                      Hmm, I tested that before posting and found it worked fine.

                      Are you sure you are seeing the same hostname and domain?

                      Edit: And it's still working after the client lease renewed.

                      Steve

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

                        @dam034 said in Add DNS server on pfsense machine:

                        there could be another machine which the DHCP client name is "server".

                        And why would you need to resolve those? So don't have dhcp register in unbound.. And just put in the host overrides for the stuff you want/need to resolve.

                        To be honest I really don't understand resolving dhcp clients by name in the first place.. If the box is important enough to you want to get to it by name.. Than it should have a reservation for dhcp so it always get the same IP. So register static dhcp. Or just set the box to be static IP and setup dns to resolve name to that IP, 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
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Well you could argue that clients with dynamic IPs are most likely to need DNS resolution to address them. 😉

                          But I hear what you're saying.

                          Either way I have that setup here and it works exactly as expected. I suspect there is actually a mismatch here. For example you enter client1 somewhere and you think it should resolve to an override you have as client1.domain1.net but in fact your client is trying to resolve soemthing different like client1.sub.domain1.net because something is misconfigured.

                          Steve

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

                            There is a difference between "clients" that get dhcp and "servers" he is using the name server.. While sure you might want to hand info out to the server via dhcp, so you can easy change stuff later like different router or dns, etc.

                            But server should have a dhcp reservation.

                            Random clients that are on and off the network, if you have a need to resolve them sure have register their names. But then why would you need to put in a host override? Why would you not just use different sub or domain then..

                            Just still not getting this use case.

                            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 1
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              Yeah, the easiest way to avoid this would just be to not add dynamic leases to Unbound.

                              1 Reply Last reply Reply Quote 0
                              • dam034D
                                dam034
                                last edited by

                                It's true and easiest disabling the DNS for DHCP clients.

                                Thanks for all.

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