3
# example /etc/ppp/ip-down.d script for use with ipppd and dynamic IP numbers.
4
# Edit / add to the entries to suit the requirements of the interface.
6
# Use the network to enable the IP dynamic hack to reset old connections.
7
# For a smaller set of dynamic numbers:
8
# PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*$,.0/24,'`
9
# in case your ISP has a large pool of dynamic numbers (should be OK):
10
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
13
ippp0) if route -n | grep '^0\.0\.0\.0' | grep -q " $PPP_IFACE" ; then
14
# only reset default route if the
15
# current default route is via this interface
17
# route add default netmask 0 $PPP_IFACE # usually necessary
18
route add default netmask 0 gw $PPP_REMOTE # usually necessary
20
# The next lines are for simple firewalling.
21
# See comments in /etc/isdn/device.* about firewalling!
22
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET 1000:
23
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ssh
24
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET smtp
25
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ident
26
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p UDP -d $PPP_NET 1024:
27
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p ICMP -d $PPP_NET
28
#ipchains -D input -j DENY -i $PPP_IFACE
30
# add more ipppX cases if you need them...