Bootstrap FreeKB - Firewalld - firewall-cmd - IP address masquerade
Firewalld - firewall-cmd - IP address masquerade

Updated:   |  Firewalld articles

If you are not familar with firewalld and the firewall-cmd, check out our Getting Started article.

The --add-masquerade option can be used to turn on (enable) IP address masquerade.

firewall-cmd --add-masquerade --permanent
firewall-cmd --reload

 

Or --remove-masquerade to turn off (disable) IP address masquerade.

firewall-cmd --remove-masquerade --permanent
firewall-cmd --reload

 

The --check-config command can be used to ensure there are no configuration errors.

~]$ firewall-cmd --check-config
success

 

The --query-masquerade option can be used to determine if IP address masquerade is on or off in a zone.

~]# firewall-cmd --zone public --query-masquerade
no

 

Or, the --list-all option can be used.

~]# firewall-cmd --list-all
public
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources:
  services:
  ports:
  protocols:
  masquerade: no
  forward-ports:
  sourceports:
  icmp-blocks:
  rich rules:



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 70760b in the box below so that we can be sure you are a human.