#! /bin/sh
#  1firewall -- plugs holes in the packet filtering firewall created by 
#               its sister script in /etc/ppp/ip-up.d/

# The ip-up.d firewall script directs all packets for the ${PPP_IPPARAM}
# connection on ${PPP_IFACE} to a special purpose input and output chain
# and adds the desired rules.  Here we just have to tear down those two
# chains.


I=${PPP_IPPARAM}-${PPP_IFACE}-in
O=${PPP_IPPARAM}-${PPP_IFACE}-out

/sbin/iptables --flush $I
/sbin/iptables --flush $O

/sbin/iptables --delete INPUT  -i ${PPP_IFACE} --jump $I
/sbin/iptables --delete OUTPUT -o ${PPP_IFACE} --jump $O

/sbin/iptables --delete-chain $I
/sbin/iptables --delete-chain $O
