Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Server 对于刚安装pivpn(wireguard)的已连接客户端,没有internet_Server_Vpn_Raspberry Pi4_Wireguard - Fatal编程技术网

Server 对于刚安装pivpn(wireguard)的已连接客户端,没有internet

Server 对于刚安装pivpn(wireguard)的已连接客户端,没有internet,server,vpn,raspberry-pi4,wireguard,Server,Vpn,Raspberry Pi4,Wireguard,我有一个新安装的pi4,在运行curl-L之后https://install.pivpn.io |bash要安装pivpn(wireguard),客户端会连接,但无法访问internet。 从我的Pi我可以ping客户。使用tcpdump,我还可以看到客户端已连接,但仍然无法访问internet 我的Iptables设置如下: #iptables -S -P INPUT DROP -P FORWARD DROP -P OUTPUT ACCEPT -A INPUT -i eth0 -p udp

我有一个新安装的pi4,在运行
curl-L之后https://install.pivpn.io |bash
要安装pivpn(wireguard),客户端会连接,但无法访问internet。 从我的Pi我可以ping客户。使用tcpdump,我还可以看到客户端已连接,但仍然无法访问internet

我的Iptables设置如下:

#iptables -S
 
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 51820 -m comment --comment wireguard-input-rule -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -m comment --comment ssh -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 443 -m comment --comment ssh -j ACCEPT
-A FORWARD -d 10.6.0.0/24 -i eth0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment wireguard-forward-rule -j ACCEPT
-A FORWARD -s 10.6.0.0/24 -i wg0 -o eth0 -m comment --comment wireguard-forward-rule -j ACCEPT
在my/etc/sysctl.conf中,
net.ipv4.ip\u forward=1

ipvpn的其余设置只是标准设置

在wireguard设置中,我只使用google DNS:8.8.8.8

我的想法快用完了。
有人能帮忙吗?

听起来你唯一缺少的是:

您可以通过:
sysctl-w net.ipv4.ip_forward=1动态启用它

您可以通过编辑
/etc/sysctl.conf
并设置
net.ipv4.ip_forward=1

听起来您唯一缺少的是:

您可以通过:
sysctl-w net.ipv4.ip_forward=1动态启用它

您可以通过编辑
/etc/sysctl.conf
并设置
net.ipv4.ip_forward=1