I have a system that has 2 NICS... I want all traffic that is going out to the internet to go through 1 NIC.

I have the Following setup currently.

  • Internet > Router ( > VPN Router ( > System NIC 1 (192.168.1.X)

  • Internet > Router ( > System NIC 2 (192.168.2.X)

I thought if I just set a default gateway on NIC 1 and not on NIC 2 that should do it. That would should allow anything on the network to be able to ping and connect to NIC 2. And all traffic to the internet should go through my NIC 1 which is on the VPN. (As long as I have my routes setup correctly)

However that doesn't seem to be the case. If I have a Gateway set on NIC 1 and not NIC 2... NIC 1 works fine and that network is going out the VPN. I am unable to connect to NIC 2 from another system on the network. If I set a Gateway on NIC 2, I can connect however internet traffic now goes out NIC 2.

Any ideas?

EDIT: To Clear up any confusion. I do not want my other machines on the networks to use the above Referenced system as a default gateway. I want to be able to allow another system to RDP into the above system that has 2 networks, and access the internet via the VPN NIC1 connection.

If I have a default gateway only on NIC1 the system works fine and all traffic goes out the VPN as requested. However another system on the network cannot PING or RDP into the above system. If a gateway is also configured on NIC2 I can now connect, however internet traffic no longer goes out the VPN.

RESOLVED: via command prompt I removed all default gateways (Two were listed) and re-added the correct one as well as routes for the two networks.

route -p add mask route -p add mask route -p add mask

from there I was able to set a static IP on NIC2 minus the gateway and all is working as expected.

Thank you


Your expectation is incorrect. Telling one machine how to reach two networks won't make other machines on either of those networks use that machine as their gateway to the other network.

The simplest solution is to follow this rule: Every machine that is some other machine's default gateway should have a route to every network that you expect to be able to interoperate. You break this rule because your two routers don't know to use the gateway to reach each other.

This means that you need to add one route to the router telling it to forward traffic to to the gateway system's 192.168.2.x address. And it means you need to add one route to the router telling it to forward traffic to to the gateway system's 192.168.1.x address. That tells the routers for each network to use the gateway (as reachable on that network) to reach machines on the other network.

  • That is not what I was trying to do... I do not want my other machines to use the system as a default gateway... The only reason I want my other machines to access System NIC2 is because that system is a server that hosts applications that they need access to. I will update my original post to clarify.
    – Phonic
    Oct 23 '14 at 21:59
  • @ChrisBateson I'm not suggesting anything use the system as a default gateway. Read my answer again. Oct 23 '14 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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