diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-17 23:26:39 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-17 23:28:29 +0200 |
commit | be9aab6f55a2f9188b913cc54ecdb61bbcf8f9ab (patch) | |
tree | d5a6145308b4f5c505471287f9fc681cf213c3d4 | |
parent | e2cb3efab50561d764bc55a28333c3fade5790c9 (diff) |
Allow VPN access from everywhere (including WAN, excluding Isolated)
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 1436a5f..f381274 100644 --- a/src/main.rs +++ b/src/main.rs @@ -108,6 +108,15 @@ fn filter() -> Result<()> { .accept(); batch.add(&allow_wan_dhcpv6, MsgType::Add); + let deny_isolated_vpn = Rule::new(&input)? + .iface("eth0.30")? + .dport(51820, Protocol::UDP) + .drop(); + batch.add(&deny_isolated_vpn, MsgType::Add); + + let allow_any_vpn = Rule::new(&input)?.dport(51820, Protocol::UDP).accept(); + batch.add(&allow_any_vpn, MsgType::Add); + let deny_wan = Rule::new(&input)?.iface("ppp0")?.drop(); batch.add(&deny_wan, MsgType::Add); |