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, 19 Dec 2025 15:39:46 +0100
Martin Husemann <martin%duskware.de@localhost> wrote:
> 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
OK thanks for the example. I've been setting this up on Linux and it
uses separate config files and scripts to achieve the same thing. But
looks like NetBSD can run arbitrary shell commands via ifconfig.if(5)
which simplifies this a lot.
Home |
Main Index |
Thread Index |
Old Index