This firewall script works fine in 2.4.26, it also works
on 2.6.7, except for DNAT redirection of ftp port 21 to another
host:
Is something else needed in 2.6, than 2.4 (nor using IPsec)
Thanks, Tonyb
Snipets of the script code:
These modules loaded at begining of script:
/sbin/insmod ip_tables.ko > /dev/null 2>&1
/sbin/insmod ip_conntrack.ko > /dev/null 2>&1
/sbin/insmod iptable_nat.ko > /dev/null 2>&1
/sbin/insmod iptable_filter.ko > /dev/null 2>&1
/sbin/insmod ipt_MASQUERADE.ko > /dev/null 2>&1
If DNAT enabled these are loaded:
# FTP
# Load a couple of modules only needed for ftp DNAT and
# Route incoming $EXTIF for ftp port 21, to $FTPHOST:21
#
if [ $KERNEL -lt 5 ]; then
/sbin/insmod ip_conntrack_ftp > /dev/null 2>&1
/sbin/insmod ip_nat_ftp > /dev/null 2>&1
else
/sbin/insmod ip_conntrack_ftp.ko > /dev/null 2>&1
/sbin/insmod ip_nat_ftp.ko > /dev/null 2>&1
fi
/bin/ping -c1 -w1 $FTPHOST > /dev/null 2>&1
if [ $? -eq 0 ]; then
$IPC -A PREROUTING -t nat -p tcp -i $EXTIF -d $EXTIP --dport
21 \ -j DNAT --to-destination $FTPHOST:21
fi
--
__ __ _ I N C.
http://www.sysdev.org
/ __|\\// __|| \ __ __ /
(E-Mail Removed)
\__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities
|___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers