Skip to content

Commit 60a8898

Browse files
chore: enhance Tailscale Docker Compose configuration with IP forwarding
- Remove comments for SYS_MODULE and TS_USERSPACE for cleaner configuration. - Add sysctls to enable IP forwarding for both IPv4 and IPv6, improving routing capabilities.
1 parent 8a296fb commit 60a8898

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

server/docker-compose-tailscale.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,23 @@ services:
3636
hostname: port.tcp.go
3737
cap_add:
3838
- NET_ADMIN
39-
- SYS_MODULE # Add this for better kernel support
39+
- SYS_MODULE
4040
devices:
4141
- /dev/net/tun:/dev/net/tun
4242
volumes:
4343
- ./ts-state:/var/lib/tailscale
44-
- /lib/modules:/lib/modules:ro # Add this for kernel module support
44+
- /lib/modules:/lib/modules:ro
4545
networks:
4646
rabbit-net:
4747
ipv4_address: 172.30.0.2
4848
environment:
4949
- TS_AUTHKEY=${TS_AUTHKEY}
5050
- TS_STATE_DIR=/var/lib/tailscale
5151
- TS_EXTRA_ARGS=--hostname=port.tcp.go --advertise-routes=172.30.0.0/24 --accept-routes
52-
- TS_USERSPACE=false # Use kernel networking for better performance
52+
- TS_USERSPACE=false
53+
sysctls: # ADD THIS
54+
- net.ipv4.ip_forward=1 # Enable IP forwarding
55+
- net.ipv6.conf.all.forwarding=1
5356

5457
networks:
5558
rabbit-net:

0 commit comments

Comments
 (0)