From: "John A. Sullivan III" <jsullivan@opensourcedevel.com>
To: Paul Lewis <paul.lewis@st-annes.oxford.ac.uk>
Cc: lartc@mailman.ds9a.nl, netfilter@lists.netfilter.org
Subject: Re: Simple routing configuration
Date: Sat, 24 Dec 2005 13:32:02 -0500 [thread overview]
Message-ID: <1135449122.2584.2.camel@localhost> (raw)
In-Reply-To: <E1EqDrd-00062I-00@smtp0.herald.ox.ac.uk>
On Sat, 2005-12-24 at 18:11 +0000, Paul Lewis wrote:
> Hi,
>
> I have a simple question (well, at least I think it's simple!). I have a
> router, with four Ethernet cards; eth0-eth3. eth0 and eth3 are the
> 'external' cards, connecting to my ISPs. eth1 and eth2 are connected to my
> internal networks. What I want to do is basically filter all the traffic
> from one card to another, in this configuration:
> eth1 to eth3
> eth2 to eth0
>
> The thing is, I'm not sure if this is a routing or a firewall problem, or
> maybe a bit of both? I've tried setting up the routing using ip route, using
> the command below, but to no avail. When I used these commands, I did not
> change any of my existing firewall configuration. Here are the ip route
> commands:
>
> echo "101 ISP_1" >> /etc/iproute2/rt_tables
> echo "102 ISP_2" >> /etc/iproute2/rt_tables
>
> ip route add 192.168.4.0/22 dev eth2 src 192.168.7.253 table ISP_1
> ip route add default via 192.168.100.253 table ISP_1
> ip route add 192.168.0.0/22 dev eth1 src 192.168.3.253 table ISP_2
> ip route add default via 192.168.20.253 table ISP_2
>
> ip rule add from 192.168.7.253 table ISP_1
> ip rule add from 192.168.3.253 table ISP_2
>
> I also tried a simple iptables forward command, in the form of:
>
> iptables -A FORWARD -i eth0 -o eth2 -j ACCEPT
> iptables -A FORWARD -i eth2 -o eth0 -j ACCEPT
> iptables -A FORWARD -i eth1 -o eth3 -j ACCEPT
> iptables -A FORWARD -i eth3 -o eth1 -j ACCEPT
>
> # default policy
> iptables -P FORWARD DROP
>
> In both cases, I have set /proc/sys/net/ipv4/ip_forward to "1".
>
<snip>
After a quick look, I would guess you need to use the iif selector for
your rules (Inbound InterFace). There is a training slide show about
this in the training section of the ISCS network security management
project web site (http://iscs.sourceforge.net) or you can look in the
ip-cref.ps file that shipped with your distribution. On my FC4, it
is /usr/share/doc/iproute-2.6.11/ip-cref.ps. Hope this helps - John
--
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan@opensourcedevel.com
Financially sustainable open source development
http://www.opensourcedevel.com
next prev parent reply other threads:[~2005-12-24 18:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-24 18:11 Simple routing configuration Paul Lewis
2005-12-24 18:32 ` John A. Sullivan III [this message]
2005-12-24 18:34 ` Networking question Dave Beach
2005-12-24 18:53 ` John A. Sullivan III
2005-12-24 18:56 ` /dev/rob0
2005-12-24 18:58 ` Edmundo Carmona
2005-12-24 19:02 ` Dave Beach
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=1135449122.2584.2.camel@localhost \
--to=jsullivan@opensourcedevel.com \
--cc=lartc@mailman.ds9a.nl \
--cc=netfilter@lists.netfilter.org \
--cc=paul.lewis@st-annes.oxford.ac.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