Skip to content

Modifying port for Netclient prior to Netmaker Install ? #666

@gigadjo

Description

@gigadjo

Hello, and thanks for Netmaker, it's a great tool !

Tho, i've been using it for a short time, i came across a problem : i try to connect to Netmaker from a filtered network, stateful firewall rules won't allow connecting from some network on some ports (in short).

Thus, some ports, are actually not filtered, because of probably 'internal use case'. I tried to set a simple Wireguard connexion on those ports, and it works very well.

I Found this parameter laying in https://github.com/gravitl/netclient/blob/develop/config/config.go

DefaultListenPort = 51821
// DefaultMTU default MTU for wireguard
DefaultMTU = 1420

It's then copied to /etc/netclient/netclient.yml

os: linux
interface: netmaker
debug: false
listenport: 51821
wg_public_listen_port: 51821
mtu: 1420

Is there a way, i did not figure out, how to pass this as a parameter during install process ?
As it seem to be read from file, even setting the value as an env_var may not work properly :-)

One can still use after install, or even afterward :

nmctl host update <host_id> --listen_port

As far as you disable / re-enable clients, their WireGuard config is rewritten, i don't know how it works for netclients 'clients' :-)

But it would be nice to be able to choose the port used from the start :-)

Thanks again for making such a great tool Open Source, best regards,

/joen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions