【问题标题】:couldn't access internet resource even if successfully connect to pptp vpn即使成功连接到 pptp vpn 也无法访问互联网资源
【发布时间】:2023-04-10 14:30:01
【问题描述】:

我租用位于东京的主机作为我的 vps 服务器,并按照本文安装 pptp 服务器

article about install pptp from digital ocean

还有我的 vps ip >>> 107.191.60.187

另外,我通过这种方式安装了ufw并允许pptpd的端口

ufw allow 1723
ufw disable && ufw enable

但事实上,即使我可以在 vps 上成功连接我的 pptpd 程序,我也无法访问互联网资源。

我真的不知道怎么解决:(

谁能帮帮我..

非常感谢。

【问题讨论】:

    标签: vpn pptp


    【解决方案1】:

    只需提交这个问题

    在我犯错误设置错误的iptabes规则之前,然后我通过以下方法解决它,它可以工作。

    #1. first I inspect status and remove ipesec server, it conflicts.
    sudo service ipsec status
    sudo apt remove ipsec xl2tpd
    
    #2. then I look for port 1723 that judge whether it recive data package
    sudo tcpdump -i eth0 port 1723
    
    #3. finally I change rules by using iptabes clearly
    sudo iptables -t nat -nL
    sudo iptables -t nat -A POSTROUTING -j MASQUERADE
    
    #4. and save it
    sudo iptables -t nat -S
    sudo iptables-save -t nat
    
    #5. modify content in file before.rules, confirm it as a daemon
    sudo vi /etc/ufw/before.rules
    
    # just like below this
    *nat
    :PREROUTING ACCEPT [73:5676]
    :INPUT ACCEPT [6:1415]
    :OUTPUT ACCEPT [7:431]
    :POSTROUTING ACCEPT [0:0]
    :DOCKER - [0:0]
    -A POSTROUTING -j MASQUERADE
    COMMIT
    

    仅此而已..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-14
      • 2018-03-19
      • 2019-09-12
      • 1970-01-01
      • 2019-11-23
      • 1970-01-01
      相关资源
      最近更新 更多