home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 16 / hacker16 / 16_HACKER16.ISO / linux / tpm-security-server-1.2.1.iso / archive / etc / ppp / firewall-standalone < prev    next >
Encoding:
Text File  |  2004-01-29  |  836 b   |  34 lines

  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. # LIC: GPL
  10.  
  11. # Interface to Internet
  12. EXTIF=ppp+
  13.  
  14. ANY=0.0.0.0/0
  15.  
  16. ipchains -P input ACCEPT
  17. ipchains -P output ACCEPT
  18. ipchains -P forward DENY
  19.  
  20. ipchains -F forward
  21. ipchains -F input
  22. ipchains -F output
  23.  
  24. # Deny TCP and UDP packets to privileged ports
  25. ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENY
  26. ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY
  27.  
  28. # Deny TCP connection attempts
  29. ipchains -A input -l -i $EXTIF -p tcp -y -j DENY
  30.  
  31. # Deny ICMP echo-requests
  32. ipchains -A input -l -i $EXTIF -s $ANY echo-request -p icmp -j DENY
  33.  
  34.