Any suggestions to access a docker container hosted on VPS

Published

Hi All,

I've got a Hetzner VPS running Debian 10. I thought I'd have a go at learning about docker/portainer. I followed this guide to create a stack (VPN & download client).

https://www.youtube.com/watch?v=BZ1LOMJqEkM

Both containers seem to have created ok. Log reports that VPN is connected (NordVPN). But I cant access the download client (Transmission on port 9091).

Testing results:

On the VPS (remote desktop)

  • localhost:9091 – connection was reset
  • externalIP:9091 – connection was reset

Remote access (home PC)

  • externalIP:9091 – connection timed out

Port 9091 is opened in UFW.

code I used to create the stack is:

version: 2

services:

vpn:

image: bubuntux/nordvpn

container_name: vpn

network_mode: bridge # Required

cap_add:

– NET_ADMIN # Required

– SYS_MODULE # Required for TECHNOLOGY=NordLynx

# sysctls:

# – net.ipv4.conf.all.rp_filter=2

devices:

– /dev/net/tun # Required

environment: # Review https://github.com/bubuntux/nordvpn#environment-variables

– USER=[<](mailto:[email protected])username>

– "PASS=<password>

– CONNECT=<country>

– TECHNOLOGY=NordLynx

– NETWORK=<external_IP>

ports:

– 8080:8080

– 9091:9091

– 51413:51413

– 51413:51413/udp

transmission:

image: linuxserver/transmission

container_name: transmission

environment:

– PUID=1000

– PGID=1000

– TZ=<TZ>

volumes:

– /home/<user>/docker/transmission:/config

– /data/Downloads:/downloads

– /home/<user>/Documents/watch:/watch

restart: unless-stopped

network_mode: service:vpn

Thanks!

submitted by /u/moshka1000
[link] [comments]
Source: Reddit

Published
Categorised as r/docker

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq