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

[Bug]: v0.20.2 AWS ec2 instance with elastic IP error acting as ingress #2413

Closed jlopezcrd closed 1 year ago

jlopezcrd commented 1 year ago

Contact Details

jorge.lopez@dreams.es

What happened?

Installing the new version of netmaker v0.20.2 using the script nm-quick.sh I have the following error:

2023/06/22 09:04:19 Error Status: 500 Response: {"Code":500,"Message":"ingress cannot be created on nodes behind NAT"}

In the full output log, the endpointip has the correct public ip of my instance.

After read it, I tried the action from the "clients" option in the dashboard, but it the same issue.

Failed to create client - ingress cannot be created on nodes behind NAT

Also, I tried changing the yml config file (/etc/netclient/nodes.yml):

isingressgateway: true

But when I restarted the systemd service netclient the file is reverted to the previous config.

When you launch instances in aws, always is behind nat (internet gateway service), but really has a static and public ip.

How I set the correct config successfully?

Version

v0.20.2

What OS are you using?

Linux

Relevant log output

register complete. New node ID: xxxxxxx
making host a default
Host ID: xxxxxxx
{
  "id": "xxxxxxx",
  "verbosity": 0,
  "firewallinuse": "",
  "version": "v0.20.2",
  "name": "ip-xxxxx",
  "os": "linux",
  "debug": false,
  "isstatic": false,
  "listenport": 51821,
  "locallistenport": 0,
  "proxy_listen_port": 51722,
  "public_listen_port": 0,
  "wg_public_listen_port": 0,
  "mtu": 1420,
  "interfaces": [
    {...}
  ],
  "defaultinterface": "ens5",
  "endpointip": "xxxxxx",
  "publickey": "xxxxxx",
  "macaddress": "xxxxxx",
  "internetgateway": "",
  "nodes": [
    "xxxxxx"
  ],
  "proxy_enabled": false,
  "isdefault": true,
  "isrelayed": false,
  "relayed_by": "",
  "isrelay": false,
  "relay_hosts": null
}
2023/06/22 09:04:19 Error Status: 500 Response: {"Code":500,"Message":"ingress cannot be created on nodes behind NAT"}
-----------------------------------------------------------------
-----------------------------------------------------------------
Netmaker setup is now complete. You are ready to begin using Netmaker.
Visit xxxxxx to log in
-----------------------------------------------------------------
-----------------------------------------------------------------

Contributing guidelines

mattkasun commented 1 year ago

fixed in version 20.0.3