E
E
Eugene2016-03-21 11:23:27
VPN
Eugene, 2016-03-21 11:23:27

How to set up routing so that part of the traffic uses a vpn connection?

Good afternoon!
Given:
Office with TP-LINK TL-ER6120 router
Windows 2008 r2 remote server c:

  • mysql database
  • Apache2
Currently configured:
PPTP server is enabled on TP-LINK and the remote server connects to it as a client. Accordingly, the resources of the remote server are accessible in the local office network.
Necessary:
  • The connection to the database was available from the office only via VPN
  • Apache should not use a VPN and should listen on port 80 on the server's external IP address.

Those. how to set up routing so that some of the resources on the server are available only through the VPN, and some are available via the server's external IP address?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2016-03-21
@res2001

When VPN is connected, the server is assigned as the default router on the client. It needs to be cancelled.
In Windows, this is done by unchecking the connection properties, this setting is buried somewhere deep, now I can’t write the exact path there.
If, after connecting to the VPN, the client receives addresses from the range that is not included in the network behind the VPN server, then on the client, you must manually register a static route to this network through the VPN server:
route add ...

E
Eugene, 2016-03-21
@vakym

res2001 : Artem : not to
get confused:
server with vpn = router
remote server with resources = vpn client vpn client resources are no longer available on the local network behind the vpn. However, the vpn connection is in the "Connected" state. The vpn client is accessible by its real ip. From the client, you can access resources on the local network for vpn. If you leave the checkbox "Use the default remote network gateway.", then the resources of the vpn client are available from the local network behind the vpn, however, it is impossible to reach the vpn client by its real ip, which is generally logical.
On a computer in the local network for vpn there is an application that connects to the mysql database that is located on the vpn client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question