Re: Wireguard - VPN up after reboot

2020-12-22 Thread Solene Rapenne
On Tue, 22 Dec 2020 09:50:04 +
"Salvatore Cuzzilla" :

> Hi Everyone,
> 
> I'm happily using 'Wireguard' to setup few VPNs.
> I store the required configuration within /etc/hostname.wg0 & I startup the 
> tunnel with 'doas sh
> /etc/netstart wg0'.
> 
> Everything is working like expected. 
> However, upon system reload the connectivity is lost.
> The wg0 interface comes up but the tunnel stays in a sort of 'waiting'
> state.
> 
> The only way I figure out to bring it up is either re-launching 'doas sh 
> /etc/netstart wg0' or
> pinging the tunnel default gateway.
> 
> Is there any decent/clean way to avoid manual intervention?
> 
> ---
> :wq,
> Salvatore.
> 

I had the same issue, you must avoid using hostname for
the remote address of the wireguard peer, because at this
stage you can't resolve hostnames.



Re: Wireguard - VPN up after reboot

2020-12-22 Thread Olivia Mackintosh
AFAIK, rc(8) should run netstart on boot. This is executed at /etc/rc:447. Can 
you post the contents of /etc/hostname.wg0 (of course redacting sensitive 
fields) ?

Olivia

On 22 December 2020 09:50:04 GMT, Salvatore Cuzzilla  
wrote:
>Hi Everyone,
>
>I'm happily using 'Wireguard' to setup few VPNs.
>I store the required configuration within /etc/hostname.wg0 & I startup the 
>tunnel with 'doas sh
>/etc/netstart wg0'.
>
>Everything is working like expected. 
>However, upon system reload the connectivity is lost.
>The wg0 interface comes up but the tunnel stays in a sort of 'waiting'
>state.
>
>The only way I figure out to bring it up is either re-launching 'doas sh 
>/etc/netstart wg0' or
>pinging the tunnel default gateway.
>
>Is there any decent/clean way to avoid manual intervention?
>
>---
>:wq,
>Salvatore.
>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Wireguard - VPN up after reboot

2020-12-22 Thread Salvatore Cuzzilla
Hi Everyone,

I'm happily using 'Wireguard' to setup few VPNs.
I store the required configuration within /etc/hostname.wg0 & I startup the 
tunnel with 'doas sh
/etc/netstart wg0'.

Everything is working like expected. 
However, upon system reload the connectivity is lost.
The wg0 interface comes up but the tunnel stays in a sort of 'waiting'
state.

The only way I figure out to bring it up is either re-launching 'doas sh 
/etc/netstart wg0' or
pinging the tunnel default gateway.

Is there any decent/clean way to avoid manual intervention?

---
:wq,
Salvatore.