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

    Prevent openvpn client from connecting when in the office

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 1.6k 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.
    • M
      mrbostn
      last edited by

      Hi,

      After I upgraded our pf 1.2.3 to  2.0.1 I noticed that users who have laptops and openvpn clients suddenly connect via openvpn when in the office (the local lan). In 1.2.3 this wasn't the case. I'd like to prevent this as it causes strange issues.  If I disable the tap in the Windows networking, things work fine.

      Currently the clients are setup to autoconnect. That is they don't open the gui and click connect.

      Does anyone have any tips?

      Thanks

      1 Reply Last reply Reply Quote 0
      • B
        bachi
        last edited by

        Create a LAN firewall rule which blocks access to pfsense wan address and port that openvpn listens.

        Action: block

        Protocol: UDP (or tcp if you running openvpn via tcp instead udp)
        Source: type > lan subnet

        Destination: type > Wan address
        Destination port range: openvpn's listening port

        Hope this helps.

        1 Reply Last reply Reply Quote 0
        • M
          mrbostn
          last edited by

          @bachi:

          Create a LAN firewall rule which blocks access to pfsense wan address and port that openvpn listens.

          Action: block

          Protocol: UDP (or tcp if you running openvpn via tcp instead udp)
          Source: type > lan subnet

          Destination: type > Wan address
          Destination port range: openvpn's listening port

          Hope this helps.

          It worked. :)

          Thank you. I should have thought of it.

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