tailscale: Can't Ping Tailscale Machines From Docker
What is the issue?
I have Tailscale running on Android Phone and as a docker container on Ubuntu 22.04.2. I am trying to set tailscale up in subnet routing mode from the Ubuntu machine, but this is not working. I also cannot ping any of the other machines on the tailnet.``
Steps to reproduce
I am using the Android app on the android phone. On my Ubuntu machine, I am using this docker-compose file:
version: '3.8'
services:
tailscale:
image: tailscale/tailscale
container_name: tailscale
restart: always
privileged: true
command: /bin/sh -c "tailscaled --tun=userspace-networking"
cap_add:
- NET_ADMIN
- SYS_ADMIN
environment:
- TS_AUTHKEY=${TAILSCALE_AUTH_KEY}
- TS_ROUTES=192.168.50.0/24
volumes:
- /etc/docker/tailscale:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
after the docker container is up, I am running sudo docker exec tailscale tailscale up --auth-key=tskey-auth-AUTHKEY --advertise-routes=192.168.50.0/24 --hostname=hostName --accept-routes
After this point, running
sudo docker exec tailscale tailscale ping AndroidPhoneName pong from AndroidPhoneName (100.102.174.X) via DERP(tor) in 401ms
But a regular ping times out:
ping 100.102.174.X PING 100.102.174.X (100.102.174.X) 56(84) bytes of data.
Additionally
sudo docker exec tailscale tailscale ping --tsmp 100.102.174.X ping “100.102.174.X” timed out
Are there any recent changes that introduced the issue?
No response
OS
Linux, Android
OS version
Ubuntu 22.04.2
Tailscale version
No response
Other software
No response
Bug report
Docker container: BUG-5904a47322fd35a5404973b6f033d4f6f17d5e7ec072d3bd52d717ea7ca7657a-20230227181435Z-9d7d6058e8349c44 Android device: BUG-f349d36777b462ac621e2d53952e7b73df791b27f0d1fb831a8787501d19a3bd-20230227181604Z-07a087fb0dc032c1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (6 by maintainers)
@NathanMagnus something appears to be wrong in the routing table, there are no ACL evaluations about ICMP around the time of the bugreport. Even if the ping fails, the packet should trigger ACL evaluations when it tries to egress the node. It is like the ping is being sent to a different network interface.
@nunofgs your issue is different. Near the BUG line:
2023-03-03 22:46:08.198153883 +0000 UTC: Program starting: v1.36.2-t0438c67e2, Go 1.19.4-tsdc0ce6324d: []string{"tailscaled", "--socket=/tmp/tailscaled.sock", "--statedir=/var/lib/tailscale", "--tun=userspace-networking"}tailscaledis starting up in userspace-networking mode, meaning the /dev/net/tun device isn’t available. In userspace-networking mode applications have to use a SOCKS5 proxy to be able to initiate connections to the tailnet, and ping does not.I’d suggest setting TS_USERSPACE=false and seeing if it complains about what is wrong when it starts up.