Gluetun

Test Gluetuns ip address to make sure it is using the VPN (inside docker container)

These methods use the docker containers

Method 1 – built-in wget

docker exec -it gluetun wget -qO- https://ifconfig.co

→ Should return a single IP like `185.193.124.57` (an IVPN Los Angeles IP)

Country:

docker exec -it gluetun wget -qO- https://ifconfig.co/country-iso

→ Should return `US`

City:

docker exec -it gluetun wget -qO- https://ifconfig.co/city

→ Should return `Los Angeles`


Method 2 – even simpler, one-liner from your host


docker run --rm --network container:gluetun alpine wget -qO- https://ifconfig.co

This spins up a tiny Alpine container that shares gluetun’s exact network stack and prints your public IP in one shot.  
If it prints an IVPN IP → your VPN + kill-switch are 100 % working.


Method 3 – check gluetun logs (you already have this)


Just look at the last 10 lines:

docker logs gluetun --tail 10

You should see something like:

[wireguard] Handshake complete
[ivpn] Using city Los Angeles
Public IP: 185.193.124.57
[port forwarding] successfully enabled on port 54321

That “Public IP: xxx” line is exactly what the internet sees — if it’s not your home IP, you’re golden.


Test Gluetuns ip connection | cut the connection in Docker

Version 1

# Should show IVPN IP

docker exec qbittorrent curl -m 10 https://ifconfig.co


# Kill the tunnel (this should auto reconnect if your settings are set up that way)

docker exec gluetun pkill -f wireguard-go


# MUST timeout now: this shows your connection. If it connects REALLY fast, you may not notice that it ever got cut. 

docker exec qbittorrent curl -m 10 https://ifconfig.co || echo "KILL-SWITCH 100% WORKING — NO LEAK"


Version 2

Cut the vpn connection from Gluetun to your other apps

docker exec gluetun /bin/sh -c "kill \$(cat /tmp/wireguard.pid)"

Now bring the VPN (Gluetun) back up:

docker exec gluetun /bin/sh -c "wg-quick up wg0"