Solved how to write wireguard kernal configure in freebsd14.2 rc.conf ?

Dear all:
i have ceate wireguard interface in freebsd14.2 , and define it in /etc/rc.conf in below .
#create wireguard interface ..
cloned_interfaces="wg900"
ifconfig_wg900="192.168.200.9/24"


.now , my question is how to write my wireguard interface configure in /etc/rc.conf , or other location ? when system reboot, the wireguard will work again ?
below is wireguard interface configure file .
wg set wg900 listen-port 58000 private-key /etc/xxx_private.key peer xxxxxxxxxxxxxx allowed-ips 192.168.200.0/24

thanks.
 
The port net/wireguard-tools has a rc.d script to define wireguard interfaces on system for autostarting. It has wireguard_interfaces parameter. You may need to create a wireguard configuration file in /usr/local/etc/wireguard/wg0.conf. For example;

Code:
# pkg ins wireguard-tools
# sysrc wireguard_enable="YES"
# sysrc wireguard_interfaces="wg0"

AFAIK, FreeBSD's built-in wg(8) doesn't have a rc.d script yet.
 
The port net/wireguard-tools has a rc.d script to define wireguard interfaces on system for autostarting. It has wireguard_interfaces parameter. You may need to create a wireguard configuration file in /usr/local/etc/wireguard/wg0.conf. For example;

Code:
# pkg ins wireguard-tools
# sysrc wireguard_enable="YES"
# sysrc wireguard_interfaces="wg0"

AFAIK, FreeBSD's built-in wg(8) doesn't have a rc.d script yet.
thanks. i know that is wireguard userland mde. now i just want to use wireguard kernel mode . thanks.
 
thanks. i know that is wireguard userland mde. now i just want to use wireguard kernel mode . thanks.
The wireguard-tools isn't userland mode.
It is just a tools to create wiregaurd tunnels/interfaces through rc.d.
The resulting wireguard tunnels/interfaces will use kernel mode for all traffic.
 
The wireguard-tools isn't userland mode.
It is just a tools to create wiregaurd tunnels/interfaces through rc.d.
The resulting wireguard tunnels/interfaces will use kernel mode for all traffic.
hi. adri:
what different was wireguard userland mode with kernal mode?
can you show me some thing ? i just want to learn ...
my think. wireguard userland mode is calling system kernel to work.
wireguard kernel mode is directly driver network card.
maybe wrong. please help me to learn more. thanks.
 
dear all:
i have closed this post, because , i have write the script and cron it to fit my requirement. thanks.
if you have time , please share what is wireguard userland mode with kernel mode . thanks.
 
i spend more time to find how to use wireguard kernel mode , looks like no one can do it .thanks.
 
Back
Top