5
3
On Linux, is it possible to have all requests done to a specific IP to be routed through a virtual interface, so that on the other end they appear with a different IP address that the host's main? Suppose that eth0
has the IP address 1.1.1.1 while eth0:1
has the address 1.1.1.2. How can I make all requests to 1.2.3.4 appear as coming from eth0:1
? I am trying the following but it doesn't seem to work:
route add 1.2.3.4 dev eth0:1
Fortunately I could use the first command (ip route add with src option) – YudhiWidyatama – 2019-01-15T23:04:59.027
Unfortunately, I had to resort to SNAT (see answer above), tuning IP routing tables is not my strong point :-) Thanks! – Georgios Gousios – 2013-02-08T19:16:46.487