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 (192.168.2.1) > VPN Router (192.168.1.1 > System NIC 1 (192.168.1.X)
Internet > Router (192.168.2.1) > 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 192.168.2.0 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 192.168.2.0 network. If I set a Gateway on NIC 2, I can connect however internet traffic now goes out NIC 2.
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 192.168.2.0 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 192.168.2.0 mask 255.255.255.0 192.168.2.1 route -p add 192.168.1.0 mask 255.255.255.0 192.168.1.1 route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.1
from there I was able to set a static IP on NIC2 minus the gateway and all is working as expected.