service wireguard start service wireguard stop service wireguard restart //查看运行状态 wg ps aux | grep wireguard 部分网络相关的常用FreeBSD指令: //查看路由表 netstat -f inet -r -n netstat -f inet6 -r -n //查看进程 ifconfig wg0 配置文件的内容(可多Peer): [Interface] PrivateKey = {私钥...
sysctl -p # 无需修改Network, /etc/sysconfig/network配置文件,需要重启网络服务(service netwrok restart)才能使新的配置生效。(备注用) # service netwrok restart # reboot(重启)之后再次查询ip_forward,查询结构为"1",不过这时候不用管它了,Wireguard已经可以正常握手了,至于为什么还是显示"1",我也不太清楚!
使用systemd 创建/etc/systemd/system/wgui.service cd/etc/systemd/system/cat<<EOF > wgui.service [Unit] Description=Restart WireGuard After=network.target [Service] Type=oneshot ExecStart=/usr/bin/systemctl restart wg-quick@wg0.service [Install] RequiredBy=wgui.path EOF 创建/etc/systemd/system/w...
在 系统 -> 设置 -> 调度任务 中,点击 + 添加,选择 命令 为 actions_ping_wireguard 中的 description ,其他自定义即可。 示例/usr/local/opnsense/service/conf/actions.d/actions_ping_wireguard.conf: 复制[restart] command:python3 /home/wireguard/ping_wireguard.py parameters: type:script description:pi...
=NET_ADMIN --cap-add=SYS_MODULE --sysctl="net.ipv4.conf.all.src_valid_mark=1" --sysctl="net.ipv4.ip_forward=1" --restart unless-stopped weejewel/wg-easy 其它补充命令 #停止服务# docker stop wg-easy #删除容器# docker rm wg-easy #更新容器# docker pull ghcr.io/wg-easy/wg-easy ...
?→ systemctl restart wg-quick@wg0 重启之后 WireGuard 会断开重连,体验不太好。事实上 WireGuard 可以做到在不中断活跃连接的情况下重新加载配置文件,命令如下: 代码语言:javascript 复制 ?→ wg syncconf wg0<(wg-quick strip wg0) 我们可以将这个命令作为 systemd 服务的reload命令: ...
version:"3.4"services:netmaker:container_name:netmakerimage:gravitl/netmaker:v0.8.2volumes:-/etc/netclient/config:/etc/netclient/config-dnsconfig:/root/config/dnsconfig-/usr/bin/wg:/usr/bin/wg-/data/sqldata/:/root/datacap_add:-NET_ADMINrestart:alwaysnetwork_mode:hostenvironment:SERVER_HOST:...
//api.NETMAKER_BASE_DOMAIN" restart: always coredns: depends_on: - netmaker image: coredns/coredns command: -conf /root/dnsconfig/Corefile container_name: coredns restart: always ports: - "COREDNS_IP:53:53/udp" - "COREDNS_IP:53:53/tcp" volumes: - ./dnsconfig:/root/dnsconfig # 我...
kind: Service metadata: name: wireguard-exporter-go labels: app: wireguard-exporter-go spec: sessionAffinity: ClientIP selector: app: wireguard-exporter-go ports: - protocol: TCP name: http-metrics port: 9587 targetPort: 9587 1. 2.
_error_detect "systemctl restart wg-quick@${SERVER_WG_NIC}" fi else _red "WireGuard was not installed, maybe you need to install it at first\n" fi } main() { action="$1" [ -z "${action}" ] && show_help && exit 0 ...