Hello together,
i want to use code server only via vpn connection. so it should not be accessible without a vpn connection. maybe someone can help me? i am new to docker and try to fiddle around with it
current status:
the vpn works fine
port 8443 is reachable via the public ip (i do not want this to happen)
the only accessible way should be through the vpn.
when connected to the vpn: i still can only access it via public ip. <- this needs to be fixed somehow
i also tried to block the connection with ufw but encountered some weird issues so i decided to fix it on the docker level (if thats possible?)
docker-compose up -d
docker-compose.yml
version: β2.1β
services:
code-server:
image: linuxserver/code-server
container_name: code-server
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- PASSWORD=password #optional
- SUDO_PASSWORD=password #optional
- PROXY_DOMAIN=domain.tld #optional
volumes:
- ./code-server-config:/config
ports:
- 8443:8443
restart: unless-stopped
openvpn:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn
ports:
- β1194:1194/udpβ
restart: always
volumes:
- ./vpn-config:/etc/openvpn