https://netmaker.org logo
What if I change the server's hosts file so broker...
# netmaker
t
What if I change the server's hosts file so broker.domain, api.domain and dashboard.domain route to localhost? I mean, the connection to the VPN itself is done via the server's public IP and not the domain - Or am I missing something here?
b
That would probably work. as long as broker.domain and API.domain resolve netclient should be able to connect to netmaker server
t
Just tried that and I'm getting the following errors: > error running command: wg-quick up /etc/netclient/config/nm-vpn.conf > Warning:
Copy code
/etc/netclient/config/nm-vpn.conf' is world accessible
> [#] ip link add nm-vpn type wireguard
> [#] wg setconf nm-vpn /dev/fd/63
> Line unrecognized:
-jMASQUERADE;"""' > Configuration parsing error > [#] ip link delete dev nm-vpn
Is there anything else I should be changing to make it work properly?
The reason I'm asking about it in the first place is that I can't have an A record pointing to the server, and setting a DDNS for my use case is somewhat problematic
The errors no longer appear after removing the volumes & containers the errors, but it seems like mq is unable to reach the api
b
have you created any gateways?
t
Running curl https://api.domain/api/server/health returns that the server is up and working, but trying to run 'docker exec mq curl ...' results in a refusal
b
try starting with just a basic network so that there are no iptable rules to complicate matters
t
The api/dashboard aren't available so I can't create a gateway yet
I'm simply running the commands on netmaker's host
b
is that error on the server? on startup? what command did you run?
t
When I run 'docker-compose up', wait.sh is stuck in a loop (and prints 'waiting for netmaker to start), but when I'm running 'curl https://api.domain/api/server/health', I get a message stating the the server is up and functioning properly
So I've tried running the same command through mq's container (docker exec mq https://api.domain/api/server/health)
And in that case I get 'connection refused'
b
what is output docker logs netmaker
t
Fatal: Admin: could not connect to broker, token timeout, exiting ... Which is expected, since the broker isn't available yet
The problem seems to be that mq can't access netmaker's api
So it gets stuck in an infinite loop and never becomes available for netmaker to connect
b
docker is probably not using your /etc/hosts file to resolve names so mq cannot find the netmaker server
exec into the mq container and lookup api.yourdomain
t
Oh, should I add it as a volume then?
b
may solve it, not sure
t
'docker exec mq nslookup api.domain.com' returns 127.0.0.1
Is it possible that traffic to localhost doesn't get routed via traefik?
b
don't know
t
Is there any other route I should be adding to traefik? 🤔
b
I am not an expert in traefik, can't help you
t
Well, alright, thank you though 🙂
But if anyone else here has an idea I'll be glad to hear about it
Alright, I've found a solution
Apparently 'localhost' and '127.0.0.1' aren't shared with the containers, so I had to use docker's interface IP instead
It seems to work now
The server is up and running, the dashboard is accessible and API commands seem to function properly, but WireGuard can't seem to connect (any handshake attempt is failing)
I'm not sure how to go about debugging this issue since I'm not familiar with WireGuard, so any pointers will be welcome
Should I start a new thread in #975815715556851782 ?
b
sure
3 Views