From: "Michael J. Tubby B.Sc. \(Hons\) G8TIC" <mike.tubby@thorcom.co.uk>
To: Zander Subatomic <zander@subatomic.org.uk>,
netfilter@lists.netfilter.org
Subject: Re: firewall script placement
Date: Sun, 19 Jan 2003 19:30:49 -0000 [thread overview]
Message-ID: <001001c2bff1$45db51e0$0a90a8c0@boris> (raw)
In-Reply-To: 00d601c2bfbb$4d85a930$0401a8c0@darthvader
> ok this may sound like a silly question but where do I put the script?? I'm
> running 7.3 RedHat and before I used to just write the script in a file and
> then copy & paste it into a command line for the initial creation and then
> use the iptables-save to /etc/sysconfig/iptables which worked fine for it to
> be loaded on a reboot. Now I have a larger, more complex rule set I thought
> I'd finall write a script for it but I've only got a slight understanding of
> the start up process.
>
> Do I need to put the script in the /etc/rc.d/init.d/ directory and then
> create the startup/kill links in the /etc/rcX.d/ directories by hand or can
> I just put a:
>
> # chkconfig: 2345 <one above iptables start number> <one below iptables kill
> number>
>
> Could I change the line: IPTABLES_CONFIG=/etc/sysconfig/iptables in
> /etc/rc.d/init.d/iptables script to my script? I'm assuming though it would
> have to be in the format of the iptables-save command so wouldn't work? I
> have looked around the place and previous posts but have never seen this
> mentioned.
>
> Or am I way of the mark? :o)
>
> cheers
>
> Zander
>
Zander,
I use a homebrew iptables based firewall script on all my RH 7.2, 7.3
and 8.0 machines which is based on Oskar's tutorial and good work
as its much more flexible than the built-in systems...
I call the script "rc.firewall" and keep it in /etc/rc.d as its a bit non-standard
like rc.local and then cd to /etc/rc.d/rc3.d and hack things a little by
removing S07/08/09 ipchains/iptables stuff, and adding a symbolic
link:
ln -s ../rc.firewall S11firewall
so that the start up sequence ends up looking something like this:
S05kudzu -> ../init.d/kudzu
S06reconfig -> ../init.d/reconfig
S10network -> ../init.d/network
S11firewall -> ../rc.firewall
S12syslog -> ../init.d/syslog
S18autofs -> ../init.d/autofs
S20apcupsd -> ../init.d/apcupsd
S20random -> ../init.d/random
S25netfs -> ../init.d/netfs
S35identd -> ../init.d/identd
S40atd -> ../init.d/atd
S50xinetd -> ../init.d/xinetd
S55named -> ../init.d/named
S55sshd -> ../init.d/sshd
S56ntpd -> ../init.d/ntpd
S56rawdevices -> ../init.d/rawdevices
S65dhcpd -> ../init.d/dhcpd
S75keytable -> ../init.d/keytable
S80courier-imap -> ../init.d/courier-imap
S80exim -> ../init.d/exim
S80spamassassin -> ../init.d/spamassassin
S85httpd -> ../init.d/httpd
S90crond -> ../init.d/crond
S90squid -> ../init.d/squid
S95anacron -> ../init.d/anacron
S99local -> ../rc.local
Something like this should work for you also....
Mike
next prev parent reply other threads:[~2003-01-19 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-19 13:04 firewall script placement Zander Subatomic
2003-01-19 19:30 ` Michael J. Tubby B.Sc. (Hons) G8TIC [this message]
2003-01-19 23:57 ` Zander Subatomic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001c2bff1$45db51e0$0a90a8c0@boris' \
--to=mike.tubby@thorcom.co.uk \
--cc=netfilter@lists.netfilter.org \
--cc=zander@subatomic.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox