NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wgconfig(8) and peer endpoint



On Fri, Dec 19, 2025 at 02:32:01PM +0000, Sad Clouds wrote:
> NetBSD seems to lack /etc/rc.d scripts to configure wg interfaces and
> their peers during system boot. I'll be fixing this shortly for my own
> use cases, is there any interest for someone to import this
> functionality into NetBSD?

I don't think there is anything missing.

 # cat /etc/ifconfig.wg0 
192.168.110.42/24
!wgconfig ${int} set private-key /etc/wg/${int}
!wgconfig ${int} set listen-port 62345
!wgconfig ${int} add peer nameofpeera XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX= --allowed-ips=192.168.110.32/32
!wgconfig ${int} add peer nameofpeerb YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY= --allowed-ips=192.168.110.33/32
!wgconfig ${int} add peer nameofpeerc ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ= --allowed-ips=192.168.110.34/32
up


Martin


Home | Main Index | Thread Index | Old Index