Zxurian Posted May 7, 2023 Share Posted May 7, 2023 (edited) 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 May 7, 2023 by Zxurian Quote Link to comment
Houmi Posted December 10, 2023 Share Posted December 10, 2023 (edited) @Zxurian, How do you have other docker containers use wg0 ? When I do this they don't seem to work / connect to the network ? Edited December 10, 2023 by Houmi Quote Link to comment
Zxurian Posted December 10, 2023 Author Share Posted December 10, 2023 (edited) 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. Edited December 10, 2023 by Zxurian 1 Quote Link to comment
Houmi Posted December 10, 2023 Share Posted December 10, 2023 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. 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. Quote Link to comment
PaulieW Posted March 15 Share Posted March 15 @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? Quote Link to comment
Zxurian Posted March 15 Author Share Posted March 15 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. Quote Link to comment
PaulieW Posted March 15 Share Posted March 15 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. Quote Link to comment
Zxurian Posted March 15 Author Share Posted March 15 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. Quote Link to comment
Recommended Posts
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.