From a0a5c14f8525a2885e985b56d8ac360358b4c726 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 1 Mar 2014 16:44:05 +0100 Subject: [PATCH] firewall: Make sure that only packets that go through the tunnel are passing OVPNBLOCK. --- src/initscripts/init.d/firewall | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/initscripts/init.d/firewall b/src/initscripts/init.d/firewall index de2a04b7d..dd6788937 100644 --- a/src/initscripts/init.d/firewall +++ b/src/initscripts/init.d/firewall @@ -106,9 +106,10 @@ iptables_init() { # Block OpenVPN transfer networks iptables -N OVPNBLOCK - for i in INPUT FORWARD; do - iptables -A ${i} -j OVPNBLOCK - done + iptables -A INPUT -i tun+ -j OVPNBLOCK + iptables -A OUTPUT -o tun+ -j OVPNBLOCK + iptables -A FORWARD -i tun+ -j OVPNBLOCK + iptables -A FORWARD -o tun+ -j OVPNBLOCK # OpenVPN transfer network translation iptables -t nat -N OVPNNAT -- 2.39.2