Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Help: Block LAN PC Access to WAN when VPN is Down

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 3 Posters 1.1k 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.
    • W Offline
      White Widow
      last edited by

      I currently have pfSense configured with WAN (WAN_DHCP), LAN, and OpenVPN interfaces.  The OpenVPN connection is to my commercial VPN provider Private Internet Access (PIAVPN_VPNV4).  The WAN interface is setup as the default gateway.

      I am trying to setup the firewall rules so that traffic from one specific LAN PC (192.168.1.11) will always get routed to the OpenVPN gateway (PIA_VPN) and if that interface goes down or becomes unavailable, traffic from that LAN PC to the WAN will be blocked or rejected.

      As currently configured, everything works great EXCEPT for when the OpenVPN goes down.  When that happens, traffic from the designated LAN PC starts moving over the WAN interface.

      Any help adjusting the configuration is appreciated!

      My firewall and NAT rules are attached:

      ![NAT Rules.JPG](/public/imported_attachments/1/NAT Rules.JPG)
      ![NAT Rules.JPG_thumb](/public/imported_attachments/1/NAT Rules.JPG_thumb)
      ![Firewall Rules.jpg_thumb](/public/imported_attachments/1/Firewall Rules.jpg_thumb)
      ![Firewall Rules.jpg](/public/imported_attachments/1/Firewall Rules.jpg)

      1 Reply Last reply Reply Quote 0
      • C Offline
        ConfusedUser
        last edited by

        I guess your "block" rule will never fire. You set up logging for it but I expect you will never see a log entry for it.
        What you are doing is policy based routing that means the gateway is not part of the evaluation - it is rather part of the execution of the rule. So unless I'm wrong your first "allow" rule will always catch the traffic for 192.168.1.11 and the second "block" rule will never fire.

        1 Reply Last reply Reply Quote 0
        • W Offline
          White Widow
          last edited by

          Thanks - yeah, the block rule is definitely not kicking in.

          What can I do then to affect the setup I'm looking for?  How to "force" all the traffic from the single IP address (192.168.1.11) to only use the VPN gateway and NEVER go over the WAN gateway?

          Thanks,
          Aaron

          1 Reply Last reply Reply Quote 0
          • C Offline
            cmb
            last edited by

            That block rule will never match. Setting the box under System>Advanced to skip rules for which a gateway is down would accomplish that, though take the gateway out of the block rule.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
            Privacy Policy · Cookie Policy