Results 1 to 6 of 6
Hey all. Suppose I have computer A with ip address on eth0 of 192.168.0.1 and ip address on eth1 of 192.168.1.1. If I send packets to 192.168.1.1 from computer A, ...
- 06-10-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 3
Sending packets to localhost through another computer
Hey all. Suppose I have computer A with ip address on eth0 of 192.168.0.1 and ip address on eth1 of 192.168.1.1. If I send packets to 192.168.1.1 from computer A, it automatically uses the loopback interface. Is it possible to modify the routing table some how to send these packets out on eth0 instead and have them route around the network and come back on eth1. I've tried 'route add -host 192.168.1.1 dev eth0' but it seems to completely ignore this entry.
Thanks
- 06-10-2009 #2
Are the eth0 and eth1 physically different devices?
or eth1 is bridged to eth0? like an alias interface.
- 06-10-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 3
- 06-10-2009 #4
You should try using 'ip route'
but remeber you'll need a gateway
- 06-10-2009 #5Just Joined!
- Join Date
- Jun 2009
- Posts
- 3
Slight progress. I tried 'ip route change 192.168.1.1 via 192.168.0.2' (192.168.0.2 is the IP address of the computer directly connected to A's eth0).
Now if I ping 192.168.1.1 from A, the packets are going to eth0 as desired, but the other computer is replying with "Destination Host Prohibited" even though that computer has 192.168.1.1 in its routing table.
Thanks for the help so far
- 06-11-2009 #6
You also need to do routing on gatway machine.


Reply With Quote

