[LARTC] ip rule problems ...

Linux Advanced Routing and Traffic Control

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

 



Please forgive me if this seems like a foolish enquiry but I can't get
my iproute2 to work.

Here's my ip tables

#ip rule ls
0:	from all lookup local 
32765:	from all iif eth0 lookup pixforward2 
32766:	from all lookup main 
32767:	from all lookup default 

#ip route ls table pixforward2
default via 212.74.13.1 dev eth1  proto static 

#ip route ls table main
212.74.13.0/30 dev eth1  proto kernel  scope link  src 212.74.13.2 
192.168.1.0/24 dev eth2  proto kernel  scope link  src 192.168.1.2 
192.168.1.0/24 dev ipsec0  proto kernel  scope link  src 192.168.1.2 
192.168.200.0/24 dev eth0  proto kernel  scope link  src 192.168.200.2 
default via 212.74.13.1 dev eth1 

What I'm trying to do is get packets appearing on eth0 to default to
212.74.13.1 and other traffic to default to 192.168.1.1. I want to do
this by changing the default route on the main table to 192.168.1.1.

The problem is that when I remove the default via 212.74.13.1 line from
the main table, nothing gets routed to the outside world anymore. I
thought packets would come in from eth0 leap to the pixforward2 table
and then out onto the internet, but no. I think I know that the packets
are hitting the pixforward2 table, because if I change its route to
nonsense everything stops working. So do the packets appear to choose
the right table initially and then go to the wrong table for actual
routing?

This is even more frustrating because I did get this to work at one
point. When I went to add the changes permenatly to a script, I couldn't
replicate it.

Thanks for any help you can offer, 
Chris.





This e-mail message is meant solely for the person or organisation to whom it is adressed. If you receive this email in error please do not distribute, further publish or relay upon it but let us know (telephone +44 (0)1273 234 664) and then delete it. Please treat our information in confidence as you would hope we would treat yours. Any views expressed are not necessarily those of Ehbas Limited. Thank you for your co-operation. 
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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