Jump to content
Not connected, Your IP: 18.118.0.93
Sign in to follow this  
kuchito

ANSWERED How to expose docker services to the internet?

Recommended Posts

Hi, I'm trying to expose Jellyfin to the internet through port forwarding with AirVPN. I'm trying to do a simple example of a hello world http application but I can't make it work through the airdns. My docker compose file is:

```
services:
  wan-tunneling:
    image: qmcgaw/gluetun:latest
    container_name: wan
    networks:
      - tunneling
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 29898:80
    volumes:
      - /mnt/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=XXX
      - WIREGUARD_PRESHARED_KEY=XXX
      - WIREGUARD_ADDRESSES=X.X.X/32
      - FIREWALL_VPN_INPUT_PORTS=29898
    restart: always

  hello-world:
    container_name: web-test
    network_mode: container:wan
    image: strm/helloworld-http
    stdin_open: true
    tty: true
    depends_on:
      wan-tunneling:
        condition: service_healthy
networks:
  tunneling:
    external: true
```

If I sh to the glueteun container, I can check that I'm connected to AirVPN.
Entering to localhost:29892 does shows the http service running.
29892 is a port forwarding opened in AirVPN and I also set it to local (trough UI) to 80.
When I test, is closed. 

Anyone has any insight in what I'm doing wrong? I did try the port-checker package that is in the docs of port testing for gluetun. If I run that and go to the AirVPN to check the ports, the port says it's open :(

Share this post


Link to post
@kuchito

Hello!
4 hours ago, kuchito said:

29892 is a port forwarding opened in AirVPN


No, please take note it's 29898.
 
Quote

Entering to localhost:29892 does shows the http service running.


From your description we infer that Jellyfin listens to port 29892 but from the compose file it appears that you forced Gluetun to re-direct packets for port 29898 to port 80. On your AirVPN account port panel you forwarded inbound port 29898 to your local port 29898. Therefore:
  • fix the error in the compose file: packets to port 29898 must be directed to port 29898 (and not 80)
  • fix the error in Jellyfin configuration. It must listen to port 29898 and not 29892
Alternatively (deprecated), do not touch Jellyfin configuration but modify the compose file to re-direct packets for port 29898 to port 29892 (we would not recommend this solution, it's somehow messy).

Kind regards
 

Share this post


Link to post

Sorry, I had a typo. The port is 29898.

I was able to do it now. The only problem is that it doesn't have SSL at all.
I'm wondering if it would be a better option to expose traefik and then proxy that to jellyfin so I can have the SSL from a service like cloudflare or you have a another suggestion?

 

Share this post


Link to post

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.   Paste as plain text instead

  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.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...