有两个网卡,如何设置从eth1进来的request, 它的response依然从eth1出去。
Example:
echo -e “201\teth1” >> /etc/iproute2/rt_tables
echo -e “202\teth2” >> /etc/iproute2/rt_tables
echo “from 100.69.13.72 table eth1” >> /etc/sysconfig/network-scripts/rule-eth1
echo “from 100.69.12.152 table eth2” >> /etc/sysconfig/network-scripts/rule-eth2
echo “default via 100.69.13.65 dev eth1 table eth1” >> /etc/sysconfig/network-scripts/route-eth1
echo “default via 100.69.12.129 dev eth2 table eth2” >> /etc/sysconfig/network-scripts/route-eth2
systemctl restart network