September 2005
Intermediate to advanced
552 pages
13h 30m
English
Chapter 4 covers the application protocols and firewall rules for the types of services most likely to be used on an individual, standalone Linux box. Additionally, both client and server rules are presented for services that not everyone will use. The complete iptables firewall script, as it would appear in /etc/rc.d/rc.firewall or /etc/init.d/firewall, follows:
#!/bin/sh /sbin/modprobe ip_conntrack_ftp CONNECTION_TRACKING="1" ACCEPT_AUTH="0" SSH_SERVER="0" FTP_SERVER="0" WEB_SERVER="0" SSL_SERVER="0" DHCP_CLIENT="1" IPT="/sbin/iptables" # Location of iptables on your system INTERNET="eth0" # Internet-connected interface LOOPBACK_INTERFACE="lo" # however your system names it IPADDR="my.ip.address" ...