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

    Use hostname to reach OpenVPN clients

    Scheduled Pinned Locked Moved OpenVPN
    57 Posts 4 Posters 7.2k 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.
    • Z
      zapador @Unoptanio
      last edited by

      @Unoptanio Does that happen when a client connects?

      UnoptanioU 1 Reply Last reply Reply Quote 0
      • UnoptanioU
        Unoptanio @zapador
        last edited by

        @zapador

        I tried to make some openvpn connections now and to connect in rdp using the name.domain format but nothing appears in the log section relating to today's date, September 16th.
        in the log the first occurrence of "start of service (unbound)" is on September 14th but I don't know what it referred to

        431980dd-335c-4d57-b60b-0661338d840f-image.png

        of today 16th September I only have the first line in the log

        do you have different data in your firewall?

        pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
        CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
        n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

        Z 1 Reply Last reply Reply Quote 0
        • Z
          zapador @Unoptanio
          last edited by

          @Unoptanio Don't worry about the log at first, just check if things work or not. Start by checking from the pfSense itself using Diagnostics -> DNS Lookup and see if you can get an IP for your connected client.

          UnoptanioU 1 Reply Last reply Reply Quote 1
          • UnoptanioU
            Unoptanio @zapador
            last edited by Unoptanio

            @zapador
            e4cd9ae2-0ca6-4f72-9bf4-ac1863a1be6d-image.png

            pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
            CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
            n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zapador @Unoptanio
              last edited by

              @Unoptanio As long as you have manually added Host Overrides then you'll never find out if "Register connected OpenVPN clients in the DNS Resolver" is working because the Host Overrides will take priority. If you list something in Host Overrides it will ALWAYS work in the sense that the DNS Resolver will return an IP for anything listed in the Host Overrides no matter if it exists or not.

              But is it otherwise working as it should?

              UnoptanioU 3 Replies Last reply Reply Quote 0
              • UnoptanioU
                Unoptanio @zapador
                last edited by Unoptanio

                @zapador

                At the moment, with the current configuration, everything works for me.

                Before compiling this DNS override table, RDP access using the name.domain format did not work for me.
                7bba8c46-2a7d-442d-a7e8-eb1dddd2a651-image.png

                RDP access only worked using the machine's IP address


                RDP access using name.domain format should theoretically work even without having filled in the DNS resolver override table? yes o no?

                pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                Z 1 Reply Last reply Reply Quote 0
                • Z
                  zapador @Unoptanio
                  last edited by

                  @Unoptanio That's great!

                  UnoptanioU 1 Reply Last reply Reply Quote 0
                  • UnoptanioU
                    Unoptanio @zapador
                    last edited by Unoptanio

                    @zapador

                    65cc4152-1a4d-4661-a369-9bf79af1f040-image.png

                    e3f8e670-0915-4f3b-98f5-56d0e0ea2954-image.png

                    pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                    CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                    n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                    Z 1 Reply Last reply Reply Quote 1
                    • Z
                      zapador @Unoptanio
                      last edited by

                      @Unoptanio Is what without using Host Overrides?

                      UnoptanioU 1 Reply Last reply Reply Quote 0
                      • UnoptanioU
                        Unoptanio @zapador
                        last edited by Unoptanio

                        @zapador
                        it was only a question.

                        Initially I thought that once connected to openvpn, the names of the machines that are on the 192.168.1.x network would automatically be visible without use dns override

                        pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                        CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                        n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                        Z 1 Reply Last reply Reply Quote 0
                        • Z
                          zapador @Unoptanio
                          last edited by

                          @Unoptanio said in Use hostname to reach OpenVPN clients:

                          Initially I thought that once connected to openvpn, the names of the machines that are on the 192.168.1.x network would automatically be visible without use dns override

                          If you use "Register connected OpenVPN clients in the DNS Resolver" it should work without adding any Host Override. If not something is misconfigured or you're trying with an incorrect hostname, something along those lines.

                          UnoptanioU 1 Reply Last reply Reply Quote 0
                          • UnoptanioU
                            Unoptanio @zapador
                            last edited by Unoptanio

                            @zapador

                            the host I need to reach using the name is in the remote office network which has ip 192.168.1.x.

                            From my home PC I connect to OPEN VPN and by checking as you said the name is correctly registered: usernameopenvpn.domain and the IP address returns 10.10.94.x

                            33881d04-4e7b-45ac-a40f-456c417c9e17-image.png

                            pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                            CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                            n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                            Z 1 Reply Last reply Reply Quote 0
                            • Z
                              zapador @Unoptanio
                              last edited by

                              @Unoptanio Ah alright. Not sure exactly why that is, seems a bit odd. Is this an acceptable solution though, manually creating the Host Override entries?

                              UnoptanioU 1 Reply Last reply Reply Quote 0
                              • UnoptanioU
                                Unoptanio @zapador
                                last edited by Unoptanio

                                @zapador

                                could it be a bug in the pfsense 2.7.0 version?

                                For now I'll leave it alone that it works.

                                I'll tell you this last thing:
                                on the office network 192.168.1.x I have a machine called "Server5k".
                                If I go to pfsense--> diasgnostics--> DNS lookup it doesn't resolve the name
                                does not find any machine names on the 192.168.1.x network

                                9b1454c8-413f-4bb0-ab57-af1d22623013-image.png

                                pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                                CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                                n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                                Z 1 Reply Last reply Reply Quote 0
                                • Z
                                  zapador @Unoptanio
                                  last edited by

                                  @Unoptanio There could be many reason for that. Is the Server5K connected directly to this pfSense? If so the pfSense should register the hostname via DHCP, or if there's a static DHCP lease. I really can't give you much info here without knowing the exact setup. But ask yourself - how would the pfSense know about the existence of this Server5K and have the pfSense had a good reason to register the hostname in DHCP?

                                  UnoptanioU 1 Reply Last reply Reply Quote 0
                                  • UnoptanioU
                                    Unoptanio @zapador
                                    last edited by Unoptanio

                                    @zapador
                                    6deedac6-ed29-4c71-9266-36aae7e8dbdb-image.png

                                    c21ee34a-407e-4a4e-9f6c-630e4a118c7b-image.png

                                    pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                                    CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                                    n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                                    Z 1 Reply Last reply Reply Quote 0
                                    • Z
                                      zapador @Unoptanio
                                      last edited by

                                      @Unoptanio

                                      I would add the pfSense IP in the list of DNS servers:
                                      c73d296f-bc86-4d48-b2ed-6e95a4376889-image.png

                                      You could just remove 8.8.8.8 and replace it with 192.168.1.1.

                                      How does the Server5K get it's IP address? Is it static on the Server5K itself? Or a static lease in pfSense? Or just DHCP without Statis Lease?

                                      UnoptanioU 1 Reply Last reply Reply Quote 0
                                      • UnoptanioU
                                        Unoptanio @zapador
                                        last edited by Unoptanio

                                        @zapador

                                        Server5k have static IP
                                        cb68c810-ceb5-417c-90d6-7e23e5bef044-image.png

                                        04f3387d-2f2f-44ba-9f57-df9df847e3b7-image.png

                                        pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                                        CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                                        n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

                                        Z 1 Reply Last reply Reply Quote 0
                                        • Z
                                          zapador @Unoptanio
                                          last edited by

                                          @Unoptanio That explains why it isn't working. Set it to use DHCP on the server itself. Then on pfSense go to Services -> DHCP Server and at the bottom Add static mapping. Then fill everything out and make sure you get the MAC address right.

                                          You just have to fill out this:

                                          7b915893-f166-41fa-b0f2-7346ca1b6d3a-image.png

                                          1 Reply Last reply Reply Quote 0
                                          • UnoptanioU
                                            Unoptanio @zapador
                                            last edited by Unoptanio

                                            @zapador

                                            Are you sure?
                                            But the server's ip address 192.168.1.250 is out of dhcp range

                                            The DHCP range is :
                                            b284d6b4-684a-4b8c-a24b-fe948ede1e03-image.png

                                            pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
                                            CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
                                            n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

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