开启防火墙虚拟机无法联网

  1. rm -rf /etc/firewalld/zones/*
  2. firewall-cmd --reload
  3. firewall-cmd --add-port=22/tcp --permanent
  4. firewall-cmd --add-port=80/tcp --permanent
  5. firewall-cmd --add-port=5900-6500/tcp --permanent
  6. firewall-cmd --add-port=2929/tcp --permanent
  7. firewall-cmd --add-port=53/udp --permanent
  8. firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -i br0 -j ACCEPT
  9. firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -o br0 -j ACCEPT
  10. firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -i br1 -j ACCEPT
  11. firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -o br1 -j ACCEPT
  12. firewall-cmd --reload
文档更新时间: 2018-12-27 13:14   作者:admin