Routing

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.

i.e.

Remote packet coming from 192.168.21.0 should be forward to 192.168.20.20
(eth1)

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 10.28.2.238 -j MARK
    –set-mark 0x1

    ip route add 1.1.28.0/24 via 1.1.28.2 dev tun-SINs table SMTP
    ip route add default via 1.1.4.2 dev tun-SIN-EDG table SMTP

    ———-

LEAVE A COMMENT