iptables default rules
Hi again
Well I tried all the suggestions (Thanks) but still can't get default
NAT rules running under iptables.
I'm now trying to just get it working as a init.d startup script on a
standard debian/testing system.
If I just execute the 2 commands as root it works fine but it never
seems to be there after a reboot. I might be missing something obvious.
Did I mention a ADSL PPP connection on boot....
/etc/init.d/firewall (-rwxr-xr-x 1 root root 312 Mar 14 23:31 firewall)
--------------------
#! /bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
case "$1" in
start)
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 1494 -j DNAT
--to-destination 10.0.2.110
/sbin/iptables -t nat -A PREROUTING -p udp --dport 1604 -j DNAT
--to-destination 10.0.2.110
;;
stop)
;;
esac
exit 0
----------------------
Symbolic links set up using update-rc.d as follows, I did 'mv' the
filenames from S20.. to S99.. in case there was a sequence confict.
/etc/rc0.d/K20firewall
/etc/rc1.d/K20firewall
/etc/rc2.d/S99firewall
/etc/rc3.d/S99firewall
/etc/rc4.d/S99firewall
/etc/rc5.d/S99firewall
/etc/rc6.d/K20firewall
Kind regards
Glenn Hocking
Publish Media Pty Ltd
http://www.sitegeneral.com/
Reply to: