Jump to content

Gluetun Port Options


mattesl

Recommended Posts

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 by mattesl
Clarification
Link to comment
  • 1 month later...

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.

 

 

 

C4Nvoug.png

Hopefully this made any sense!

 

--w

Edited by WittyWilla
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.

×
×
  • Create New...