Will It Work? · Guide
VPN server on your home router: will it work from outside?
By Bulan Sarkar, founder of ElectronicsInfoline (since 2000)
Many home routers can act as a VPN server, so a phone or laptop away from home can reach the drive, printer or camera on your home network as if it were on your Wi-Fi. Whether it works from outside depends mostly on the router's WAN address. This guide is drawn from two router makers' support pages (one read on its US and India sites).
It works if your router's WAN address is public. Turn on dynamic DNS, enable the VPN server (WireGuard or OpenVPN), make one account or config file for each device, and connect from the VPN app. If the WAN address is private, a box in front of the router needs a port-forwarding rule too. If it is a carrier-grade NAT address (100.64.0.0 to 100.127.255.255), the server cannot be reached from outside until your provider gives you a public address.
What the server does
On a router, the VPN server works as a gateway: it accepts connections from your devices and gives them secure access to the home network (TP-Link). Your router is the server, and the remote device connects with a VPN app (TP-Link). It works one way: the device you connect from can reach your home network, but the home network cannot reach back into that device (TP-Link).
Check the WAN address first
A VPN server has to accept connections from the internet, so it has the same need as port forwarding: a public WAN address (TP-Link). Open the router's status page and read its WAN or internet address.
A private address (192.168.x.x or 10.x.x.x) means another box, often the provider's modem router, sits in front of yours. One maker covers this case: forward a port on the front box to your router, with the internal port the same as the VPN service port, then change the remote address in the client file to the front box's WAN address and the port to the external port you chose (TP-Link). An address from 100.64.0.0 to 100.127.255.255 is carrier-grade NAT, and forwarding will not work through it (TP-Link); most 4G and 5G providers give private addresses by default (TP-Link).
The public address can change, so set up a name that follows it. One maker says to configure dynamic DNS or give the router's WAN port a static address, and sync the router's clock, before turning the server on (TP-Link). The other says dynamic DNS must be on before the VPN feature (NETGEAR).
Set up WireGuard
WireGuard runs over UDP (TP-Link). On one maker's routers, go to Advanced > VPN Server > WireGuard and tick Enable. The settings are filled in for you, and the maker says not to change them unless you have to (TP-Link). Add an account for each device. On a phone, install the WireGuard app and scan the QR code the router shows; for other devices, export the config file (TP-Link).
Each account serves one device at a time (TP-Link). And if you renew the server's keys, every client has to be set up again before it can reconnect (TP-Link). The optional Persistent Keepalive setting sends a regular heartbeat, every 25 seconds by default (TP-Link).
Set up OpenVPN
On one maker's routers, go to Advanced > VPN Server > OpenVPN and select Enable VPN Server. The first time, generate a certificate before you enable it (TP-Link). Choose UDP or TCP and a service port between 1024 and 65535, pick the client access type, save, then export the configuration file for the remote device (TP-Link). Each device needs the OpenVPN client installed and the file copied into it (TP-Link).
On the other maker's routers, the page is ADVANCED > Advanced Setup > VPN Service: select Enable VPN Service, apply, and download the configuration files for your clients (NETGEAR). Install the OpenVPN software on each Windows computer you plan to use (NETGEAR). On Windows, that maker also asks you to rename the TAP network adapter's connection (not its device name) to NETGEAR-VPN; if you skip this, the tunnel fails to connect (NETGEAR).
Home only or everything
Both makers offer two choices. Home Network Only lets the remote device reach your home network and nothing more (TP-Link), and on one maker it is the default (NETGEAR). The other choice (Internet and Home Network, or All sites on the Internet & Home Network) sends the device's web traffic through your home line as well (NETGEAR). That can be slower than using the local connection directly (NETGEAR).
How many devices
One maker gives the limits for its routers: up to 16 WireGuard connections at once, and up to 10 OpenVPN connections at once (TP-Link). Other makers and models may differ, so check your model's user guide.
Tips and tricks
- Test from a phone with Wi-Fi off. A connection made from inside your home proves nothing about reaching it from outside.
- If the WAN address starts with 100. and falls between 100.64.0.0 and 100.127.255.255, stop: no router setting gets past carrier-grade NAT.
- After you change the VPN settings or renew keys, export the file or QR code again and update every device.
- Give each device its own account or file, so you can remove one lost phone without touching the others.
- Keep Home Network Only unless you need to browse through your home line; then only traffic for your home devices goes through the tunnel.
- If it worked yesterday and not today, check the DDNS name still matches the WAN address.
What we would do
We would read the WAN address first. If it is public, we would set up dynamic DNS, turn on WireGuard if the router offers it (fewer settings, a QR code for phones) and keep Home Network Only. If it is private, we would forward the VPN port on the front box and edit the client file as the maker describes. With a carrier-grade NAT address, we would ask the provider for a public address before spending time on settings.
Questions people ask
Can I set up a VPN server on my home router? If its menu has a VPN Server or VPN Service page, yes. One maker lists PPTP, L2TP/IPsec, OpenVPN and WireGuard, with support varying by model, so check your model’s specifications first.
Should I use WireGuard or OpenVPN on my router? Use whichever your router and devices both offer. On one maker’s routers, WireGuard needs fewer settings (they are filled in for you, and a phone scans a QR code) and takes up to 16 connections at once; OpenVPN takes up to 10 and needs a certificate and a config file.
Why can’t I connect to my home VPN from outside? Check the router’s WAN address first. A private address means a box in front of your router, where the VPN port must be forwarded. An address from 100.64.0.0 to 100.127.255.255 is carrier-grade NAT: the server cannot be reached until the provider gives you a public address. Then check the DDNS name and the router’s clock.
Do I need dynamic DNS for a VPN server? In practice, yes. One maker says to set up dynamic DNS or give the router a static WAN address before turning the server on; the other says to turn on dynamic DNS before the VPN feature.
Will a home VPN make my internet slower when I am away? Only if you send all traffic through it. With Home Network Only, only traffic for your home devices goes through the tunnel. With Internet and Home Network, everything goes out through your home line, and one maker warns that this might be slower.
Sources
Each figure on this page is quoted from the source below or worked out from them. Sources checked , each quote read again against the source in a second pass.
- TP-Link, TP-Link FAQ 1544 (US): OpenVPN server on the router:
your TP-Link router acts as the OpenVPN Server, and your remote device connects to it using the OpenVPN client app … Before enabling the VPN Server, configure Dynamic DNS or assign a static IP address to the router's WAN port, and make sure your system time is synced. … The first time you configure the OpenVPN Server, you must generate a certificate before enabling it. … Go to Advanced > VPN Server > OpenVPN … the port number should be between 1024 and 65535 … Select Home Network Only if you only want the remote device to access your home network … Click Export to save the OpenVPN configuration file … a multi-router setup where port forwarding is also required … Make sure the Internal Port matches the VPN Service Port you wrote down. … Modify the remote address to the WAN IP address of the Modem Router/Router1
tp-link.com/us/support/faq/1544/ - TP-Link, TP-Link FAQ 3772 (US): WireGuard VPN server on the router:
WireGuard VPN is a modern protocol based on the User Datagram Protocol (UDP) … Go to Advanced > VPN Server > WireGuard and tick the Enable box for WireGuard. … The parameters are automatically filled in. Do NOT change them unless necessary. … Persistent Keepalive time (25 seconds by default) … Each WireGuard VPN account can only be used by one client device at a time. … download the WireGuard app from Google Play or the Apple App Store and scan the QR code generated by the router … If the server's private and public keys are renewed, any connected clients must be reconfigured before they can reconnect to the VPN server. … If your TP-Link router is connected to a main router, you may also need to configure port forwarding.
tp-link.com/us/support/faq/3772/ - TP-Link, TP-Link FAQ 3799 (US): general VPN questions (protocols, connection limits):
VPN server acts as a gateway, accepting client connections and providing secure access to a network. … PPTP, L2TP/IPsec, OpenVPN, and WireGuard, with compatibility varying by model … The VPN types supported by router and deco are designed for client-to-server connections, meaning that the client can access the server, but not the other way around. … For the WireGuard you can have a maximum of 16 concurrent connections, and for OpenVPN, the maximum number of concurrent connections is limited to 10.
tp-link.com/us/support/faq/3799/ - NETGEAR, NETGEAR KB 24320: VPN clients reach only the home network (default):
It allows VPN connections only to your home network, not to the Internet service for your home network. … Select ADVANCED > Advanced Setup > VPN Service … select the Home Network only radio button
kb.netgear.com/24320/ - NETGEAR, NETGEAR KB 24319: VPN clients use the home internet service:
Accessing the Internet remotely through a VPN might be slower than accessing the Internet directly. … select the All sites on the Internet & Home Network radio button … When you access the Internet with the VPN connection, instead of using a local Internet service, you use the Internet service from your home network. … download the configuration files for your VPN clients
kb.netgear.com/24319/ - NETGEAR, NETGEAR KB 23854: enable the VPN feature (Dynamic DNS first, Windows client):
You must install the OpenVPN software on each Windows computer that you plan to use for VPN connections to your router. … You must enable Dynamic DNS before enabling the VPN feature. … change its name (not its device name) to NETGEAR-VPN … If you do not change the VPN interface name, the VPN tunnel connection fails.
kb.netgear.com/23854/ - TP-Link, TP-Link FAQ 785 (US): port forwarding not working:
If the WAN IP is private or a CGNAT address (100.64.0.0–100.127.255.255), port forwarding will not work … Always verify the server is accessible from the local network before troubleshooting port forwarding rules. … Windows Firewall can block port forwarding connections. … Most 4G/LTE and 5G ISPs assign private IP addresses by default … including the correct internal IP address, port number, and protocol … the gateway on the client’s settings should be the router’s LAN IP address … prevent you from using OpenVPN or port forwarding and affect the NAT Type … you will need to open the same port on the upstream modem router as well
tp-link.com/us/support/faq/785/