gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

during agent installation using the "agent install command with access token" I end up w config using my Router's Public IP address #125

Closed bmullan closed 3 years ago

bmullan commented 3 years ago

Note: the IP address 45.37.56.251 is the PUBLIC IP of my cable/wifi router ???

As I did not enter that IP something in one of the scripts detected that IP and decided to put it into the Config ??

Decoded values from token: Server: 45.37.56.251:50051

I see this...

Your Access Key: KSzrMxq4mn3Ceqfk

Your Access Token: NDUuMzcuNTYuMjUxOjUwMDUxfGRlZmF1bHR8S1N6ck14cTRtbjNDZXFma3w=

Please save your key as you will be unable to access it again.

Your agent install command with access token: sudo curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netclient-install.sh | KEY=NDUuMzcuNTYuMjUxOjUwMDUxfGRlZmF1bHR8S1N6ck14cTRtbjNDZXFma3w= sh -

I get this error when the above command is executed:

sudo curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netclient-install.sh | KEY=NDUuMzcuNTYuMjUxOjUwMDUxfGRlZmF1bHR8S1N6ck14cTRtbjNDZXFma3w= sh - --2021-04-22 13:08:47-- https://github.com/gravitl/netmaker/releases/download/latest/netclient Resolving github.com (github.com)... 140.82.112.4 Connecting to github.com (github.com)|140.82.112.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/351486934/da310280-a151-11eb-9ffc-4bd56b2c3b8b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210422%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210422T170847Z&X-Amz-Expires=300&X-Amz-Signature=2588fe6c43e34073c5dcf7f6fc6258a52895a3a4a9678445d1df4140188e6b54&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=351486934&response-content-disposition=attachment%3B%20filename%3Dnetclient&response-content-type=application%2Foctet-stream [following] --2021-04-22 13:08:47-- https://github-releases.githubusercontent.com/351486934/da310280-a151-11eb-9ffc-4bd56b2c3b8b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210422%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210422T170847Z&X-Amz-Expires=300&X-Amz-Signature=2588fe6c43e34073c5dcf7f6fc6258a52895a3a4a9678445d1df4140188e6b54&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=351486934&response-content-disposition=attachment%3B%20filename%3Dnetclient&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.110.154, 185.199.109.154, 185.199.108.154, ... Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.110.154|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 14192920 (14M) [application/octet-stream] Saving to: ‘netclient’

netclient 100%[==========================================================================>] 13.54M 19.8MB/s in 0.7s

2021-04-22 13:08:48 (19.8 MB/s) - ‘netclient’ saved [14192920/14192920]

Beginning agent installation.

Decoded values from token: Server: 45.37.56.251:50051 Network: default Key: KSzrMxq4mn3Ceqfk Local Range: Not a local network. Will use public address for endpoint. SERVER SETTINGS: Server: 45.37.56.251:50051 AccessKey: KSzrMxq4mn3Ceqfk Writing to existing config file at /etc/netclient/netconfig-default NODE REQUESTING SETTINGS: Password: changeme Network: default Local Address: 192.168.1.241 Endpoint set in config. Setting to address: 45.37.56.251 Endpoint: 45.37.56.251 Name: Interface: PostUp: PostDown: KeepAlive: Port: 51821 Mac Address: 54:ee:75:0c:53:4c Private Key: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= Public Key: ghs9HOhGiwO2BUeb8bLxp79igA/NzrBqLTyx0Sp75jM= Writing node settings to netconfig file. Error encountered while installing. Error installing: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 45.37.56.251:50051: connect: connection refused" Cleaning up (uninstall) Error uninstalling: open /etc/netclient/netconfig-nonetwork: no such file or directory Wiping local. Error removing artifacts: open /etc/netclient/netconfig-nonetwork: no such file or directory Failed to stop netclient-nonetwork.timer: Unit netclient-nonetwork.timer not loaded. Error stopping netclient-nonetwork.timer. Please investigate. exit status 5 Failed to disable unit: Unit file netclient-nonetwork.timer does not exist. Error disabling netclient-nonetwork.timer. Please investigate. exit status 1 Error removing file. Please investigate. remove /etc/systemd/system/netclient-nonetwork.timer: no such file or directory

afeiszli commented 3 years ago

Hi Brian, yes that is the idea. We are trying to minimize the necessary config upfront, so if you do not specify an IP address, it will set one automatically for you.

afeiszli commented 3 years ago

However, that can be modified or set with the install command and then it wont detect.

bmullan commented 3 years ago

But that's what I said... I did specify the IP address and Netmaker still inserted the Public Internet facing IP of my cable modem/wifi router

Also... fyi but I'm building a couple Bash scripts to do all of this Non Docker install work but I have to get it to complete first.

Brian

On Thu, Apr 22, 2021 at 2:15 PM Alex @.***> wrote:

However, that can be modified or set with the install command and then it wont detect.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gravitl/netmaker/issues/125#issuecomment-825076912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM23JYXZPMS2I3GBAJ5QQTTKBRSLANCNFSM43M646MA .

afeiszli commented 3 years ago

Where do you specify the IP? I'm not seeing that in the output. The token does not contain the client machine's IP, just the server.

afeiszli commented 3 years ago

@bmullan