How use firewalld-cmd use iptables rule?
iptables:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
How use firewalld-cmd use iptables rule?
iptables:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
firewall-cmd --permanent --direct --add-rule ipv4 filter POSTROUTING 0 -t nat -s 10.8.0.0/24 -o eth0 -j MASQUERADE
POSTROUTING 0 means high priority whthout --permanent it just works before reboot
The Varint's command after the firewalld reload will cause a syntax issue. This command worked for me: firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -s 10.8.0.0/24 -o eth0 -j MASQUERADE