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

    Accessing clients connected through openVPN

    Scheduled Pinned Locked Moved OpenVPN
    7 Posts 2 Posters 621 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
      umtsti
      last edited by

      Hello all,

      Im using openVPN server on my pfsense box and devices can connect to this server using this openvpn server. Also devices connected via openvpn can access my lan network. But what I would like to to accessing devices connected via openvpn from my lan network.

      Pfsense ip: 192.168.1.1
      Openvpn network: 192.168.40.1 /24
      My lan network: 192.168.1.1 /24

      How should I configure my outbout NAT or anything else to access openvpn clients. By the way, on pfsense web interface, I can ping open vpn clients IP which is 192.168.40.2 from pfsense. But I cant do it from my devices on lan which's ip is 192.168.1.99.

      Thanks in advance

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @umtsti
        last edited by

        @umtsti
        Simplest way is to NAT traffic to the OpenVPN server IP with an outbound NAT rule.

        Switch the outbound NAT into hybrid mode and save this.
        Then add a rule:
        interface: OpenVPN
        source: LAN net
        destination: Network > 192.168.40.0/24
        translation: interface address

        U 1 Reply Last reply Reply Quote 0
        • U
          umtsti @viragomann
          last edited by

          @viragomann Hello, thank you for your answer. but it didnt work maybe Im doing something wrong. Can you inspect my config below ?

          Here you can see my clients, they have 192.168.30.2 amd 192.168.30.3
          2024-03-29_06-47-36.jpg

          İn nat config, I already switched to hybrid mode. Is this correnct ?
          2024-03-29_06-47-11.jpg

          V 1 Reply Last reply Reply Quote 0
          • V
            viragomann @umtsti
            last edited by

            @umtsti
            The translation address has to be "interface address". WAN might not be correct here.
            Interface address means the one of the OpenVPN server, since you have defined this rule on the OpenVPN interface (group).

            U 1 Reply Last reply Reply Quote 0
            • U
              umtsti @viragomann
              last edited by

              @viragomann
              Hello, but there is no option for open vpn

              Ekran görüntüsü 2024-03-29 150214.png

              V 1 Reply Last reply Reply Quote 0
              • V
                viragomann @umtsti
                last edited by

                @umtsti
                Indeed, this option was removed.

                So you have to options.
                Either state the server address manually by selecting "Network or Alias" from the drop-down. Then enter the server address 192.168.40.1 with a /32 mask.
                The second option is to assign an interface to the OpenVPN instance. Then you should get the interface address.
                I would take the first one.

                U 1 Reply Last reply Reply Quote 0
                • U
                  umtsti @viragomann
                  last edited by umtsti

                  @viragomann Its now works, thank you so much for you help.

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