gpt4 book ai didi

android - 玩具VPN : unable to settup vpn server and connecting to it also no rule is appearing the nat table

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:25:26 25 4
gpt4 key购买 nike

我正在尝试在我的电脑上设置 VPN 服务器。我给出了在 ToyVpnServer 文件中给出的命令,但在给出最后一个命令终端后看起来卡住了,并且从 Android 手机我使用 ToyVpn 连接到它但它没有连接......

命令如下:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE #I tried this command with both "-A" and "-I" but nothing appears in the nat table :(
ip tuntap add dev tun0 mode tun
ifconfig tun0 10.0.0.1 dstaddr 10.0.0.2 up
./a.out tun0 8000 test -m 1400 -a 10.0.0.2 32 -d 8.8.8.8 -r 0.0.0.0 0

在 ToyVpnClient 中,我给出了我 PC 的 IP 地址,如 192.168.2.xxx/24。手机的IP地址也是192.168.2.xxx/24。

我刚刚输入到 nat 表中的规则也没有出现在那里。我尝试同时使用“-I”和“-A”。

我对linux、iptable 和server 不是很熟悉。这里出了什么问题?

(我也尝试通过本教程设置服务器,http://cviorel.easyblog.ro/2009/02/09/how-to-set-up-a-vpn-server-on-ubuntu/,但出现以下错误(https://askubuntu.com/questions/222495/firewall-stopped-and-disabled-on-system-startup-error-problem-running-ufw-init):

Firewall stopped and disabled on system startup
ERROR: problem running ufw-init

最佳答案

简单地说,由于 ToyVpn 使用 PPTP VPN,我猜你的防火墙阻止了初始化连接所需的 TCP channel 或 GRE channel 。为了保护连接和您的服务器机器,我建议打开端口 TCP:1723 。

如果问题解决,请尝试打开此端口并启用防火墙。

关于android - 玩具VPN : unable to settup vpn server and connecting to it also no rule is appearing the nat table,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13582584/

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