Linux Netfilter discussions
 help / color / mirror / Atom feed
* Start Up Script
@ 2003-03-02 18:43 Brian Bunnell
  2003-03-06 15:55 ` James A. Pattie
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Bunnell @ 2003-03-02 18:43 UTC (permalink / raw)
  To: netfilter

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Start Up Script
@ 2003-03-06 15:28 Carol Anne Ogdin
  0 siblings, 0 replies; 4+ messages in thread
From: Carol Anne Ogdin @ 2003-03-06 15:28 UTC (permalink / raw)
  To: Brian Bunnell; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3764 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Start Up Script
  2003-03-02 18:43 Start Up Script Brian Bunnell
@ 2003-03-06 15:55 ` James A. Pattie
  2003-03-06 17:36   ` Arnt Karlsen
  0 siblings, 1 reply; 4+ messages in thread
From: James A. Pattie @ 2003-03-06 15:55 UTC (permalink / raw)
  To: Brian Bunnell; +Cc: netfilter

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Bunnell wrote:
> 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?

If you are on a chkconfig/sysv system just add the necessary chkconfig
entries to the top of your script, drop it in /etc/init.d and chkconfig
{script name} on.  Make sure you disable the iptables scripts if on a
redhat box.

The PCX Firewall project will generate a redhat init script.
http://pcxfirewall.sf.net/  Use that for examples on how to modify your
script.


- --
James A. Pattie
james@pcxperience.com

Linux  --  SysAdmin / Programmer
Xperience, Inc.
http://www.pcxperience.com/
http://www.xperienceinc.com/

GPG Key Available at http://www.pcxperience.com/gpgkeys/james.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+Z29xtUXjwPIRLVERAph1AKCm9hDscA7l/fgnoVf2vg5TvzGVngCfRdGJ
tWrFpueX8wJ4AVpZ7Jw+MC0=
=mimX
-----END PGP SIGNATURE-----


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Start Up Script
  2003-03-06 15:55 ` James A. Pattie
@ 2003-03-06 17:36   ` Arnt Karlsen
  0 siblings, 0 replies; 4+ messages in thread
From: Arnt Karlsen @ 2003-03-06 17:36 UTC (permalink / raw)
  To: netfilter

On Thu, 06 Mar 2003 09:55:30 -0600, 
"James A. Pattie" <james@pcxperience.com> wrote in message 
<3E676F72.1060702@pcxperience.com>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Brian Bunnell wrote:
> > 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?
> 
> If you are on a chkconfig/sysv system just add the necessary chkconfig
> entries to the top of your script, drop it in /etc/init.d and
> chkconfig{script name} on.  Make sure you disable the iptables scripts
> if on a redhat box.
> 
> The PCX Firewall project will generate a redhat init script.
> http://pcxfirewall.sf.net/  Use that for examples on how to modify
> your script.

..the classic bsd approach is move your script to /etc/rc.d/rc.firewall 
and call it from /etc/rc.d/rc.local, just before rc.local runs you
online at boot time.

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-06 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-02 18:43 Start Up Script Brian Bunnell
2003-03-06 15:55 ` James A. Pattie
2003-03-06 17:36   ` Arnt Karlsen
  -- strict thread matches above, loose matches on Subject: below --
2003-03-06 15:28 Carol Anne Ogdin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox