[Voyage-linux] Where is the appropriate place to place custom iptables rules

Yiorgos Adamopoulos (spam-protected)
Wed Apr 26 13:51:53 HKT 2006



Glenn Swonk wrote:
> I can't seem to find where to place any custom iptables rules.
>  
> Where would be the most appropriate place?
>  
> thanks,
>  
> glenn
> 

# remountrw
# cat > /etc/init.d/local.iptables

#!/bin/sh
case $1 in
'start')
	if [ -f /etc/iptables.saved ]; then
		iptables-restore < /etc/iptables.saved
	fi
	;;
'stop')
	;;
*)
	echo usage: `basename $0` '{start|stop}'
esac

ctrl-D

# chmod +x /etc/init.d/local.iptables
# update-rc.d local.iptables defaults 99
# iptables-save > /etc/iptables.saved
# reboot




More information about the Voyage-linux mailing list