Public
Snippet $29863 authored by Fredrik Rambris

Kill transmisson-daemon and clear iptables upon tunnel shutdown

down.sh
#!/bin/sh
#set -x
# Make sure we don't leak untunneled packages
/usr/bin/systemctl stop transmission-daemon.service || /bin/true
/usr/bin/killall --user transmission || /bin/true

# Clear tables again
for IPTABLES in /usr/sbin/iptables /usr/sbin/ip6tables ; do
	$IPTABLES -F INPUT
	$IPTABLES -t mangle -F OUTPUT
	$IPTABLES -t nat -F POSTROUTING
done