GLiNet Router as VPN client and gateway

I wanted to ask if the following network-configuration is easily possible with a GL.iNet-Router.

In my network (network A) I have a server that hosts several services (e.g. nextcloud on port 8080) and to which I have access from my PC as well as smartphone if I connect to the VPN internet router via wireguard.

However, I thought about about also giving my family access to my server. Because they use the internet router from their internet provider which doesn’t support many features and to make the setup easier I thought that I use a GL-MT300N-V2 (Mango) as VPN client which also acts as a kind of proxy or gateway.

The VPN client gets an IP address from the router of the network B as well as when connected via wireguard to my VPN internet router. When then for example Client B1 wants to access my nextcloud instance on my server ( they enter The VPN client then forwards the request to and sends the response back to Client B1 (

So I don’t want to connect multiple network segments, I just want the GL-MT300N-V (Mango) to connect via wireguard to the VPN internet router and forwards every request on its IP address except port 80 (for the GL.iNet webpage) to the server.

Because I guess the GL.iNet configuration page does not support this feature via its GUI, I guess I need to use the luCI interface and enter some commands. However, because I have not worked with OpenWRT before, I wanted to ask, if someone knows how I would need to configure the mini router to act this way.

Thanks in advance

1 Like

I would say that this might work with additional settings. In my opinion you would need to use nginx as some reverse proxy on the GL.iNet router then - but I am not sure if this works with all features of Nextcloud (like the Webdav client f.e.)

So basically the better way to use proper routing so your family will access your Nextcloud just by it’s local IP and the traffic will send through the VPN - so different networks. (Which is crucial for it.)

Another idea might be to look into ZeroTier and use the client on all devices instead of getting a VPN router.

Great first post, included a diagram and everything! Welcome to the community.

Thanks for the replies. I had a short look on Cloudflare and Tailscale but decided not to look further into it. Currently it is a free service but don’t know if they change their policy some time in the future and require a monthly fee or so.

What do you mean by proper routing exactly?

I came across nginx, caddy etc. as well as openwrt-policy-based-routing and IP forwarding with iptables rules but I am not sure how the functionality I seek is called and which tool provides it.

So basically I want the mini router in network B to mimic my remote server on network A that is connected via wireguard. Ideally excluding port 80 in case I need to reconfigure the mini router again in the future.

I thought about the approach with the openwrt mini router because I can easily test it at home and when everything is set up correctly I can take it with me the next time I travel to my parents and just connect it to their network to give them access to the server. So no exchanging and reconfiguring their internet-router is needed as well as configuring wireguard on all the clients.