public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel <danny@ilievnet.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  iptables wiki
Date: Wed, 05 Jul 2006 13:03:42 +0300	[thread overview]
Message-ID: <44AB8E7E.1090005@ilievnet.com> (raw)
In-Reply-To: <loom.20060705T015933-644@post.gmane.org>

james wrote:
> Hello,
> 
> I'm attempting to follow this wiki to build a test firewall running iptables:
> http://gentoo-wiki.com/HOWTO_Iptables_for_newbies#QuickStart
> 
> Kernel is 'hardened' with netfilter et al activated.
> 
> It looks reasonable and is suppose to be up to date.
> 
> My nics are set up in /etc/conf.d/net
> iface_eth0="192.168.2.20 broadcast 192.168.2.255 netmask 255.255.255.0"
> iface_eth1="192.168.3.11 broadcast 192.168.3.255 netmask 255.255.255.0"
> iface_eth2="<snipped>  broadcast <snipped> netmask 255.255.255.252"
> routes_eth2=( "default gw <snipped>" )
> 
> All work fine.
> 
> port forwarding is enabled:
> 
> Rulesets get saved to /var/lib/iptables/rules-save
> As specificed in /etc/conf.d/iptables
> and 
> /etc/init.d/iptables is the script that launces iptables
> plus  rc-update add iptables default
> 
> I think all of this is correct(correct me if I'm wrong).
> 
> When I go to /etc/init to write my rules into firewall.sh
> as specified in the aforementioned wiki I automatically get
> this shoved into the script:
> 
> #!/sbin/runscript
> # Copyright 1999-2006 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
> depend() {
> }
> start() {
> }
> stop() {
> }
> restart() {
> }
> 
> 
> 
> curiously none of the example talk about this.
> 
> Is this the correct place to put my script(/etc/init.d/, 
> which is somewhat similar to the one suggested in the
> wiki?
> 
> 
> None of the examples I found googling discuss the details of where to put
> the script, how to launch it and other such details. Any suggestion
> are welcome. I have found lots of  example scripts similar to my 3 nic
> net/lan/dmz setup though.
> 
> Any suggestions are very welcome.
> 
> James
> 
> 
> 
> 

Actually IMHO gentoo has internal mechanism for dealing with iptables rules.

After you are ready and sure the rules work OK, you do:

1) /etc/init.d/iptables save

This would record your rules in /var/lib/iptables/rules-save as you
issued the command "iptables-save > /var/lib/iptables/rules-save" ]


Then you put iptables in the init sequence so the rules are restored at
every system start:

2) rc-update add iptables default

This would do "iptablebs-restore < /var/lib/iptables/rules-save" at
every boot.


3) Additionally you can set some parameters in /etc/conf.d/iptables


Hope This Helps

--
Best regards
Daniel

-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-07-05 10:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05  3:07 [gentoo-user] iptables wiki james
2006-07-05 10:03 ` Daniel [this message]
2006-07-05 15:28   ` [gentoo-user] " James
2006-07-05 16:22     ` Richard Fish
2006-07-05 18:30       ` James
2006-07-05 19:55         ` Richard Fish
2006-07-05 16:32     ` Dale
2006-07-05 16:45       ` James
2006-07-05 17:27         ` Dale
2006-07-05 18:36           ` Steve Wilson
2006-07-06  1:59             ` Dale
2006-07-06  7:37               ` Neil Bothwick
2006-07-06  8:22                 ` [gentoo-user] march in /etc/make.conf Pawel K
2006-07-06  8:35                   ` Dirk Heinrichs
2006-07-06  9:27                     ` Alexander Skwar
2006-07-06  9:46                       ` Dirk Heinrichs
2006-07-06  9:50                       ` Uwe Thiem
2006-07-06 10:13                         ` Alexander Skwar
2006-07-21 11:51                           ` Enrico Weigelt
2006-07-06  8:36                   ` Janusz Bossy
2006-07-21 11:56                     ` Enrico Weigelt
2006-07-06  9:26                   ` Alexander Skwar
2006-07-06 10:29                     ` Neil Bothwick
2006-07-11  1:03                 ` [gentoo-user] Re: iptables wiki Dale

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=44AB8E7E.1090005@ilievnet.com \
    --to=danny@ilievnet.com \
    --cc=gentoo-user@lists.gentoo.org \
    /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