sudo firewall-cmd --zone=external --change-interface=eth0 --permanent
sudo firewall-cmd --zone=internal --change-interface=eth1 --permanent
sudo firewall-cmd --zone=external --add-masquerade --permanent
sudo firewall-cmd --zone=external --remove-icmp-block=echo-reply --permanent
sudo firewall-cmd --zone=external --remove-icmp-block=echo-request --permanent
To Allow Internal Traffic:
sudo firewall-cmd --zone=internal --add-service=http --permanent
# or
sudo firewall-cmd --zone=internal --add-port=80 --permanent
sudo firewall-cmd --zone=internal --remove-service=http --permanent
# or
sudo firewall-cmd --zone=internal --remove-port=80 --permanent
Port forward from internal to external:
firewall-cmd --zone=external --add-forward-port=port=80:proto=tcp:toaddr=192.168.2.2 --permanent
firewall-cmd --zone=external --add-forward-port=port=443:proto=tcp:toaddr=192.168.2.2 --permanent
firewall-cmd --zone=external --remove-forward-port=port=80:proto=tcp:toaddr=192.168.2.2 --permanent
firewall-cmd --zone=external --remove-forward-port=port=443:proto=tcp:toaddr=192.168.2.2 --permanent