From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use firewalld for NAT

Use firewalld for NAT

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Use firewalld for NAT

- [Instructor] Network address translation, or NAT, can be accomplished using either masquerade or forwarding in firewalld. Masquerading can only be used on IPv4 and not IPv6. Masquerade will forward packets that are not directed to our system onto their destination. The source address will be changed to our system from the original source. Responses will then go back through our system. Masquerade can be enabled on a zone easily. Let's use our coffee shop zone that we created in the previous video. Type in sudo firewall-cmd --permanent space --zone=coffeeshop --add-masquerade and hit Enter. Type in your password if prompted. It's really as simple as that. Now all packets coming into the coffee shop zone will be masqueraded. To verify that it's been added to the permanent firewall config, bring your line back and change everything after --permanent to --query-masquerade and hit Enter. Although we'll talk more about rich rules later, we can use them now to add more granularity. Type in…

Contents