[sclug] Firewalls

Tony Sumner whittycat at ntlworld.com
Sat Oct 25 09:05:31 UTC 2003


On Tue, Jan 14, 2003 at 01:38:39PM -0000, tim wrote:

> I am running Mandrake 8.2 and have installed it as a firewall but do not
> seem to have the /etc/sysconfig/iptables file. I do have
> /etc/rc.d/init.d/iptables which says it is a Startup script to implement
> /etc/sysconfig/iptables. So I guess I have to create that in a similar
> manner to rc.firewall.

In case this helps I have Red Hat 8.0 and my file /etc/sysconfig/iptables
contains this (intended to block all attacks; I don't offer a http or
ftp service):

# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
#       firewall; such entries will *not* be listed here.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -p udp -m udp -s 0/0 --sport 67:68 -d 0/0 --dport 67:68 -i eth0 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p udp -m udp -s 0/0 --sport 67:68 -d 0/0 --dport 67:68 -i eth1 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 --syn -j REJECT
COMMIT

HTH

Tony Sumner



More information about the Sclug mailing list