# 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

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

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

<span style="text-decoration: underline;">Country</span>:

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

→ Should return `US`

<span style="text-decoration: underline;">City:</span>

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

→ Should return `Los Angeles`

---

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

```bash
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:

```bash
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

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

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

```bash
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.

```bash
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

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

Now bring the VPN (Gluetun) back up:

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