OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / rp-pppoe / firewall-standalone
1 #!/bin/sh
2 #
3 # firewall-standalone   This script sets up firewall rules for a standalone
4 #                       machine
5 #
6 # Copyright (C) 2000 Roaring Penguin Software Inc.  This software may
7 # be distributed under the terms of the GNU General Public License, version
8 # 2 or any later version.
9
10 # Interface to Internet
11 EXTIF=ppp+
12
13 ANY=0.0.0.0/0
14
15 ipchains -P input ACCEPT
16 ipchains -P output ACCEPT
17 ipchains -P forward DENY
18
19 ipchains -F forward
20 ipchains -F input
21 ipchains -F output
22
23 # Deny TCP and UDP packets to privileged ports
24 ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENY
25 ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY