-
-
Notifications
You must be signed in to change notification settings - Fork 436
Closed
Labels
wontfixThis will not be worked onThis will not be worked on
Description
Expected Behavior
the command curl api.ipify.org from within the container should fail if the VPN connection is not up
Current Behavior
the command curl api.ipify.org from within the container succeeds & shows the docker host's external IP address if the VPN connection is not up
Steps to Reproduce
- put a valid
wg0.confin./config - start this docker-compose file to run wireguard in client mode:
version: "3.7"
services:
vpn-client:
image: linuxserver/wireguard
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- TZ=America/Los_Angeles
volumes:
- /lib/modules:/lib/modules
- ./config:/config
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- run
docker exec -it vpn-client_1 curl api.ipify.org. you will see the IP address of your VPN server exit node as expected. - delete
./config/wg0.confthen rundocker restart vpn-client_1. now the connection should fail. we can confirm from the logs:
**** Client mode selected. ****
**** No client conf found. Provide your own client conf as "/config/wg0.conf" and restart the container. ****
- run
docker exec -it vpn-client_1 curl api.ipify.orgagain. we expect the request to fail this time, but instead you will see the external IP address of the docker host
Environment
OS: dietpi
CPU architecture: x86_64/arm32/arm64
How docker service was installed: i don't remember
Command used to create docker container (run/create/compose/screenshot)
Docker logs
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on
