[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where do I put my ipchains commands....



On Wed, Apr 19, 2000 at 12:27:37AM -0500, w trillich wrote:
> Pollywog wrote:
> > 
> > On 18-Apr-2000 23:08:07 Bryan Scaringe wrote:
> > > --------------------------------------------------
> > >
> > > I then created links to this script in the appropriate rcX.d
> > > directories.
> > > rc.boot - none
> > > rc0.d - K42firewall
> > > rc1.d - K42firewall
> > > rc2.d - none
> > > rc3.d - none
> > > rc4.d - none
> > > rc5.d - none
> > > rc6.d - K42firewall
> > > rcS.d - S42firewall
> > 
> > I must be clueless.  I did something similar except that I put my
> > links in rc2.d rc3.d rc4.d and rc5.d but not in the other places.
> > I am confused by your approach.  Can someone explain what I am
> > missing?
> > 
> > To make things worse, the 2.4 kernels will not use ipchains, and now
> > I need to figure out NAT and some other stuff in order to use
> > iptables.
> 
> here's my understanding (if i'm off, someone please shoot me down
> quick)...

Taking aim....

...actually, you're pretty close, but just slightly off.

> init S -- single-user mode, i.e. first set of scripts run at startup
> from /etc/rcS.d/* to get the system up
> init 1-5 -- based on whatever's in /etc/rc#.d/S*

...or when you switch back to single-user mode from another.  A simple
"shutdown now" command (without an '-r' or '-h' option) takes the
system "down" to maintenance (single-user) mode.

> (as my 2.1 debian installed, runlevels 2-5 seem identical, based on the
> /etc/rc#.d/ script links. but this is for the sysadmin to play with
> if he/she so desires... different runlevels for, say, subadministrators
> to munge their areas, as a university might do after final exams...?)
> 
> within each /etc/rc#.d/ directory are links to scripts--
> the S* scripts (i.e. Start) are run when ENTERING a runlevel;
> the K* scripts (i.e. Kill) are run when EXITING that runlevel.

Not quite.  Both the S* and K* scripts are run on ENTERING a runlevel.
There is no "exiting" a runlevel -- you transition to a new runlevel and
execute the scripts there.  K* is run before S*, so first processes are
killed, then new processes are started.

You might want to see man (8) init and man (5) initscript as well.

-- 
Karsten M. Self <kmself@ix.netcom.com>           http:/www.netcom.com/~kmself
    What part of "Gestalt" don't you understand?
    http://gestalt-system.sourceforge.net/
GPG fingerprint: F932 8B25 5FDD 2528 D595  DC61 3847 889F 55F2 B9B0

Attachment: pgpavXhWfCido.pgp
Description: PGP signature


Reply to: