29 lines
1018 B
Plaintext
29 lines
1018 B
Plaintext
|
||
# 作为路由器,启用 ip 转发 (ipv6默认关闭)
|
||
net.ipv4.ip_forward=1
|
||
net.ipv6.conf.all.forwarding=1
|
||
net.ipv6.conf.default.forwarding=1
|
||
|
||
# 接收来自运营商(ISP) 的 ipv6 RA (路由通告),以获取公网 ipv6 地址
|
||
#net.ipv6.conf.all.accept_ra=2
|
||
#net.ipv6.conf.enp1s0.accept_ra=2
|
||
#net.ipv6.conf.default.accept_ra=2
|
||
#net.ipv6.conf.all.accept_ra_rt_info_max_plen=128
|
||
#net.ipv6.conf.default.accept_ra_rt_info_max_plen=128
|
||
#net.ipv6.conf.enp1s0.accept_ra_rt_info_max_plen=128
|
||
|
||
# 禁用ipv6
|
||
net.ipv6.conf.all.accept_ra=0
|
||
net.ipv6.conf.enp1s0.accept_ra=0
|
||
net.ipv6.conf.default.accept_ra=0
|
||
net.ipv6.conf.all.accept_ra_rt_info_max_plen=0
|
||
net.ipv6.conf.default.accept_ra_rt_info_max_plen=0
|
||
net.ipv6.conf.enp1s0.accept_ra_rt_info_max_plen=0
|
||
|
||
# 可选。暂时没发现什么场景一定要禁用 rp_filter,以防万一,先禁用
|
||
net.ipv4.conf.all.rp_filter=0
|
||
net.ipv4.conf.default.rp_filter=0
|
||
|
||
# 允许容器ns的流量被拦截
|
||
net.bridge.bridge-nf-call-iptables=0
|
||
net.bridge.bridge-nf-call-ip6tables=0 |