Quote:
Originally Posted by Nemesiz
You have to create 2 routing tables and set incoming and outgoing ip rules to look up in these tables.
# one time command
echo "100 IP1" >> /etc/iproute2/rt_tables
echo "101 IP2" >> /etc/iproute2/rt_tables
# commands for route
ip route add 192.168.82.0/24 dev eth0 src 192.168.82.111 table IP1
ip route add 192.168.82.0/24 dev eth1 src 192.168.82.99 table IP2
ip rule add to 192.168.82.111 lookup IP1
ip rule add from 192.168.82.111 lookup IP1
ip rule add to 192.168.82.99 lookup IP2
ip rule add from 192.168.82.99 lookup IP2
|
Thank you very much your answer is perfect.
Here is the most thorough list for getting iproute2 to work with your kernel:
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CT_NETLINK=y
CONFIG_SCSI_NETLINK=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCHED=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_XT_TARGET_MARK=y