Centos7下多网卡的路由转发配置

在 vim /sysctl.conf 下

加入此行   net.ipv4.ip_forward = 1

sysctl -p               ----加载一下


Centos7前的版本用iptable 防火墙设置路由转发 ;Centos7 以后的版本不能使用iptable 防火墙来设置路由器转发,而是得用firewall-cmd 来设置



firewall-cmd --add-masquerade --per --zone=internal 

firewall-cmd --per --add-port=0-65535/tcp --zone=internal 

firewall-cmd --per --add-port=0-65535/udp --zone=internal


firewall-cmd --reload

猜你喜欢

转载自blog.csdn.net/h106140873/article/details/80381018
今日推荐