I think I have got a hint…
On my local machine,
➜ ~ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 14:c2:13:11:93:ca brd ff:ff:ff:ff:ff:ff
inet 10.20.30.123/24 brd 10.20.30.255 scope global noprefixroute wlp3s0
valid_lft forever preferred_lft forever
inet6 fe80::d33:e6e0:94b8:d2c5/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 100.74.95.101/32 scope global tailscale0
valid_lft forever preferred_lft forever
inet6 fd7a:115c:a1e0:ab12:4843:cd96:624a:5f65/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::3b0f:94cf:1649:c974/64 scope link stable-privacy
valid_lft forever preferred_lft forever
On my remote machine,
ubuntu@vm1:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:00:17:00:78:98 brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 10.0.0.112/24 brd 10.0.0.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 2603:c024:8000:bfee:e:e:e:e/128 scope global dynamic noprefixroute
valid_lft 7330sec preferred_lft 7030sec
inet6 fe80::17ff:fe00:7898/64 scope link
valid_lft forever preferred_lft forever
3: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 100.98.53.104/32 scope global tailscale0
valid_lft forever preferred_lft forever
inet6 fd7a:115c:a1e0:ab12:4843:cd96:6262:3568/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::7b1:1a29:96aa:96b/64 scope link stable-privacy
valid_lft forever preferred_lft forever
When I ping Google DNS’s ipv4 address from my client,
ping -c 1 8.8.8.8
Wireshark on local machine shows icmp traffic going through tailscale interface.
tcpdump on remote machine’s tailscale interface shows
ubuntu@vm1:~$ sudo tcpdump -n -i tailscale0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tailscale0, link-type RAW (Raw IP), capture size 262144 bytes
06:03:42.424900 IP 100.74.95.101 > 8.8.8.8: ICMP echo request, id 28, seq 1, length 64
06:03:42.439635 IP 8.8.8.8 > 100.74.95.101: ICMP echo reply, id 28, seq 1, length 64
tcpdump on remote machine’s ens3 interface shows
ubuntu@vm1:~$ sudo tcpdump -n -i ens3 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
06:03:42.424945 IP 10.0.0.112 > 8.8.8.8: ICMP echo request, id 28, seq 1, length 64
06:03:42.439619 IP 8.8.8.8 > 10.0.0.112: ICMP echo reply, id 28, seq 1, length 64
We note that in tailscale interface, source address of ping request was 100.74.95.101 (local machine tailscale ipv4) and in ens3 interface, source address of ping request got changed to 10.0.0.112 (remote machine ens3 interface ipv4)
In Contrast, When I ping Google DNS’s ipv6 address from my client,
ping -6 -c 1 2001:4860:4860::8888
Wireshark on local machine shows icmpv6 traffic going through tailscale interface.
tcpdump on remote machine’s tailscale interface shows
ubuntu@vm1:~$ sudo tcpdump -n -i tailscale0 icmp6
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tailscale0, link-type RAW (Raw IP), capture size 262144 bytes
06:12:34.913091 IP6 fd7a:115c:a1e0:ab12:4843:cd96:624a:5f65 > 2001:4860:4860::8888: ICMP6, echo request, seq 1, length 64
tcpdump on remote machine’s ens3 interface shows
ubuntu@vm1:~$ sudo tcpdump -n -i ens3 icmp6
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens3, link-type EN10MB (Ethernet), capture size 262144 bytes
06:12:34.913119 IP6 fd7a:115c:a1e0:ab12:4843:cd96:624a:5f65 > 2001:4860:4860::8888: ICMP6, echo request, seq 1, length 64
06:12:39.976476 IP6 fe80::17ff:fe00:7898 > fe80::200:17ff:fee1:645e: ICMP6, neighbor solicitation, who has fe80::200:17ff:fee1:645e, length 32
06:12:39.976584 IP6 fe80::200:17ff:fee1:645e > fe80::17ff:fe00:7898: ICMP6, neighbor advertisement, tgt is fe80::200:17ff:fee1:645e, length 32
We note that in tailscale interface, source address of ping request was fd7a:115c:a1e0:ab12:4843:cd96:624a:5f65 (local machine tailscale ipv6) and in ens3 interface, source address of ping request was still the same (local machine tailscale ipv6)
So I wonder if this is the reason. On the remote machine,
In case of ipv4, when the ping request is received from local machine on tailscale0 interface, it gets forwarded to ens3 interface, with the source address changed to ens3 interface’s ip
when the ping response is received, it gets forwarded to tailscale0 interface, with the destination address set to local machine’s ip
But in case of ipv6 this is not happening, the source address is set to tailscale ipv6 address of local machine, while the request is being sent from ens3 interface of remote machine to internet, so the ping response never reaches the remote machine.
Apologies for the verboseness of my description, I want to avoid any possible confusion.
Can anyone please confirm if this could be what is going wrong?