{"id":1112,"date":"2012-01-03T15:35:41","date_gmt":"2012-01-03T23:35:41","guid":{"rendered":"http:\/\/www.redwireservices.com\/?p=1112"},"modified":"2014-07-25T16:59:45","modified_gmt":"2014-07-25T23:59:45","slug":"linux-route-reply-packets-back-through-the-same-interface","status":"publish","type":"post","link":"https:\/\/www.redwireservices.com\/linux-route-reply-packets-back-through-the-same-interface","title":{"rendered":"Linux: Route Reply Packets Back Through The Same Interface"},"content":{"rendered":"
sudo vi rt_tables # add table vlan98 with an unused id (252)<\/span><\/pre>\nsudo ip route add 192.x.98.0\/24 dev eth1 src 192.124.98.192 table vlan98<\/span><\/pre>\nsudo ip route add default via 192.x.98.1 dev eth1 src 192.124.98.192 table vlan98<\/span><\/pre>\nsudo ip rule add from 192.x.98.192 table vlan98<\/span><\/pre>\nI hope that saves someone some time.<\/span><\/div>\n <\/p>\n","protected":false},"excerpt":{"rendered":"
Once again I’m thwarted by the design of the Linux network stack. You see, by default, when a packet comes into one interface in Linux, you can’t count on the reply coming back through the same interface. This is not … Continue reading