From: "Sadus ." <sadus@swiftbin.net>
To: Tib <tib@tigerknight.org>
Cc: netfilter@lists.netfilter.org
Subject: Re: Hi!
Date: Sat, 11 Jun 2005 20:56:32 +0300 [thread overview]
Message-ID: <1118512593.18567.6.camel@debianbox> (raw)
In-Reply-To: <Pine.LNX.4.53.0506111202260.9775@altaica>
I usually block only in the INPUT chain, doesn't it protect my internal
network?
I only have SNATed the internal network to the external IP/
On Sat, 2005-06-11 at 12:16 -0500, Tib wrote:
> Hi there,
>
> Thought I'd chip in since this used to be identical to how I had my system
> setup. I had a block of 5 useable from my isp.
>
> Whichever you are going to use as your actual firewall box IP (as opposed
> to the machines you want to run behind it), you set as eth0 ip config.
>
> After that you setup the other ip's as virtual interfaces on the same card
> (eth0:1, eth0:2, etc). Set your internal IP nic to be eth1 and make sure
> the routing table is set to go through it out to eth0 and the world. Have
> your other internal IP boxes use eth1 as their gateway.
>
> After that, you setup destniation nat'ing using something like this:
>
> iptables -t nat -A PREROUTING -d $REAL-IP$ \
> -j DNAT --to-destination $INTERNAL-IP$
>
> and
>
> iptables -t nat -A POSTROUTING -s $INTERNAL-IP$ \
> -j SNAT --to-source $REAL-IP$
>
> for each internal/ip pair you want to have mapped.
>
> After you've done this - you're likely going to want to protect them from
> certain types of traffic, since the basic INPUT rules won't cover it - put
> anything you DON'T want to reach those hosts under the FORWARD ruleset as
> drops.
>
> That's it - you're set.
>
> One item of note - be sure to put those snat/dnat rules into the table
> BEFORE the catchall masquerading rule (if you use one) otherwise they will
> hit the masquerade rule first and your traffic will not match in/out ip's
> and things will bork up.
>
> This is a setup I've used for a number of years, it's nice and clean and
> gives good protection through the forward ruleset. If you cover your bases
> right and practice safe net, things like zone alarm become unnecessary.
>
> I blocked the following on forward and have done very well by it:
>
> udp:
> 111
> 135
> 137
> 138
> 139
> 445
> 1026
> 1433
>
> tcp:
> 21
> 57
> 79
> 80
> 111
> 135
> 137
> 138
> 139
> 443
> 445
> 1025
> 1026
> 1433
> 5000
> 31337
>
> These will vary depending on your particular software usage and such - but
> are a good start.
>
> <EOL>
> Tib
>
> On Sat, 11 Jun 2005, Billie Joe wrote:
>
> > Hi!
> >
> >
> > I have 3 IPs on Internet, and I want to put them behind my firewall
> > machine. So I have the question: Put all 3 IPs in the same network
> > card (with alias) or a card for each IP ?? What you suggest and why ??
> > Thanks
> >
> >
> > pS.: Consider that I have another NIC for my LAN.
> >
> >
> > BillieGDJoe
> >
>
--
Sadus . <sadus@swiftbin.net>
Swiftbin.net
next prev parent reply other threads:[~2005-06-11 17:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-11 17:00 Hi! Billie Joe
2005-06-11 17:16 ` Hi! Tib
2005-06-11 17:56 ` Sadus . [this message]
2005-06-11 18:21 ` Hi! Tib
2005-06-11 18:22 ` Hi! Tib
2005-06-12 23:48 ` Hi! Ian Laurie
2005-06-13 0:26 ` Hi! Tib
2005-06-13 0:55 ` Hi! Ian Laurie
[not found] ` <1118623895l.11527l.1l@server.moose.blogdns.org>
2005-06-13 1:09 ` Hi! Tib
2005-06-13 1:27 ` FORWARD rules or not? (was: Re: Hi!) /dev/rob0
2005-06-13 1:47 ` Tib
2005-06-13 18:05 ` /dev/rob0
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=1118512593.18567.6.camel@debianbox \
--to=sadus@swiftbin.net \
--cc=netfilter@lists.netfilter.org \
--cc=tib@tigerknight.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