home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- . /etc/rc.d/init.d/functions
-
- if [ ! -x /etc/sysconfig/iptables ]; then
- echo "/etc/sysconfig/iptables does not exist. Will not activate filtering"
- exit 0
- fi
-
- CONFIG=/etc/sysconfig/iptables
-
- if [ ! -x /usr/sbin/iptables ]; then
- exit 0
- fi
-
-
- modprobe iptable_filter
- modprobe ip_conntrack
-
- echo "Applying firewall rules..."
- grep -v "^[[:space:]]*#" $CONFIG | /usr/sbin/iptables-restore -c
-
-
- #Commmand line reminders
- #iptables -A INPUT
- #iptables -A OUTPUT -p tcp -j ACCEPT
- #iptables -A OUTPUT -p tcp -j ACCEPT
- #iptables -A OUTPUT -s 192.168.1.1/32 -p tcp -j ACCEPT
- #
- #ip-sysctl sets the state table size
-