mark and route traffic in a bridge

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



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
_______________________________________________
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