port based routing

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



Good Evening,

I am trying to set up port based routing on a CentOS 5.2 box as described here:

http://www.linuxhorizon.ro/iproute2.html (second example)

Therefor I have set up the following mangle and routing rules:

$IPTABLES -A OUTPUT -t mangle -p tcp --dport 1100 -j MARK --set-mark 1
$IPTABLES -A OUTPUT -t mangle -p tcp --dport 1101 -j MARK --set-mark 2
$IPTABLES -A OUTPUT -t mangle -p tcp --dport 1102 -j MARK --set-mark 3

$IP route add default dev ppp100 table SOESTCOM1
$IP route add default dev ppp101 table VERSATEL1
$IP route add default dev ppp102 table TONLINE1

$IP rule add from all fwmark 1 table SOESTCOM1
$IP rule add from all fwmark 2 table VERSATEL1
$IP rule add from all fwmark 3 table TONLINE1

iptables -t mangle -L -vn output:

http://pastebin.centos.org/24626

shows that the packages are marked correctly.

Here is an example ip route show table output:

default dev ppp102  scope link

But it seems (and tcpdump indicates) that packages are still routed via default route, instead.

Do I need to set some proc flags to activate port based routing?

Best Regards
Marcus
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux