You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run a split DNS setup. Once the connection is not established we need to use a public DNS to connect the to the nm gateway.
But then we can't use the internal dns.
It would be nice if we could use resolvectl like commands that can configure the dns for the internal domain once the connection is up and running?
In order to make it work I made an systemd service override:
### Editing /etc/systemd/system/netclient.service.d/override.conf### Anything between here and the comment below will become the new contents of the file[Service]ExecStartPost = bash -c "while ! ip addr show dev netmaker 2> /dev/null; do sleep 1; done"ExecStartPost = sleep 1
ExecStartPost = resolvectl domain netmaker domain.com domain.net
ExecStartPost = resolvectl dns netmaker 10.10.10.10 10.10.20.20
ExecStartPost = resolvectl flush-caches
### Lines below this comment will be discarded### /etc/systemd/system/netclient.service# [Unit]# Description=Netclient Daemon
...
It takes some time before the netmaker interface becomes available. That is why I need the bash while loop to hold it for some time.
It works but it feels not very solid. It would be nice if you can define some settings on the network like: domains and the resolvers for those. And once the connection it set-up it registers the desired settings.
One more addition, I ran into an issue that the netmaker interface was recreated (by netclient I guess) but it did not restart the service. So the DNS options that the service file set where gone and dns connection lost. One more reason for be that this can't be fixed by the systemd service file but it needs to be managed by the netclient after connection.
Contact Details
johan.smits@leftclick.eu
What happened?
We run a split DNS setup. Once the connection is not established we need to use a public DNS to connect the to the nm gateway.
But then we can't use the internal dns.
It would be nice if we could use
resolvectl
like commands that can configure the dns for the internal domain once the connection is up and running?The commands would be:
resolvectl dns netmaker 10.10.10.10 10.10.20.20
resolvectl domain netmaker myinternal.domain mysecondinternal.domain
Version
v0.21.2
What OS are you using?
Linux
Relevant log output
No response
Contributing guidelines
The text was updated successfully, but these errors were encountered: