If you did some search on this topic, you are probably confused. Most articles on this topic confuse readers rather than helping them.
First of all, let’s make it clear that there’s only one reason to set up a VPN server at home: you want to access your home network from outside.
If you are trying to hide your IP address, hide your Internet traffic from the ISP, access contents not available in your geographical area, you need a VPN client and a VPN service subscription, not a VPN server at home.
There are many reasons that you may want to access your home network remotely. These may include:
There’s more than one way to set up a VPN server at home. But it’s easiest to set it up on the router.
As shown in the diagram below, there are basically two requirements:
Many routers support VPN server. Check your router’s manual to find out whether it’s supported, and how to configure and start it up.
The public IP address is needed so that your VPN client devices can connect back home from outside. It is usually displayed on the router’s Internet or Broadband page.
In the US, most users get a public IP address at home from their ISPs. But there are more and more ISPs that put their subscribers behind Carrier Grade NAT (CGNAT), due to the increased scarcity of IPv4 addresses. Before trying to set up the VPN server on the router, check that you have a public IP address from your ISP.
Without a public IP address, your remote device running the VPN client has no way to contact your VPN server. For this post, I assume that you do have a public IP address from your ISP. I’ll address the case where you don’t have a public IP address (i.e., behind CGNAT) in another post.
If you have a dynamic IP address from your ISP, set up Dynamic DNS (DDNS) on the router. DDNS maps a domain name to your home IP address, and you can use that domain name to connect to your VPN server at home. Most routers support DDNS.
If you have a static IP address from your ISP (which is rare), you can omit this step. But you may still choose to do it if you want to access the VPN server by domain name instead of by IP address.Here’s a guide of how to set up a VPN server on the pcWRT router: The Complete Guide to Setting up a WireGuard® VPN Server at Home with pcWRT
* WireGuard® is a registered trademark of Jason A. Donenfeld.