Coder Social home page Coder Social logo

Comments (11)

willzhang avatar willzhang commented on July 24, 2024 8

dont give up

查看注册的节点列表

/ # headscale nodes ls
ID | Name        | NodeKey | Namespace        | IP addresses                  | Ephemeral | Last seen           | Online | Expired
1  | will-laptop | [YC7fY] | myfirstnamespace | fd7a:115c:a1e0::1, 100.64.0.1 | false     | 2022-06-29 11:36:12 | online | no     
2  | willpc      | [VLyBR] | myfirstnamespace | fd7a:115c:a1e0::2, 100.64.0.2 | false     | 2022-06-29 11:36:42 | online | no     

删除节点

# headscale nodes delete -i 2

查看客户端发布的subnet

/ # headscale nodes routes list -i 2
Route           | Enabled
192.168.72.0/24 | false  
192.168.93.0/24 | false 

启用客户端发布的subnet

/ # headscale nodes routes enable -i 2 -r 192.168.93.0/24,192.168.72.0/24
Route           | Enabled
192.168.72.0/24 | true   
192.168.93.0/24 | true

from headscale.

juanfont avatar juanfont commented on July 24, 2024

@Probotect0r yep, it is supported. You have to use the CLI client.

headscale -n NAMESPACE routes list NODENAME
headscale -n NAMESPACE routes enable NODENAME ROUTE

Can you give it a try?

from headscale.

Probotect0r avatar Probotect0r commented on July 24, 2024

@juanfont
Thanks for the response. Unfortunately it's not working for me. Here is what I have done:

Enable the route and start headscale server:

headscale -n myfirstnamespace routes enable NODENAME 10.1.0.0/16
headscale serve

Run tailscale:

sudo tailscale up --login-server http://localhost:8080 --advertise-routes=10.1.0.0/16

Run MacOS client. It connects successfully.

/Applications/Tailscale.app/Contents/MacOS/Tailscale up -login-server http://myserver:8080 --accept-routes --authkey myauthkey

Then I am trying to run this from my Mac, but it is not responding. This same command works when I run it on the EC2 instance running Tailscale.

curl http://10.1.16.253:4000/

Note that Tailscale and Headscale are running on the same EC2 instance, hence the use of localhost for login-server when starting tailscale.

Any ideas what I am doing wrong?

from headscale.

Probotect0r avatar Probotect0r commented on July 24, 2024

I seem to be able to ping the host via tailscale:

/Applications/Tailscale.app/Contents/MacOS/Tailscale ping 10.1.16.253
pong from ip-10-1-71-161 (100.64.0.1) via 18.117.81.172:41641 in 32ms

Do I have to do something in the Tailscale client to specifically connect to the EC2 instance?

Edit:
Actually, I can't even seem to connect to the EC2 instance itself via SSH over Tailscale, so maybe something else is not working.

from headscale.

a1ad avatar a1ad commented on July 24, 2024

I don't have this issue. Do you still have this? Are you running tailscale and headscale on the same server? (sudo tailscale up --login-server http://localhost:8080) using localhost on the client suggest just that?

from headscale.

juanfont avatar juanfont commented on July 24, 2024

I am going to close this. We haven being able to replicate it.

from headscale.

Probotect0r avatar Probotect0r commented on July 24, 2024

I couldn't get it working so I abandoned my efforts.

from headscale.

lqqkk avatar lqqkk commented on July 24, 2024

I had the same problem. Changed route to TRUE as follows:

Route | Enabled
0.0.0.0/0 | false
::/0 | false
192.168.50.0/24 | true

But the subnet still doesn't work. What else needs to be configured?

from headscale.

iamid0 avatar iamid0 commented on July 24, 2024

Need to enable ip_forward on the server which advertises the custom route.

from headscale.

Nothend avatar Nothend commented on July 24, 2024

thanks a lot buddy ! I have a question , my headscale is installed in docker-compose , when i send the command "docker exec -it headscale headscale nodes routes list -i 2" , it shows "Error: unknown shorthand flag: 'i' in -i"

image

but when i send the command " docker exec -it headscale headscale nodes ls" ,it works right .
image

and the command "docker exec -it headscale /bin/sh " , it shows "OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown" .

it seems the command "routes" is not supportted in docker ?

please help me , thanks a lot

from headscale.

unknown1818 avatar unknown1818 commented on July 24, 2024

thanks a lot buddy ! I have a question , my headscale is installed in docker-compose , when i send the command "docker exec -it headscale headscale nodes routes list -i 2" , it shows "Error: unknown shorthand flag: 'i' in -i"

image

but when i send the command " docker exec -it headscale headscale nodes ls" ,it works right . image

and the command "docker exec -it headscale /bin/sh " , it shows "OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown" .

it seems the command "routes" is not supportted in docker ?

please help me , thanks a lot

you need to use
sudo docker exec headscale headscale routes list
command
or to enable by ID 1
sudo docker exec headscale headscale routes enable -r 1

from headscale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.