Skip to Content
Linux Firewalls, Third Edition
book

Linux Firewalls, Third Edition

by Steve Suehring, Robert Ziegler
September 2005
Intermediate to advanced
552 pages
13h 30m
English
Sams
Content preview from Linux Firewalls, Third Edition

iptables Firewall for a Standalone System from Chapter 4

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" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Firewalls

Linux Firewalls

Michael Rash

Publisher Resources

ISBN: 0672327716Purchase book