Hello

So I have a wireguard setup which I use to connect to my server.

But I do not connect to it daily, just once a in a while.

I have setup wg0.netdev file and wg0.network file and all is working fine.

But how do I set it up such that interface wg0 does not connect automatically but comes up only when I run:

#networkctl up wg0

Effectively I want wireguard to connect/disconnect on demand.

Any tips or tricks?

I know I can use wg-quick@.service but I prefer to use systemd-networkd instead.

Currently what I do is rename .netdev to .notdev. So it does not start automatically. And then when I want it up. I rename it to .netdev and do:

#networkctl reload.

But thats an inefficient workaround.

I would like a solution where I can bring it up or down on demand with single command:

#networkctl up wg0
#networkctl down wg0

Thank you

Amish.

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to