跳到主要內容

CentOS 7 firewall nat

開啟ip forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl -p
增加firewall policy
firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -o eth_ext -j MASQUERADE
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth_int -o eth_ext -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i eth_ext -o eth_int -m state --state RELATED,ESTABLISHED -j ACCEPT firewall-cmd --runtime-to-permanent

這個網誌中的熱門文章

CactiEZ Default Login Information

To login to the OS (you will want to change this) user: root pass: CactiEZ To login to cacti (it prompts to change this) user: admin pass: admin Get to webmin at (requires the root user / pass) https://serverip:10000/ To configure ntop (you will want to change this) user: admin pass: CactiEZ To configure nagios user: nagiosadmin pass: CactiEZ #vi /etc/sysconfig/clock # 修改 ZONE="Asia/Taipei"