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

Is it possible to use the VPN on the same LAN network as the OpenVPN server?

Scheduled Pinned Locked Moved OpenVPN
7 Posts 4 Posters 703 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.
  • ?
    A Former User
    last edited by Apr 3, 2024, 6:22 PM

    Hi!, I have an OpenVPN server configured to connect remotely to a server and it works correctly but I frequently have to go to the site where the server is located and to work with the server I do it through the LAN. The problem is that if I forget to disconnect my computer from The VPN, when connected to the LAN, there is a conflict that prevents me from connecting to the server and I have the feeling that the speed of the Internet connection drops.

    This is easily solved by disconnecting the VPN from my computer, but I would like to know if there is an option so that it is not necessary to disconnect the VPN to connect to the server, in other words that the VPN functions on the same network as the OpenVPN server. Thank you!.

    V 1 Reply Last reply Apr 3, 2024, 7:21 PM Reply Quote 0
    • V
      viragomann @A Former User
      last edited by Apr 3, 2024, 7:21 PM

      @ErickJ
      Connect to the OpenVPN server from inside the LAN makes no sense at all anyway. So I would block access to the server from LAN. Then your client is not able to reconnect and LAN access should work normally.

      This means, add a reject rule to the LAN interface for the proper protocol you use for OpenVPN, with destination "This firewall" and the OpenVPN server port.

      J J 2 Replies Last reply Apr 3, 2024, 10:49 PM Reply Quote 0
      • ?
        A Former User
        last edited by Apr 3, 2024, 7:42 PM

        Thank you!, yes of course I know it doesn't make any sense but I find it somewhat annoying to forget to disconnect the VPN and have those problems.

        1 Reply Last reply Reply Quote 0
        • J
          Jarhead @viragomann
          last edited by Apr 3, 2024, 10:49 PM

          @viragomann said in Is it possible to use the VPN on the same LAN network as the OpenVPN server?:

          @ErickJ
          Connect to the OpenVPN server from inside the LAN makes no sense at all anyway. So I would block access to the server from LAN. Then your client is not able to reconnect and LAN access should work normally.

          This means, add a reject rule to the LAN interface for the proper protocol you use for OpenVPN, with destination "This firewall" and the OpenVPN server port.

          Are you sure about this?
          Tried that a while back and it didn't disconnect the VPN, which caused all traffic to drop. It would work if you tried to establish a connection from the LAN, but in a case where you were already connected on mobile, then it switched to wifi it didn't work.
          Maybe I missed a setting somewhere?

          V 1 Reply Last reply Apr 3, 2024, 11:06 PM Reply Quote 0
          • V
            viragomann @Jarhead
            last edited by Apr 3, 2024, 11:06 PM

            @Jarhead
            No, didn't try it to be honest.
            I was expecting that, since pfSense has no state for the VPN on the LAN, the connection would be dropped and the client needs to reconnect. But you say, it isn't?

            J 1 Reply Last reply Apr 3, 2024, 11:44 PM Reply Quote 0
            • J
              Jarhead @viragomann
              last edited by Jarhead Apr 3, 2024, 11:45 PM Apr 3, 2024, 11:44 PM

              @viragomann I actually just tried it again a little while ago, didn't work.
              It does work in the form of rejecting the traffic, ie the rule works, but the problem is since the vpn was already connected , ie on mobile with no wifi connected, the routes were already in place to use the vpn. Then when it connects to the wifi, I'm guessing those routes don't get flushed, but the vpn does get rejected which kills all traffic from the phone.
              I wonder if there's a "flush routes on reconnect" option in OpenVPN??
              Gonna Google now.

              1 Reply Last reply Reply Quote 0
              • J
                JKnott @viragomann
                last edited by Apr 4, 2024, 2:42 PM

                @viragomann said in Is it possible to use the VPN on the same LAN network as the OpenVPN server?:

                Connect to the OpenVPN server from inside the LAN makes no sense at all anyway.

                But it does work, at least here it does. However, that would depend on how you configure the server and what interfaces it listens to. Since I wanted to be able to connect via both IPv4 and IPv6, I had to choose the multihome connection.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                1 out of 7
                • First post
                  1/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received