Linux Netfilter discussions
 help / color / mirror / Atom feed
* Simple routing configuration
@ 2005-12-24 18:11 Paul Lewis
  2005-12-24 18:32 ` John A. Sullivan III
  2005-12-24 18:34 ` Networking question Dave Beach
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Lewis @ 2005-12-24 18:11 UTC (permalink / raw)
  To: lartc, netfilter

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".

Any help would be greatly appreciated.

Many thanks,

Paul

---
Paul Lewis (paul.lewis@st-annes.ox.ac.uk)
Part II Student
Materials Science
University of Oxford






^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <65aa6af90512241106v5e49da74jc54fa7821960ed28@mail.gmail.com>]

end of thread, other threads:[~2005-12-24 20:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-24 18:11 Simple routing configuration Paul Lewis
2005-12-24 18:32 ` John A. Sullivan III
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
     [not found] <65aa6af90512241106v5e49da74jc54fa7821960ed28@mail.gmail.com>
2005-12-24 19:09 ` Dave Beach
2005-12-24 19:17   ` Edmundo Carmona
2005-12-24 20:00     ` Dave Beach
2005-12-24 20:16       ` Edmundo Carmona

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox