Question PC connected to two different networs: is possibile to redirect network traffic?

Jun 27, 2019
2
0
10
0
Good day

i've a pc connected to two different networks: one on the ethernet card and the other on the wifi card.
From the first i get a 10...* ip class and from the second i get a 172...* ip class

Both of them have internet access.

The thing i would like to achieve is the following:

if i call one, and only one, specific ip address (as example 174.11.12.13 - this ip address is available on internet), i would like that the network traffic would be redirect only to the wifi port. (in and out on all ports for that ip, and only that ip)

Al the rest network traffic should pass from the ethernet network port.

is it possible to achieve this goal with a simple windows 10 pc?

Thanks
 

Traditore

Honorable
Add an explicit route rule for the remote machine to go to the wireless gateway

In console:

Code:
route add -p {network} mask {subnet mask} {gateway}
where {network} is the remote IP address, {subnet} is 255.255.255.255 and {gateway} is the default gateway for wireless adapter
 
Jun 27, 2019
2
0
10
0
thank you, it worked!

one info: now the traffic from the specific ip goes throught wifi port, but how can i be sure that also other ip traffics could go through the wifi port?

thanks
 
The reason it works is windows generally gives a lower metric to ethernet. You have 2 default routes...0.0.0.0 and when there are duplicate routes it uses the metric as a tie breaker.

I tend to not run it that way. I let one connection be the default like normal and on the second I remove the gateway and DNS from the nic settings. You can also use the ROUTE DELETE command to get rid of 0.0.0.0 also.

So to start with this is the same as if you only have 1 nic card. You then add routes for each site that you want to use the secondary path. It works fine as long as you do not have a huge list of ips.
 
other ip traffics
See with computers, you cannot be vague like that, you have to tell it exactly what those other (destination) IPs are.

If I remember correctly a PC routing table is also resolves top to bottom like a firewall rule table, so your most specific exception should be toward the top, and your more generic entries should be toward the bottom. Again am rusty but you verify the specificity of your routing entries are dictated by the MASK. A 255.255.255.255 says only that ONE IP matches this route, versus a mask of 255.255.255.0 signifies a whole subnet of 255 IP matches this other route, and Windows will automatically place it in the correct order according the MASK provided, and u can tweak it as needed via the metric parameter.
 

ASK THE COMMUNITY

TRENDING THREADS