• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.
  • U
    Unoptanio @zapador
    last edited by Sep 16, 2023, 12:37 PM

    @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 Sep 16, 2023, 1:02 PM Reply Quote 0
    • Z
      zapador @Unoptanio
      last edited by Sep 16, 2023, 1:02 PM

      @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.

      U 1 Reply Last reply Sep 16, 2023, 2:47 PM Reply Quote 1
      • U
        Unoptanio @zapador
        last edited by Unoptanio Sep 16, 2023, 2:47 PM Sep 16, 2023, 2:47 PM

        @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 Sep 16, 2023, 3:19 PM Reply Quote 0
        • Z
          zapador @Unoptanio
          last edited by Sep 16, 2023, 3:19 PM

          @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?

          U 3 Replies Last reply Sep 16, 2023, 3:25 PM Reply Quote 0
          • U
            Unoptanio @zapador
            last edited by Unoptanio Sep 16, 2023, 3:30 PM Sep 16, 2023, 3:25 PM

            @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 Sep 16, 2023, 3:31 PM Reply Quote 0
            • Z
              zapador @Unoptanio
              last edited by Sep 16, 2023, 3:31 PM

              @Unoptanio That's great!

              U 1 Reply Last reply Sep 16, 2023, 3:58 PM Reply Quote 0
              • U
                Unoptanio @zapador
                last edited by Unoptanio Sep 16, 2023, 4:04 PM Sep 16, 2023, 3:58 PM

                @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 Sep 16, 2023, 4:02 PM Reply Quote 1
                • Z
                  zapador @Unoptanio
                  last edited by Sep 16, 2023, 4:02 PM

                  @Unoptanio Is what without using Host Overrides?

                  U 1 Reply Last reply Sep 16, 2023, 5:33 PM Reply Quote 0
                  • U
                    Unoptanio @zapador
                    last edited by Unoptanio Sep 16, 2023, 4:11 PM Sep 16, 2023, 4:09 PM

                    @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 Sep 16, 2023, 4:15 PM Reply Quote 0
                    • Z
                      zapador @Unoptanio
                      last edited by Sep 16, 2023, 4:15 PM

                      @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.

                      U 1 Reply Last reply Sep 16, 2023, 5:42 PM Reply Quote 0
                      • U
                        Unoptanio @zapador
                        last edited by Unoptanio Sep 16, 2023, 4:32 PM Sep 16, 2023, 4:26 PM

                        @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 Sep 16, 2023, 4:33 PM Reply Quote 0
                        • Z
                          zapador @Unoptanio
                          last edited by Sep 16, 2023, 4:33 PM

                          @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?

                          U 1 Reply Last reply Sep 16, 2023, 4:40 PM Reply Quote 0
                          • U
                            Unoptanio @zapador
                            last edited by Unoptanio Sep 16, 2023, 4:43 PM Sep 16, 2023, 4:40 PM

                            @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 Sep 16, 2023, 4:44 PM Reply Quote 0
                            • Z
                              zapador @Unoptanio
                              last edited by Sep 16, 2023, 4:44 PM

                              @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?

                              U 1 Reply Last reply Sep 16, 2023, 4:50 PM Reply Quote 0
                              • U
                                Unoptanio @zapador
                                last edited by Unoptanio Sep 16, 2023, 4:53 PM Sep 16, 2023, 4:50 PM

                                @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 Sep 16, 2023, 4:55 PM Reply Quote 0
                                • Z
                                  zapador @Unoptanio
                                  last edited by Sep 16, 2023, 4:55 PM

                                  @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?

                                  U 1 Reply Last reply Sep 16, 2023, 4:59 PM Reply Quote 0
                                  • U
                                    Unoptanio @zapador
                                    last edited by Unoptanio Sep 16, 2023, 5:11 PM Sep 16, 2023, 4:59 PM

                                    @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 Sep 16, 2023, 5:11 PM Reply Quote 0
                                    • Z
                                      zapador @Unoptanio
                                      last edited by Sep 16, 2023, 5:11 PM

                                      @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
                                      • U
                                        Unoptanio @zapador
                                        last edited by Unoptanio Sep 16, 2023, 5:38 PM Sep 16, 2023, 5:33 PM

                                        @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 Sep 16, 2023, 5:36 PM Reply Quote 0
                                        • Z
                                          zapador @Unoptanio
                                          last edited by zapador Sep 16, 2023, 5:37 PM Sep 16, 2023, 5:36 PM

                                          @Unoptanio That's exactly as it should be. The DHCP range is for devices where you don't care about what IP they get, so clients, not servers. You cannot make a static mapping that lies within the DHCP range, only outside of it.
                                          When you set the IP static on the server itself then it will never talk to the DHCP on the pfSense and that's why the pfSense doesn't really know that the server is even there. When you set a static mapping the server will talk to the DHCP server on pfSense and based on the MAC address of the server pfSense will assign it the correct IP address (outside of the DHCP range).

                                          You can try to assign the server an IP inside of the DHCP range, that will give you an error. It has to be outside of the DHCP range.

                                          U 1 Reply Last reply Sep 16, 2023, 7:18 PM Reply Quote 0
                                          41 out of 57
                                          • First post
                                            41/57
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received