稳定互联,中美互联,站长交流,虚拟主机,香港主机,美国主机,虚拟空间,免费空间,免费VPS,免费域名

 找回密码
 立即注册
查看: 3048|回复: 0

[工具] 阿里云L2TP连接后无网络解决方法

[复制链接]
发表于 2019-3-29 00:20:11 | 显示全部楼层 |阅读模式
1.修改服务器内核参数,服务器配置文件/etc/sysctl.conf修改或者添加内容如下
# F2 B8 b3 y) W
  1. net.ipv4.ip_forward = 1! E( m% ^; C6 I8 j% N$ d
  2. net.ipv4.conf.default.rp_filter = 0
    ' W3 h- `, E! f: q
  3. net.ipv4.conf.all.rp_filter = 04 r1 c5 Z" y3 v5 r3 y
  4. net.ipv4.conf.all.send_redirects = 0% M' U6 y* {1 N. V: B- x- L& P
  5. net.ipv4.conf.default.send_redirects = 0# D9 R+ H9 Y! L9 n& R
  6. net.ipv4.conf.all.accept_redirects = 0
    ( n( d3 C/ F! P: V8 A
  7. net.ipv4.conf.default.accept_redirects = 0: s3 I/ @4 d- `- K  ~! h% a
  8. net.core.xfrm_larval_drop = 1
复制代码
( P3 |5 t1 {0 j' b
2.防火墙添加规则
' @' s! m/ q3 I' L# b
  1. iptables -t nat -A POSTROUTING ! -s 127.0.0.1/8 -j MASQUERADE, P( J9 y% o, {% C1 i$ [
  2. iptables -I FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|WdidcNet ( 苏ICP备17005075号-1 )

GMT+8, 2026-6-25 05:17 , Processed in 0.020228 second(s), 7 queries , APCu On.

Powered by Discuz!

© 2010-2023.

快速回复 返回顶部 返回列表