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

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

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

[复制链接]
发表于 2019-3-29 00:20:11 | 显示全部楼层 |阅读模式
1.修改服务器内核参数,服务器配置文件/etc/sysctl.conf修改或者添加内容如下, r1 M4 V0 a, o3 b6 G( H# W
  1. net.ipv4.ip_forward = 10 x# _, X0 S5 N% G
  2. net.ipv4.conf.default.rp_filter = 0, @7 M. L3 l+ p3 i. d- w7 s/ p
  3. net.ipv4.conf.all.rp_filter = 0, G6 q$ `+ n8 f  ?
  4. net.ipv4.conf.all.send_redirects = 0, _/ F, K0 m  A+ w1 N2 i4 ?
  5. net.ipv4.conf.default.send_redirects = 0
    0 W( G) w. P$ d$ i' t
  6. net.ipv4.conf.all.accept_redirects = 0; A  W/ ^+ i9 t, u+ o! ~
  7. net.ipv4.conf.default.accept_redirects = 0! F: e: s! W. j6 @8 O0 b6 `
  8. net.core.xfrm_larval_drop = 1
复制代码
7 z0 K  e& {! L
2.防火墙添加规则" h$ D7 @9 h/ J$ V( o5 V
  1. iptables -t nat -A POSTROUTING ! -s 127.0.0.1/8 -j MASQUERADE
    6 a( ^+ K; G3 g. F6 z: G, \
  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, 2025-3-31 16:54 , Processed in 0.005059 second(s), 6 queries , APCu On.

Powered by Discuz!

© 2010-2023.

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