D
D
Deterrent2022-02-06 00:21:56
Network routing
Deterrent, 2022-02-06 00:21:56

Routing through 2 providers for RDP?

There is a router (wan 1.1.1.1 lan 192.168.0.1) and there is a second router (wan 2.2.2.2 lan 192.168.0.2)
Both routers are in the same LAN subnet.

There is a computer 192.168.0.100
You need to connect from the Internet via RDP to 1.1.1.1 or 2.2.2.2 and get on the PC via RDP.

But on the computer there is a gateway 192.168.0.1 and when connected to the static IP of the provider 1.1.1.1, it connects and works. (Of course, subject to port forwarding on the router)

But when connected to 2.2.2.2, it does not work. since the router forwards port 3389 to 192.168.0.100 (to the computer) and the computer sends packets back through the default gateway 192.168.0.1 (the first router), which means that packets are returned to the IP source from 2.2.2.2, but they should from 1.1.1.1

Of course, if you know the IP from which we connect via RDP and write route add xxxx mask 255.255.255.255 192.168.0.2 in the computer, then it will connect via IP 2.2.2.2 but will stop on 1.1.1.1 and the IP address from which we will connect will be unknown.

The question is, is it possible to somehow understand that packets come through the second router and send them there, and when through the first one, then let the default gateway use it. On a Windows computer, routers are also primitive tp-links.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2022-02-06
@rPman

I can suggest connecting the xxxx.100 machine to different local networks at the same time (by issuing different ip addresses from different subnets), setting up a second local network on the router from 2222
in this way, the xxx.100 machine will have 2 ip addresses at once and through them it is correct to resolve where someone connects from

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question