mattesl Posted December 3, 2023 Share Posted December 3, 2023 (edited) Hi everyone, i have just installed Unraid, and i have to say it works really well. I even prefer the docker UI to portainer. That is why i am migrating my docker stack to Unraid right now. In doing so, i am setting up a Wireguard VPN, and binding various containers to it. Something i cannot find however is the option to set specific ports. A default gluetun docker-compose.yml looks something like this: version: "3" services: gluetun: image: qmcgaw/gluetun # container_name: gluetun # line above must be uncommented to allow external containers to connect. # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun cap_add: - NET_ADMIN devices: - /dev/net/tun:/dev/net/tun ports: - 8888:8888/tcp # HTTP proxy - 8388:8388/tcp # Shadowsocks - 8388:8388/udp # Shadowsocks volumes: - /yourpath:/gluetun environment: # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup - VPN_SERVICE_PROVIDER=ivpn - VPN_TYPE=openvpn # OpenVPN: - OPENVPN_USER= - OPENVPN_PASSWORD= # Wireguard: # - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= # - WIREGUARD_ADDRESSES=10.64.222.21/32 # Timezone for accurate log times - TZ= # Server list updater # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list - UPDATER_PERIOD= Specifically the "ports:" option is something i cannot find in the docker setting in Unraid. The closest thing i have found in the WEBUI is the "FIREWALL_VPN_INPUT_PORTS:" option, but that is for exposing ports I have also added the port at the bottom, which is 8080, but the qbittorent container webui is still unreacheable I thought about posting this to a gluetun forum, but this is a problem specific to Unraid, so i figured this is a better place to ask. Thanks in advance Edited December 3, 2023 by mattesl Clarification Quote Link to comment
WittyWilla Posted January 17 Share Posted January 17 (edited) With a Docker Compose file - all you need to do is press enter after the pre-set ports, and add the ports your applications will be using (and make sure you match the amount of spaces before the other ports listed). In order for the containers to use the ports given, you have to delete the ports in each container and put them into the Gluetun container / docker compose file. When you set your network mode for the containers you want to have go through your VPN instance, you want to set the network as "container" and then select your Gluetun container name as the network option. Now you should be able to use your apps with their ports as you would normally - except your ports will now be listed only on the Gluetun container. A good way to help prevent any confusion is to use a dashboard like Homarr and make easy shortcuts to access your services and/or make an excel word document and write down what each port goes to. Everything highlighted on my test server (image below) is what containers attached to Gluetun will look like ports-wise - with a long list of ports after the container name. Now, I prefer the Portainer GUI, but this should be similar other docker interfaces. Hopefully this made any sense! --w Edited February 29 by WittyWilla 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.