I have a two systems on a private network 192.168.0.0/16.

SysA has an IP of 192.168.0.30 SysB has two subinterfaces in linux, ETH0:0 with IPs of 192.168.200.213 and ETH0:1 192.168.90.20.

If I'm on SysB how can I get it to access SysA through the 192.168.90.20 IP instead of the 192.168.200.213 IP?

link|improve this question

You probably mistyped the IP of SysA, it says 102.168 while it should probably say 192.168? – Mattias Ahnberg Jan 18 at 19:28
Thanks, I didn't noticed that. Fixed now. – LF4 Jan 18 at 20:57
feedback

1 Answer

up vote 2 down vote accepted

You'd have to look into Source Routing for Linux. An example can be found here in the Linux Advanced Routing & Traffic Control HOWTO:
http://lartc.org/howto/lartc.rpdb.html#LARTC.RPDB.SIMPLE

Actually, even simpler you can do something like this:

ip route add to 192.168.0.30 src 192.168.90.20 dev eth0 via 192.168.90.1

Assuming that the gateway is 192.168.90.1, change it accordingly if needed!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.