[CentOS] mark and route traffic in a bridge
Roberto Pereyra
pereyra.roberto at gmail.com
Tue Jan 23 13:01:08 UTC 2007
Hi all !!
I would to like to mark and route some kind of traffic (ie: outbound
www, now by simplicity)
---inet1--------eth0------------| |
| linux |
--eth1------- clientes
---inet2(90.0.0.1)--------eth2-| |
I have eth0 and eth1 bridged (eth2 is not bridged).
I would to route www outbound clients traffic through eth2.
This scheme works ?
I wrote this scripts:
a) add this line to /etc/iproute2/rt_tables
200 web
b) I assign ip to eth2:
/sbin/ifconfig eth2 90.0.0.2
c) Mark outbound www packets from clients:
/usr/local/sbin/iptables -A PREROUTING -t mangle -m physdev
--physdev-in eth1 -p tcp --dport 80 -j MARK --set-mark 2
d) I routing this marked packets
/sbin/ip rule add fwmark 2 table web
/sbin/ip route add default via 90.0.0.1 dev eth2 table web
e) Now I run iptraf listen eth2 but through eth2 is nothing of traffic.
What's a doing wrong ? How I can do it with a bridge ?
Thanks in advance for any hint and excuse my english.
roberto
--
Ing. Roberto Pereyra
ContenidosOnline
Looking for Linux Virtual Private Servers ? Click here:
http://www.spry.com/hosting-affiliate/scripts/t.php?a_aid=426&a_bid=56
More information about the CentOS
mailing list