Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At least pass correct ipv6 notation if required #169

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

majst01
Copy link
Contributor

@majst01 majst01 commented Oct 20, 2022

Without this the following error occurs if target node has a ipv6 address:

Error: machine console error:failed to connect to proxy at address :1055: socks connect tcp: address fd7a:115c:a1e0::2:22: too many colons in address

But still, connection does not work because the route to the destination is not there:

/ # tailscale status                                                                                                                                                                                                                                                             
fd7a:115c:a1e0::3 badile-w2s2wqff      00000000-0000-0000-0000-000000000001 linux   -                                                                                                                                                                                            
fd7a:115c:a1e0::2 48eb9200-be80-11e9-8000-3cecef22fc1a-gprmzmmt 00000000-0000-0000-0000-000000000001 linux   active; relay "fra", tx 1436 rx 780                                                                                                                                 
/ # ssh fd7a:115c:a1e0::2                                                                                                                                                                                                                                                        
ssh: connect to host fd7a:115c:a1e0::2 port 22: Network unreachable                                                                                                                                                                                                              
/ # ip route show                                                                                                                                                                                                                                                                
default via 192.168.0.1 dev wlp0s20f3 proto dhcp metric 600                                                                                                                                                                                                                      
169.254.0.0/16 dev wlp0s20f3 scope link metric 1000                                                                                                                                                                                                                              
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown                                                                                                                                                                                                        
172.19.0.0/16 dev br-7085f5a6d64b proto kernel scope link src 172.19.0.1                                                                                                                                                                                                         
192.168.0.0/22 dev wlp0s20f3 proto kernel scope link src 192.168.1.132 metric 600                                                                                                                                                                                                
/ # ip -6 route show                                                                                                                                                                                                                                                             
::1 dev lo proto kernel metric 256 pref medium                                                                                                                                                                                                                                   
2001:db8:1::/64 dev docker0 proto kernel metric 256 linkdown pref medium                                                                                                                                                                                                         
2001:db8:1::/64 dev docker0 metric 1024 linkdown pref medium                                                                                                                                                                                                                     
fc00:f853:ccd:e793::/64 dev br-7085f5a6d64b proto kernel metric 256 pref medium                                                                                                                                                                                                  
fc00:f853:ccd:e793::/64 dev br-7085f5a6d64b metric 1024 pref medium                                                                                                                                                                                                              
fe80::/64 dev docker0 proto kernel metric 256 linkdown pref medium                                                                                                                                                                                                               
fe80::/64 dev br-7085f5a6d64b proto kernel metric 256 pref medium                                                                                                                                                                                                                
fe80::/64 dev tailscale0 proto kernel metric 256 pref medium                                                                                                                                                                                                                     
fe80::/64 dev vethcd20a9e proto kernel metric 256 pref medium                                                                                                                                                                                                                    
fe80::/64 dev wlp0s20f3 proto kernel metric 1024 pref medium   
/ # ip -6 route show table 52                              
-- is empty

Adding this route by hand does not work:

/ # ip -6 route add fd7a:115c:a1e0::/48 dev tailscale0 table 52
RTNETLINK answers: Operation not permitted
/

@majst01 majst01 requested a review from a team as a code owner October 20, 2022 06:03
@majst01
Copy link
Contributor Author

majst01 commented Oct 20, 2022

Without this the following error occurs if target node has a ipv6 address:

Error: machine console error:failed to connect to proxy at address :1055: socks connect tcp: address fd7a:115c:a1e0::2:22: too many colons in address

But still, connection does not work because the route to the destination is not there:

/ # tailscale status                                                                                                                                                                                                                                                             
fd7a:115c:a1e0::3 badile-w2s2wqff      00000000-0000-0000-0000-000000000001 linux   -                                                                                                                                                                                            
fd7a:115c:a1e0::2 48eb9200-be80-11e9-8000-3cecef22fc1a-gprmzmmt 00000000-0000-0000-0000-000000000001 linux   active; relay "fra", tx 1436 rx 780                                                                                                                                 
/ # ssh fd7a:115c:a1e0::2                                                                                                                                                                                                                                                        
ssh: connect to host fd7a:115c:a1e0::2 port 22: Network unreachable                                                                                                                                                                                                              
/ # ip route show                                                                                                                                                                                                                                                                
default via 192.168.0.1 dev wlp0s20f3 proto dhcp metric 600                                                                                                                                                                                                                      
169.254.0.0/16 dev wlp0s20f3 scope link metric 1000                                                                                                                                                                                                                              
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown                                                                                                                                                                                                        
172.19.0.0/16 dev br-7085f5a6d64b proto kernel scope link src 172.19.0.1                                                                                                                                                                                                         
192.168.0.0/22 dev wlp0s20f3 proto kernel scope link src 192.168.1.132 metric 600                                                                                                                                                                                                
/ # ip -6 route show                                                                                                                                                                                                                                                             
::1 dev lo proto kernel metric 256 pref medium                                                                                                                                                                                                                                   
2001:db8:1::/64 dev docker0 proto kernel metric 256 linkdown pref medium                                                                                                                                                                                                         
2001:db8:1::/64 dev docker0 metric 1024 linkdown pref medium                                                                                                                                                                                                                     
fc00:f853:ccd:e793::/64 dev br-7085f5a6d64b proto kernel metric 256 pref medium                                                                                                                                                                                                  
fc00:f853:ccd:e793::/64 dev br-7085f5a6d64b metric 1024 pref medium                                                                                                                                                                                                              
fe80::/64 dev docker0 proto kernel metric 256 linkdown pref medium                                                                                                                                                                                                               
fe80::/64 dev br-7085f5a6d64b proto kernel metric 256 pref medium                                                                                                                                                                                                                
fe80::/64 dev tailscale0 proto kernel metric 256 pref medium                                                                                                                                                                                                                     
fe80::/64 dev vethcd20a9e proto kernel metric 256 pref medium                                                                                                                                                                                                                    
fe80::/64 dev wlp0s20f3 proto kernel metric 1024 pref medium   
/ # ip -6 route show table 52                              
-- is empty

Adding this route by hand does not work:

/ # ip -6 route add fd7a:115c:a1e0::/48 dev tailscale0 table 52
RTNETLINK answers: Operation not permitted
/

I think the problem is related to the socks address which is ipv4 ( :1055 ) and should probably also be ipv6 in case the destination is ipv6, tried already with: [::1]:1055 but with no luck:

Error: firewall ssh error:failed to connect to proxy at address [::1]:1055: socks connect tcp [::1]:1055->[fd7a:115c:a1e0::2]:22: unknown error general SOCKS server failure

Copy link
Contributor

@GrigoriyMikhalkin GrigoriyMikhalkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. Works fine. LGTM

@majst01 majst01 merged commit a58bc61 into master Oct 20, 2022
@majst01 majst01 deleted the support-ipv6-tunnel-endpoints branch October 20, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants