Skip to content

Commit a719469

Browse files
committed
🏴‍☠️ Gluetun gets TUN, NET_ADMIN, and full privileges to sail VPN seas! ⚓
1 parent e965289 commit a719469

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docker-compose.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ services:
8787
container_name: privateerr-${PRIVATEERR_TAG} # Append Docker image tag to container name
8888
restart: "no" # Do not restart the container once it exits
8989
hostname: privateerr # Set the container hostname
90-
privileged: true # Run in privileged mode
90+
privileged: true # Run with full host privileges
9191

9292
# Add container labels
9393
labels:
@@ -119,10 +119,12 @@ services:
119119
image: qmcgaw/gluetun:${GLUETUN_TAG} # Run using the specified tag
120120
container_name: gluetun-${GLUETUN_TAG} # Append Docker image tag to container name
121121
hostname: gluetun # Set the container hostname
122-
cap_add: # Add additional linux capabilities
123-
- NET_ADMIN # Allow modification of network interfaces
124122

125-
# Add container devices
123+
# Add additional linux capabilities
124+
cap_add:
125+
- NET_ADMIN # Grant network admin capability for VPN and network interface configuration
126+
127+
# Pass host devices into the container for direct hardware access
126128
devices:
127129
- /dev/net/tun:/dev/net/tun # Allow container to handle encrypted VPN traffic directly
128130

0 commit comments

Comments
 (0)