Home » CentOS » Routing
CentOS 2 Comments

Greetings Dear CentOS List Guys

i have some specific requirement but at this point i only with to know if the following is possible.

1.) CentOS Machine Acting as Router
2.) Machine is part of 10 VlANs Using 10 local interfaces

Is it possible that i can identify the source traffic and forward it to the specific interface.


Remote packet coming from should be forward to

Is that possible ?

Thanks / Regards

2 thoughts on - Routing

  • I’m actually doing it. The route2 feature can be useful in this case. You can mark the packets and route2 will do the favor for you. It’s just different table will be used for the tagged packets. Here is what I use,

    1 SMTP
    2 http
    3 ssh
    4 lan

    $IPTABLES -N Cid6642X27340.0 -t mangle
    $IPTABLES -t mangle -A PREROUTING -p tcp -m tcp –dport 25 -j Cid6642X27340.0
    $IPTABLES -t mangle -A Cid6642X27340.0 -s -j MARK
    –set-mark 0x1

    ip route add via dev tun-SINs table SMTP
    ip route add default via dev tun-SIN-EDG table SMTP