Here's the problem. I have two network connections on my DEV machine.
LAN - Connects to the building network and internet. IP is assigned by DHCP and is 192.168.30.XX.
LOCAL - Connects to a switch, which has one TEST machine. IP is 192.168.25.100. And the test machine is at 192.168.25.2.
Right now I remotely reboot the TEST machine, then ping to see when it's come back up.
Problem is, yesterday someone (probably accidentally) added a machine to the building LAN that has an IP of 192.168.25.2, so now when my TEST machine is rebooted and I ping for it, I get a response from this remote machine on the LAN, my software thinks the TEST machine is back up, and tries to log in. This obviously fails, because it's not the TEST machine responding, and it's still mid-reboot.
My question is, how do I either:
- prevent all requests for 192.168.25.2 from going out over LAN, or
- force all requests for 192.168.25.2 to go out over LOCAL
UPDATE: I think the best solution would be to modify the routing table so that packets to 192.168.25.2 are blocked over one interface, and statically routed over the other.
Thing is, while I can add a static route using this:
route add 192.168.25.100 mask 255.255.255.255 192.168.25.2
But Windows will still automatically fail back to the LAN and attempt to ping there if that static route fails.
Is there a way of blocking traffic to a specific interface or gateway within the routing table?