How to port forward on VPN established by native VPN Manager


Recommended Posts

I have a VPN created through Unraid's native VPN Manger with Peer type of access set to "VPN tunnel for docker containers only", tunnel name `wg0`. VPN tunnel works. I have multiple containers using this `wg0` for network access. They all work, and correctly go out to internet over tunnel (verified by Firefox container and ip check).

Note: this is _not_ a question about which port to open the VPN itself on.

Using hotio's qbittorrent-vpn container as a test (thanks @Davo1624 for helping), I've established that when the container creates it's _own_ VPN network (container connecting over bridge), then the qbit port is open and can be seen from the outside at the VPN exit address. If I set the container to _not_ use it's own VPN network, but instead use the `wg0` network created by Unraid's own native VPN Manager, then this port is closed. This tells me that while the container itself is reachable, the port itself needs to be open and forwarded on the VPN tunnel created by Unraid in order to pass through to the container.

I have googled several hours, but I my google-fu is coming up empty on how to correctly setup a port forward on the VPN created using Unraid's native VPN Manager.

I can't see anything within Unraid's native GUI in order to setup Port Forwarding, or what config files / settings do I need to look at?

Edited by Zxurian
Link to comment
  • 7 months later...
26 minutes ago, Houmi said:

@Zxurian, How do you have other docker containers use wg0 ? When I do this they don't seem to work / connect to the network ?

When editing the container config, set Network Type to `wg0`. Also make sure that the `wg0` connection is active under your VPN setup.

 

image.png.71abda441dd7e86b40c6e5534c076e6d.png

Edited by Zxurian
  • Thanks 1
Link to comment
10 minutes ago, Zxurian said:

When editing the container config, set Network Type to `wg0`. Also make sure that the `wg0` connection is active under your VPN setup.

 

image.png.71abda441dd7e86b40c6e5534c076e6d.png

 

Yeah it's set to custom : wg0 , and wg0 is active in VPM as I can do "wg show" and I can ping the VPS and back (10.10.92.1 & 10.10.92.2) -- maybe it's because I am using a VPS and not a commercial VPN.

Link to comment
  • 3 months later...
1 hour ago, PaulieW said:

@Zxurian did you manage to solve this? I'm running into the exact same issue, but then with binhex-qbittorrentvpn container.

Or does somebody else know the answer?

 

no, I was never able to make it work. I resolved to just running the qbittorrent_vpn container on a regular bridge. Then within the container itself, setup the VPN connection (instructions are there). For every other container I have it using the `wg0` network as described above.

Link to comment
19 minutes ago, Zxurian said:

 

no, I was never able to make it work. I resolved to just running the qbittorrent_vpn container on a regular bridge. Then within the container itself, setup the VPN connection (instructions are there). For every other container I have it using the `wg0` network as described above.

Shame. I was using the VPN connection inside the qbittorent container up to now like you are using, but that would mean that every qbittorrent container takes one device slot off of the VPN provider. And usually you only get 5 or maybe 7, so it would be nice if I could let all qbittorrent containers be connected through the same device as seen by the VPN provider.

 

That's why I'm trying the VPN manager route. Would seem strange to me if the VPN Manager can't be setup to make port forwarding work.

Link to comment
1 hour ago, PaulieW said:

Shame. I was using the VPN connection inside the qbittorent container up to now like you are using, but that would mean that every qbittorrent container takes one device slot off of the VPN provider. And usually you only get 5 or maybe 7, so it would be nice if I could let all qbittorrent containers be connected through the same device as seen by the VPN provider.

 

That's why I'm trying the VPN manager route. Would seem strange to me if the VPN Manager can't be setup to make port forwarding work.

Using through Unraid's native VPN manager would've been nice to counteract those slots. Currently, my Unraid box uses 2, one for qbit directly, and a second through VPN manager where all other containers are funneled through. From what I was able to gather, you might be able to do that with an OpenVPN configuration, but not with a WireGuard, since it's defined entirely through settings within Unraid. Also, I am _definitely_ not an expert, so if anyone else has more to say, by all means.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.