Per-interface (VPN) firewall rules - how?

Discussion in 'Windows 11' started by zlpx9CXRTuseQ52it8dP, Aug 14, 2026.

  1. zlpx9CXRTuseQ52it8dP

    Jul 8, 2026
    24
    3
    0
    There are many ways to create kill-switches for VPN connections in Windows. It can be done via VPN apps themselves, firewall IP ranges, metrics, etc., but the method I want to use is to create rules based on interface type or interface name, where interface name = VPN tunnel adapter name or some other identifier of VPN tunnel interface. Windows firewall control panel does not provide (or even show) VPN interface as a restriction. It only lists Local Area Network, Remote Access, and Wireless. VPN interface (even when already running) is never listed.

    I think there is a way to use PowerShell and/or CMD to create firewall rules and specify the exact interface type and/or name, but I don't know the syntax, and don't know whether VPN interface must be specified by name (tunnel adapter ID) or some other way... Interface/Adapter Index number/ID maybe? Can someone help?