Skip to contentSkip to conversation

iptables + iproute2 routing problem

LARTC Stefan Bayer [email protected] 1 participant 1 message Dec 2, 2000

lore
Share & tools
lore

Stefan Bayer [email protected]

author
#0 lore raw

<PRE>Hi!
I use the following system:
ppp0 fast Internet via DSL
ippp0 slow Internet
eth1 LAN

Now I want to seperate traffic between these two internet interfaces depending on the destination address/port

I searched through the archive and some articles seemed to be similar to my problem, but till now I could't solve this problem.

ip route show :
195.2.0.3 dev ippp0 scope link
195.2.0.1 dev ippp0 proto kernel scope link src 195.2.0.3 212.88.181.5 dev ppp0 proto kernel scope link src 212.88.172.165 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2 192.168.2.0/24 dev eth1 proto kernel scope link src 192.168.2.1 127.0.0.0/8 dev lo scope link
default via 212.88.181.5 dev ppp0

ip rule show :

0:      from all lookup local 
32765:  from all fwmark        1 lookup ippp0.out 
32766:  from all lookup main 
32767:  from all lookup 253

ip route show table ippp0.out :
default via 195.2.0.1 dev ippp0

I used:
$IPTABLES -A PREROUTING -t mangle -p TCP -d ! $LOCALNET --dport 8888 -j MARK --set-mark 1

echo 201 ippp0.out &gt; /etc/iproute2/rt_tables
ip rule add fwmark 1 table ippp0.out
ip route add default via 195.3.65.85 dev ippp0 table ippp0.out

then still all traffic goes through fast Interface ppp0

Does anybody know what kind of mistake I did?

Signature · 11 lines
thanx
Stefan
Email: <A HREF="mailto:[email protected]">[email protected]</A>
----------------------------------------------------
My Box said: &quot;Install Win95 or better ...&quot; So I installed Linux.

Microsoft gives you Windows
Linux gives you the whole house


</PRE>