home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 16 / hacker16 / 16_HACKER16.ISO / linux / tpm-security-server-1.2.1.iso / etc / rc.d / init.d / iptables < prev    next >
Encoding:
Text File  |  2004-01-27  |  624 b   |  31 lines

  1. #!/bin/sh
  2.  
  3. . /etc/rc.d/init.d/functions
  4.  
  5. if [ ! -x /etc/sysconfig/iptables ]; then
  6.     echo "/etc/sysconfig/iptables does not exist.  Will not activate filtering"
  7.     exit 0
  8. fi
  9.  
  10. CONFIG=/etc/sysconfig/iptables
  11.  
  12. if [ ! -x /usr/sbin/iptables ]; then
  13.         exit 0
  14. fi
  15.  
  16.  
  17. modprobe iptable_filter
  18. modprobe ip_conntrack
  19.  
  20. echo "Applying firewall rules..."
  21. grep -v "^[[:space:]]*#" $CONFIG | /usr/sbin/iptables-restore -c
  22.  
  23.  
  24. #Commmand line reminders
  25. #iptables -A INPUT 
  26. #iptables -A OUTPUT  -p tcp -j ACCEPT
  27. #iptables -A OUTPUT  -p tcp -j ACCEPT
  28. #iptables -A OUTPUT -s 192.168.1.1/32 -p tcp -j ACCEPT
  29. #
  30. #ip-sysctl sets the state table size
  31.