Setting up a
VPN for secure remote access to your Windows 10 PC allows you to securely
connect from anywhere, bypassing the need to expose Remote Desktop to the
internet. Here’s how you can set up a VPN server on Windows 10 and connect to
it from another device.
Step 1:
Enable VPN Server on Windows 10 (Host PC)
Open
Network & Sharing Center
Press Win +
R, type ncpa.cpl, and hit Enter.
Press Alt,
then click File > New Incoming Connection.
Select
Users Who Can Connect
Choose an
existing user or click Add someone to create a new user for VPN access.
Click Next.
Enable
VPN via Internet
Check Through
the Internet, then click Next.
Enable
VPN Protocols
Select
Internet Protocol Version 4 (TCP/IPv4) and click Properties.
Check Allow
callers to access my local network.
Select
Specify IP addresses, then define an IP range (e.g., 192.168.1.200 -
192.168.1.210).
Click OK >
Allow Access > Close.
Step 2: Allow
VPN Traffic Through Firewall
Open
Windows Firewall Settings
Press Win +
R, type wf.msc, and hit Enter.
Create a
Firewall Rule for VPN
Click Inbound
Rules > New Rule.
Select Port,
then click Next.
Choose UDP
and enter 1701, 1723, 500, 4500 (these are VPN ports).
Click Next,
select Allow the connection, then Next > Next > Finish.
Step 3:
Enable VPN on Router (Port Forwarding)
If you want
to access the VPN from outside your home network, you need to forward PPTP
(port 1723), L2TP (ports 1701, 500, 4500) on your router.
Steps to
Forward VPN Ports
Log in to
your router settings (192.168.1.1 or 192.168.0.1).
Find Port
Forwarding settings.
Add rules to
forward the following ports to your PC’s local IP (192.168.1.X):
PPTP: 1723
(TCP)
L2TP/IPSec:
1701, 500, 4500 (UDP)
Save and
apply changes.
Step 4: Find
Your Public IP
To connect
from outside your home, you need your public IP address.
Go to
https://whatismyipaddress.com/ and note your public IP.
📌 Tip: If your ISP provides a dynamic IP, use DDNS
(Dynamic DNS) to get a hostname like myvpn.dyndns.org.
Step 5:
Connect to VPN from Another Device
On Windows 10
Client
Press Win + I
and go to Network & Internet > VPN.
Click Add a
VPN connection.
Enter:
VPN provider:
Windows (built-in)
Connection
name: Any name (e.g., My Home VPN)
Server name
or address: Your public IP or DDNS hostname
VPN type:
PPTP or L2TP/IPSec (depending on your setup)
Username
& Password (the user you added earlier)
Click Save
and then Connect.
On
Android/iPhone
Go to Settings
> VPN and Add VPN configuration.
Choose
L2TP/IPSec or PPTP, enter the server details, username, and password.
Save and
Connect.
Step 6: Test
Your VPN
Turn Wi-Fi
off on your phone and connect via mobile data.
Try
connecting to the VPN using the public IP or DDNS hostname.
Once
connected, open Remote Desktop (RDP) and enter your PC's local IP (192.168.1.X)
to access it securely.
No comments:
Post a Comment