Re: Firewall.routing configuration problems

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 20 Oct 2005 17:40:38 +0100 "Paul Lewis"
<paul.lewis@xxxxxxxxxxxxxxxxxxxxx> wrote:

>Hi,
hi

[cut]
>The students go out onto an academic connection (via
>eth0), and conference guests go out on an ADSL line (via eth3). eth1 and
>eth2 are configured for internal use.
ok.

>The firewall rules
>for routing packets to the correct ethernet device (conference guests to
>eth3 and students to eth0) are as follows:
>	iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE -o
>eth3
[cut]
You are mistaken here I think. This doesn't influence routing, only
masquerading. You are problably missing (in addition to what you have) policy
based routing, something like:

ip rule add from 192.168.0.0/22 table 10
ip rule add from 192.168.4.0/22 table 11
ip route add default via your_gateway_on_eth3 dev eth3 table 10
ip route add default via your_gateway_on_eth0 dev eth0 table 11

(in reality it is slightly more complicated, you need to add proper routes for
other subnets if you want them to be able to communicate with each other).

>Many thanks,
>
>Paul
Yours sincerely,
Peter

-- 
http://www.shurdix.org - Linux distribution for routers and firewalls
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux