Currently, I have to do the following process manually, using the Mandrake
Config tools in X-Windows. It takes me about 20 minutes. Can you guys help
me figure out a script for the following:
- flush all IPtables rules (so the packet filters are not active)
- switch eth0 from a static IP to DHCP
- receive a DHCP IP address
- run a Perl Script that I have already
- switch eth0 back to a static IP
- restart my firewall.sh script to setup my packet filters again
I want to do the above on a nightly basis. In Windows 2K, I would write a
batch file (using the netsh.exe command) and have the Scheduler service run
the batch file nightly.
In Linux, the scripting and scheduling look much different.
BTW, this is a Mandrake 8.1 box, P][-266, 64mb RAM, 4gb HD, running no
server services (no apache or whatnot). It has 2 ethernet cards (eth0 and