From: "Michael K" <micke@klintan.se>
To: netfilter@lists.netfilter.org
Subject: RE: Firewall Setup on RH 9
Date: Thu, 3 Jul 2003 10:07:24 +0200 [thread overview]
Message-ID: <000201c3413a$23328d50$c800a8c0@klintan.local> (raw)
In-Reply-To: <015201c3412d$992c0ac0$660210ac@christo>
-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Christo
Bezuidenhout
Sent: Thursday, July 03, 2003 8:38 AM
To: netfilter@lists.netfilter.org
Subject: Firewall Setup on RH 9
I need to do the following.
1. I have a Redhat 9 Box with Two nics. NIC1 is my Private Network. NIC2
is connected to my PPP0 interface for internet access. I need to add
NIC3 which will be second Private Network.
2. Both NIC1 and NIC3 Should be able to Connect VIA NIC2 to Internet.
NIC1 Should be able to connect to NIC3 but NIC3 must not be ABLE to
Connect to NIC1 's network
I have my network already setup as in 1 above and it working very well.
I'm using iptables to get this running.
Please mail me offline if more info needed or with a suggestion
Christo
Perhaps something like this.
NIC1=eth0
NIC2=ppp0
NIC3=eth1
modprobe ip_nat_ftp
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#Allow everything out to $NIC2
iptables -A FORWARD -o $NIC2 -j ACCEPT
#Accept only connections from $NIC1 to $NIC3
iptables -A FORWARD -i $NIC1 -o $NIC3 -j ACCEPT
iptables -t nat -A POSTROUTING -o $NIC2 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1
/Klintan
next prev parent reply other threads:[~2003-07-03 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-03 6:37 Firewall Setup on RH 9 Christo Bezuidenhout
2003-07-03 8:07 ` Michael K [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-07-01 8:04 Christo Bezuidenhout
2003-07-04 21:54 ` Michal Kepien
2003-07-05 5:35 ` Joel Newkirk
2003-07-05 7:30 ` Michal Kepien
2003-07-05 18:20 ` Joel Newkirk
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='000201c3413a$23328d50$c800a8c0@klintan.local' \
--to=micke@klintan.se \
--cc=netfilter@lists.netfilter.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