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]: '404 Not Found' in Remote Access Client #3039

Open Cheezzhead opened 1 month ago

Cheezzhead commented 1 month ago

Contact Details

--

What happened?

I'm getting an error bad request status 404 not found in the Netmaker Remote Client when attempting to connect to my self-hosted instance. Checking the http logs on the server shows that the endpoint api/users/{username}/remote_access_gw returns the 404 status code. The same status code is returned if I try to query the endpoint from the netmaker server itself (as opposed to 401 which one would expect).

Compose setup for netmaker:

services:
  netmaker:
    image: gravitl/netmaker:v0.24.3
    container_name: netmaker
    extends:
      file: ${STACKS_DIR}/common.yml
      service: default
    env_file: 
      - netmaker.env
      - mosquitto.env
    environment:
      NM_DOMAIN: ${DOMAIN}
      SERVER_HOST: ${HOST_IP}
      SERVER_NAME: ${DOMAIN}
      SERVER_API_CONN_STRING: api.${DOMAIN}:443
      SERVER_HTTP_HOST: api.${DOMAIN}
      BROKER_ENDPOINT: wss://broker.${DOMAIN}
      COREDNS_ADDR: coredns
      STUN_LIST: >-
        stun1.netmaker.io:3478,
        stun2.netmaker.io:3478,
        stun1.l.google.com:19302,
        stun2.l.google.com:19302
    volumes:
      - ./dnsconfig:/root/dnsconfig
      - ${DOCKER_CONF_DIR}/netmaker:/root/data

Version

v0.24.3

What OS are you using?

Linux

Relevant log output

...
[15/Aug/2024:10:26:55 +0000] - 404 404 - GET https api.netmaker.domain.tld "/api/users/XXX/remote_access_gw" [Client XXX.XXX.XXX.XXX] [Length 19] [Gzip -] [Sent-to netmaker] "Go-http-client/2.0" "-"
...

Contributing guidelines

ncsjens commented 1 week ago

+1

abhishek9686 commented 1 week ago

Remote Access Client only works with PRO version