3 # firewall-masq This script sets up firewall rules for a machine
4 # acting as a masquerading gateway
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.
10 # Interface to Internet
15 ipchains -P input ACCEPT
16 ipchains -P output ACCEPT
17 ipchains -P forward DENY
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
28 ipchains -A forward -j MASQ
29 echo 1 > /proc/sys/net/ipv4/ip_forward