Similar to this request (I think) I'd like to see traffic bound for a certain port number routed through one specific interface while traffic for a specific IP is routed through another. The server I'm trying to do this to has a fresh install of Ubuntu 14.04.2, so I've got a wide array of tools to accomplish the task. However, networking isn't something with which I've much experience, so I'm not sure where to start. =)
Thanks in advance!
Some details, because they matter.
me@server:~$ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 54:9f:35:0a:6a:20 brd ff:ff:ff:ff:ff:ff inet 10.22.89.50/24 brd 10.22.89.255 scope global em1 valid_lft forever preferred_lft forever inet6 fe80::569f:35ff:fe0a:6a20/64 scope link valid_lft forever preferred_lft forever (...) 6: p1p1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:0f:53:2d:4b:80 brd ff:ff:ff:ff:ff:ff inet 10.22.52.199/26 brd 10.22.52.192 scope global p1p1 valid_lft forever preferred_lft forever 7: p1p2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:0f:53:2d:4b:81 brd ff:ff:ff:ff:ff:ff inet 10.22.52.200/26 brd 10.22.52.192 scope global p1p2 valid_lft forever preferred_lft forever
I'd like to route all traffic bound for
p1p2 and all traffic bound for any IP on port