I made a script that executes my iptables configurating like this:
1. create a new file in /etc/init.d (my file is named "nat") This will be your init script.
2. edit my init script below so that the path points to your wireless script (my script path is "/scripts/nat")
3. paste the modified init script in your init script on your machine.
4.
# rc-update add nat default (replace nat with your init script name)
5. reboot
My init script:
Code:
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-firewall/shorewall/files/shorewall,v 1.4 2004/03/04 19:20:40 vapier Exp $
opts="start stop restart"
depend() {
before local
}
start() {
ebegin "Starting NAT"
/scripts/nat
eend $?
}
stop() {
ebegin "Stopping NAT"
/scripts/natstop
eend $?
}
restart() {
ebegin "Restarting NAT"
/scripts/nat
eend $?
}
In my init script this will run "/scripts/nat" when the system boots and "/scripts/natstop" when shutting down. You could prob use the same script for start, stop, and restart. See if this works for you.