-1

I have a computer with two network interfaces, say eth0 and eth1 with IPes 192.168.1.10 and 192.168.1.11 respectively. Both these interfaces are connected to a router directly.

When I send traffic to 192.168.1.11 from 192.168.1.10 (or let Linux 'choose' interface itself), due to default entries in linux local routing table, traffic would never leave for the network and would get routed internally. How can I delete these entries from local routing table and add in some other routing table such that traffic for 192.168.1.11 is forced out to the router.

There must be some "ip" or "iptables" way which I couldn't' figure out.

2
  • Do you have an actual reason for wanting to do this? Sep 14, 2013 at 12:49
  • you might get what you want by removing the route to 192.168.1.11 from the local table (ip route del 192.168.1.11/32 table local) and explicitly adding it with the router as the gateway to the default routing table. But I suspect this would break more than it could ever fix.
    – the-wabbit
    Sep 14, 2013 at 23:12

1 Answer 1

0

Have you tried ip r del ... and ip r add ...?

Anyway please post ip r output to be sure you properly explain the case.

1
  • More of a comment than a answer Sep 15, 2013 at 1:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .