linux中iptables開啟後pptp vpn撥號失敗解決辦法

來源:互聯網
上載者:User


公司現在用iptables作為區域網路中的防火牆,上網沒有問題。這次因為測試,需要串連pptp vpn 。問題來了,vpn撥號一直失敗,報619錯誤 。我用手機或者家裡撥號都沒有問題。

登陸路由器,把pptp那些支援都開了再試,結果不行。

再找iptables的原因,最後終於解決。

1、在iptables中添加允許1723連接埠和gre協議。

2、載入iptables中的幾個模組,ip_nat_pptp ,ip_nat_proto_gre,ip_conntrack_pptp

modprobe ip_nat_pptp
modprobe ip_nat_proto_gre
modprobe ip_conntrack_pptp

查看模組是否載入

root@ubuntu:/etc/iptables# lsmod |grep pptp
nf_nat_pptp 2245 0
nf_conntrack_pptp 5549 1 nf_nat_pptp
nf_conntrack_proto_gre 4734 1 nf_conntrack_pptp
nf_nat_proto_gre 1719 1 nf_nat_pptp
nf_nat 19286 3 nf_nat_pptp,nf_nat_proto_gre,iptable_nat
nf_conntrack 73326 7 nf_nat_pptp,nf_conntrack_pptp,nf_conntrack_proto_gre,xt_state,iptable_nat,nf_nat,nf_conntrack_ipv4

載入成功後pptp vpn撥號正常,可以正常訪問了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.