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

    How do I ensure that an OpenVPN client is running so if the connection breaks there is no internet access?

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 2 Posters 289 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.
    • T
      TiferMendos
      last edited by

      I'm trying to setup server that uses a OpenVPN client. But I realized that just terminating a few services related to openvpn on the debian system "leaks" the IP.

      Say the server is going offline, my vpn subscription is being churned or some human mistake by my end. That will probably kill the connection and in turn expose my own IP to the service I'm connecting to.

      How can I ensure that if the OpenVPN client connection is failing, the internet is inaccessible?

      1 Reply Last reply Reply Quote 0
      • Y
        yumcheese
        last edited by

        I think there should be an option on the client settings to force all traffic through the tunnel. Maybe this will help:
        https://forum.netgate.com/topic/135500/force-lan-traffic-through-openvpn-tunnel

        Not sure if that stops Internet if the tunnel is down. Maybe you can try a firewall rule to block outbound traffic to the WAN and only allow traffic over the OpenVPN firewall rules.

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