VPN server on the router. Auto-connect VPN in Windows with blocking access to the Internet except for the VPN connection.

Carding 4 Carders

Professional
Messages
2,731
Reputation
12
Reaction score
1,362
Points
113
Complete and detailed tutorial on how to raise a VPN server on a router, implement auto-connection to it in Windows and allow Internet access only through a VPN.

The article is written in sufficient detail, even for those people who first visited the Windows "Network connections" section.

1. Configure the VPN server on your router
Just want to say that not all routers support the VPN function. I will show you the example of the Tenda router. For others, the procedure is similar.

1. Connecting to the router. Enter the local IP of the router in the browser's address bar. In my case, this is 192.168.0.1. you can View it on the sticker on the bottom of the router, or on the Internet.

2. Enter your username/password. Usually, the username and password are the same: admin. If not, see the instructions for your router or on the Internet.

3. Go to the "VPN/PPTP server" tab. On other routers, this can be immediately the "VPN server" tab. If there is nothing like this, it is likely that your router does not support VPNs.

4. Turn on the PPTP server and enable encryption. Adding it User name (Login) and Password for connecting to this server. Save it.

The VPN server setup on the router is finished. Go to the Windows settings.

2. Connect to a VPN via Windows
Configuration will be carried out using the example of a clean Windows 7. On older versions, the procedure does not differ much.

1. Go to the " control Panel\Network and Internet\network and sharing management Center". Click "setting up a new connection or network".

2. Choose one by one "Connecting to the workplace/No, create a new network connection/Use my Internet connection (VPN)".

3. In the next window, enter the IP address of our VPN server in the "Internet address" field. In the "location Name" field, enter any name in English without spaces (for example, vpn-lab).

To find out the external IP of a previously configured router, you need to log in from any device connected to the router-VPN server to the site 2ip.ru. Enter the IP specified there in the field.

4. Enter Login and Password for connecting to the VPN network that was added earlier. Click "Connect".

5. If everything is done correctly, the created VPN connection will be displayed in the list of connections. Open the properties of this connection.

6. We configure the items in the tabs as shown in the figures below. Click OK.

7. We check its performance. Now, when checking an external IP address (for example, via a website 2ip.ru) the IP address of the router-server should be displayed, not yours.

3. Auto-connect to the VPN when the PC is turned on
1. Launch the "task Scheduler".

2. Select "Create a simple task".

3. In the "Name" field, enter any name (for example, AutoVPNConncet).

4. In the "Trigger" field, select "when logging in to Windows".

5. Action - "Run the program".

6. Next, in the "Program or script" field, enter " C:\Windows\system32\rasdial.exe». In the "Add arguments" field, enter "< VPN connection name in the list of network connections> < VPN connection name in the list of network connections><Login> <Login><Password> " without quotation marks. In my case, it was "vpn-lab TestUser TestPassword".

7. Put a check mark on "Open the Properties window after clicking Finish". Click "Done".

8. In the window that opens, put a check mark on "Run with the highest rights". Click OK.

9. Done. It remains to check. Restart your computer. After that, check your IP in the network (for example, on 2ip.ru). It must match the VPN address.

4. Blocking access to the Internet other than a VPN connection (blocking the Internet without a VPN)
1. Go to the " control Panel\Network and Internet\network and sharing management Center".

2. Define a VPN connection as a "Home network", and a network connection as a"Public network".

3. Open "Windows Firewall in advanced security mode" and click on "Windows firewall Properties".

4. In the "General profile" tab, we block Incoming and Outgoing connections. In "Secure network connections", select all.

5. Go to the "rules for incoming connections" tab. Click "Create rule".

6. Next, select:
  • Rule type: "Customizable»
  • Program: "All programs»
  • Protocol and ports: "Protocol Type: Any»
  • Area: "Local IP: Any; Remote IP: Specified IP" and here we add the IP of your VPN (as in the screenshot below).
  • Action: "Allow connection»
  • Profile: "Public" Only»
  • Name: (any) " VPN1»
Click "Done".

7. Go to the "rules for outgoing connections" tab. Click "Create rule" and do everything as in the previous paragraph.

8. We check its performance. Now, if the VPN is disabled, there should be no Internet access.

ai0_562mfh_o-ivdfbqegdfozra.png


Done!
 
Top