I put a collection of bash scripts (containing all my iptables and ip and other configuration commands) in a unique directory that I can use at bootup. I have a shorter bash script that invokes those specific bash scrips from the startup process.
Specifically, at /etc/rc.d/rc2.d/ (and at .../rc3.d/..., .../rc4.d/... and .../rc5.d/...) I have a script named S11dwt that contains the following commands:
#!/bin/bash
pushd . &>/dev/null
cd /etc/sysconfig/network-scripts/DWT
bash Kernel
bash Firewall
bash NICs
bash Routes
popd &>/dev/null
The four referenced scripts set certain Kernel configuration parameters, setup the Firewall iptables chains, enable the NICs, and then establish the Routes.
Hope this helps...most Linux documentation is written for people who already know how to do things, so it can be hard to ferret out simple things like this.
--Carol Anne
Carol Anne Ogdin | http://www.net-working.com | 530/295-3657 |
Deep Woods Technology, Inc. | http://www.deepwoods.com | CAOgdin@deepwoods.com |
Leveraging technology to restore the soul of the organization |
Message: 2
From: "Brian Bunnell" <bbunnell@iastate.edu>
To: <netfilter@lists.netfilter.org>
Subject: Start Up Script
Date: Sun, 2 Mar 2003 12:43:02 -0600
Hello
Thank you very much for helping me. I have a perfectly good netfilter
script that I run from the command line and everything works fine. I would
like this script to run when I boot up the computer. I am having a lot of
trouble finding quality resources on the net about this.
There are great resources for learning how to use netfilter. However, when
it comes to startup scripts, all the examples seem to be 25 pages long and
incomprehensible or wnat me to completely rewrite the script I already have.
Why can't I just tell the computer to run my script instead of the "Let the
world in" script it runs at boot?
Does anyone have any recommendations, resources or better yet, a good
concise example for run level 3?
Thank you very much
Brian Bunnell
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/03