gpt4 book ai didi

wireguard - wg-快速 : `wg0' already exists when start wireguard in CentOS 7. 6

转载 作者:行者123 更新时间:2023-12-05 09:06:56 26 4
gpt4 key购买 nike

<分区>

当我在 CentOS 7.6 中使用此命令启动 wireguard 时:

wg-quick up wg0

显示此错误:

wg-quick: `wg0' already exists

我正在使用 ifconfig 命令查看 wg0:

wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
inet 10.0.0.1 netmask 255.255.255.0 destination 10.0.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 13 dropped 0 overruns 0 carrier 0 collisions 0

这是我的配置:

[root@izbp19pke6x0v6ruecuy1yz wireguard]# cat wg0.conf
[Interface]
PrivateKey = [redacted]
Address = 10.0.0.1/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 7456

[Peer]
PublicKey = Cfrr58B8PjtpZhJzqdFXwpXQOnZedQpOOWjrkeM7p30=
AllowedIPs = 10.0.0.3/24

[Peer]
PublicKey = b3rP/aN53ZY7IwzOWyxfxLEw7atwS2GpFe0kLchHhk4=
AllowedIPs = 10.0.0.2/32

但进程不存在:

[root@izbp19pke6x0v6ruecuy1yz wireguard]# lsof -i:7456
[root@izbp19pke6x0v6ruecuy1yz wireguard]#

问题是什么,我应该如何解决?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com