<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div>On Sun, 2024-03-03 at 10:09 +0300, Andrei Borzenkov wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>On 02.03.2024 22:20, Samuel Le Thiec wrote:<br></div><div>> Hello,<br></div><div>> <br></div><div>> Sometime, my Wireguard connection is not working: there is no endpoint listed for the peer in 'sudo wg show',<br></div><div>> I supposed it's because the Wireguard was configured before the system has internet connectivity (and DNS<br></div><div>> resolution).<br></div><div>> <br></div><div>> Is there a way to make sure a Wireguard connection is only started if there is connectivity?<br></div><div>> <br></div><div>> On my setup, starting the wireguard profile after the device 'wlan0' is up would be sufficient :<br></div><div>> <br></div><div>>> $ nmcli connection show<br></div><div>>> NAME UUID TYPE DEVICE<br></div><div>>> FUNG-1395 447d6d94-75a7-4201-af17-77142956f6ef wifi wlan0<br></div><div>>> luc-Wireguard-VPN e1c83fba-ee67-4587-bfcb-807755776e32 wireguard sltuniv0<br></div><div>> <br></div><div>> I've read that's what the 'connection.secondaries' setting is for, but:<br></div><div>> <br></div><div>>> $ nmcli connection modify FUNG-1395 connection.secondaries e1c83fba-ee67-4587-bfcb-807755776e32<br></div><div>>> Error: failed to modify connection.secondaries: 'e1c83fba-ee67-4587-bfcb-807755776e32' is not a VPN connection profile.<br></div><div>> <br></div><div>> Too bad 😅️<br></div><div><br></div><div>Given that wireguard *is* VPN, it most certainly should be supported here.<br></div></blockquote><div><br></div><div>OK, I've reported the issue so it doesn't get lost!</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><br></div><div>As a workaround you could add dispatcher script that starts wireguard <br></div><div>connection after connectivity is established.<br></div><div><br></div></blockquote><div><br></div><div>Will look into that, thank you for your answers:-)</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>> <br></div><div>> → Is there a reason why a wireguard profile cannot be add to connection.secondaries? Wireguard seems like a<br></div><div>> VPN to me.<br></div><div>> <br></div><div>> → If you have any other idea to make sure the Wireguard profile starts after the system has internet<br></div><div>> connectivity, then please, let me know!<br></div><div>> <br></div><div>> Thanks in advance,<br></div><div>> <br></div><div>> Samuel<br></div><div>> <br></div><div>> <br></div><div><br></div></blockquote><div><br></div><div><span></span></div></body></html>