summaryrefslogblamecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/pam/hooks/session-close.d/runvirt-firewall-clear
blob: 4fdd88abbd958a864b6d8a7bee4c4676d5f31bda (plain) (tree)
1
2
3

          
                               













                                         
#!/bin/ash

# Sourced as session-close hook

runvirt_fw_clear () {
	iptables -w -F runvirt-INPUT
	ip6tables -w -F runvirt-INPUT
	iptables -w -F runvirt-OUTPUT
	ip6tables -w -F runvirt-OUTPUT
}

if [ "x$PAM_TTY" = "x:0" ]; then
	runvirt_fw_clear > /dev/null 2>&1
fi

true