= How do I connect an Ubuntu VPS to my home's Wireguard server? =

![ ](httpswww.redditstatic.com/desktop2x/img/renderTimingPixel.png)

I want to connect a Ubuntu 20.04 VPS to my home network via wireguard. The VPN is at home and I would like to know how I can connect this CLI based OS to wireguard so I can use NGINX reverse proxy. Thank yoU!

![ ](httpswww.redditstatic.com/desktop2x/img/renderTimingPixel.png)

I'm not entirely sure I know the answer. But I think you are asking: How do you add an external VPS to my home network so that I can use the VPS as a reverse proxy to my home network?

I have done no research, but in my mind you would need to setup a tunnel to your VPS from a client within your home network (your VPN connection already in existence). Then you would need to set the services you wish to access to go via your VPN as their default gateway.

Alternatively, anything connecting via your VPS will need to have an IP lookup table on the Wireguard server inside your network. That way when the traffic enters your home network it knows where to look.

I just did this. I had a hard time figuring it out cause there is not much out there. This is a guide I followed that worked.

httpswww.selfhosted.pro/hl/wireguard_vps/

httpsyoutu.be/7yC-gJtl9mQ

Be sure to use some kind of firewall to block off access to the rest of the network. A reverse proxy should really only be able to hit the exact location.

Framed a different way: if your VPS is compromised, it could give unencumbered access to your home network (or to an employee at the VPS provider).

httpstech.serhatteker.com/post/2021-01/how-to-set-up-wireguard-client-on-ubuntu-desktop/

Just remember to add persistentKeepalive parameter on the client config. And set the allowed ips for your wireguard subnet. Instead of 0.0.0.0/0

== About Community ==

Members

Online