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

    additional DNS-name kills service

    OpenVPN
    3
    9
    1.1k
    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.
    • M
      MaxTheITGuy
      last edited by

      Hello,

      I am running multiple OpenVPN-Servers on my pfSense (2.5.2-RELEASE), which does work flawlessly with a more or less standard configuration.

      However, once I try adding an additional DNS-name under "DNS Default Domain", The service of that OpenVPN-server breaks down and cannot be restarted.

      I also tried to push the domains via:
      push "dhcp-option DOMAIN example.local"
      push "dhcp-option DOMAIN core.windows.net"

      With the same result.
      Do you know of that issue? Any way to bypass it?

      Thanks in advance, hope somebody can help me.

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @MaxTheITGuy
        last edited by Gertjan

        @maxtheitguy

        Can you clarify ?

        You entered one "DNS Default Domain", and what did you do to enter more of them ?

        ad7aa213-f975-4043-a2ba-9df736b772ac-image.png "DNS Default Domain"

        @maxtheitguy said in additional DNS-name kills service:

        cannot be restarted.

        It tells you why. May we know why ?
        (the logs !)

        edit :
        I don't know why hosts should have multiple domain names, but, ok, I tried this :

        145829b3-51bc-4904-a823-072667bbb0f5-image.png

        openvpn server restarted just fine.
        No errors or alerts.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        M 1 Reply Last reply Reply Quote 0
        • M
          MaxTheITGuy @Gertjan
          last edited by

          @gertjan

          First, thank you for helping me out.

          I tried to enter it multiple ways:
          fd4322a2-7dd4-4009-b66b-3fffd96ccd0d-grafik.png

          9c2183f0-2455-4f89-923a-51e9d9517c4f-grafik.png

          About the Logs:
          I found an entry. Sorry, I was looking in 'System' before, thinking as it was a service that was causing issues. And our OpenVPN is getting so many Logs that this info was not visible anymore once I checked there. Seeing this sheds light into my issue.

          3cb730dc-b9f6-40d7-acb9-8ed73c2fcdd7-grafik.png

          Also, it did work as a custom option the way you entered it. I must say... I forgot the semicolons.

          Sorry, I might have worked myself into this issue so much, I did not see any obvious clues.

          Other question about the same topic.
          Because, maybe I am on a completely wrong track here...
          We need to force the clients to lookup the second domain via our provided DNS as well, as we are routing those windows packages to azure internally.
          Is this even the correct way of doing that?

          Thank you,
          Max

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @MaxTheITGuy
            last edited by

            @maxtheitguy said in additional DNS-name kills service:

            First, thank you for helping me out.
            I tried to enter it multiple ways:

            4aeff3ec-43c7-47ea-a354-d7ad7e8c9e04-image.png

            Look at what the doc says about "DHCP-push options" : Go here https://build.openvpn.net/man/openvpn-2.5/openvpn.8.html and locate --dhcp-option

            The variable DOMAIN can have a "name".
            Nothing has been said about adding multiple domain names.
            IMHO : it's even not 'logic' that multiple DOMAIN names can be used here.

            @maxtheitguy said in additional DNS-name kills service:

            I forgot the semicolons.

            Just to be sure : the usage of semicolons is just a pfSense GUI syntax, so it can separate the lines.

            @maxtheitguy said in additional DNS-name kills service:

            Because, maybe I am on a completely wrong track here...

            Shouldn't you check "DNS server enable" and add the IP's of your own DNS servers ?
            See my image above, previous post.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

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

              If you want search domains then use that option..

              dhcp-option DOMAIN-SEARCH my.company.domain
              dhcp-option DOMAIN-SEARCH some.example.domain
              

              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
              • M
                MaxTheITGuy
                last edited by

                Yes, I see now.
                so Domain-name should be unique and other domains can be added with domain-search.
                So, can I use domain-search with * as well?

                What I try to achieve is the following:
                We have an azure server to which we need to redirect the *.core.microsoft.com traffic.
                d7663f8a-0cda-44fb-bd82-39964f2844bd-grafik.png
                We cannot send all traffic to the pfSense and redirect there, because it would overwhelm our site. (we tried that once... due to home office we currently have a lot of OpenVPN users and all those small DNS-Packets somehow brick our application-firewall...)

                So, the correct way would be:

                push "dhcp-option DOMAIN example.local";
                push "dhcp-option DOMAIN-SEARCH *.example.domain";

                ?

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

                  @maxtheitguy why would you think you need an asterisk?

                  say your domain was mydomain.tld

                  and you added search of
                  otherdomain.tld
                  something.mydomain.tld
                  other.mydomain.tld

                  And client searched for just host

                  What would be queried would be
                  host.mydomain.tld

                  and if nothing returned then
                  host.otherdomain.tld
                  host.something.mydomain.tld
                  host.other.mydomain.tld

                  How would a wildcard work, there is almost an infinite amount of possibilities..

                  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
                  • M
                    MaxTheITGuy
                    last edited by

                    @johnpoz I think, we are speaking of two different things here. Might very well be due to my missing know-how in pfSense.

                    First is the default domain, which would be company.local, that is clear and used to correctly lookup hostnames, no asterisk needed there, that was a mistake.

                    But we need a set of other DNS-names to also be resolved by the "tunnel-DNS", not domain-hosts. Just plain, simple DNS-names from websites.

                    For example:
                    file1.core.microsoft.com
                    or
                    file2.core.microsoft.com

                    As I don't support the DNS by myself, it would be great if I could just work with an asterisk there, so I do not have to add names again and again when somebody changes something on our local DNS-server.

                    Split-DNS, so to say, I guess.

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

                      @maxtheitguy so you want to create a host override wild card? You want to resolve anything.core.microsoft.com to same IP?

                      This is how you would do that via unbound

                      https://docs.netgate.com/pfsense/en/latest/services/dns/wildcards.html#creating-wildcard-records-in-dns-forwarder-resolver

                      You can not do that via gui..

                      if you want file1.somedomain.tld to resolve to 192.168.1.100, and file2.somedomain.tld to 192.168.1.101, you would have to create the records for those, or point the domain to some other NS that would resolve them to what 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.7.2, 24.11

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