centos7的firewall-cmd如何实现iptables的nat?
phpng 发布于 2016/01/20 10:15
阅读 5K+
收藏 0
我是如何在2年内逆袭成为BAT年薪40W的资深开发工程师的?
iptables 命令
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 10.162.xxx.xxx
firewall-cmd是如何实现上面iptables的效果?
不要说重新使用iptables了。(centos7 一个是没有,另外已经使用firewall-cmd配置了很多东西了)
收藏 (0)
分享
举报
0
2016/03/11 15:48
firewall-cmd --permanent --direct --passthrough ipv4 -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 10.162.xxx.xxx
firewall-cmd --reload