It seems that I would use firewalld for this? I'm having trouble configuring it. I have no experience with firewalld or iptables but I have looked through these resources:
- RHEL7: How to get started with Firewalld
- Using Firewalls in the RHEL 7 Security Guide
So far I have tried to:
* Enable IP forwarding by adding net.ipv4.ip_forward=1 to /etc/sysctl.d/router.conf and running sudo sysctl -p.
* Add my LAN interface to the internal zone and my WAN interface to the external zone, by adding ZONE=<zone> to the appropriate scripts under /etc/sysconfig/network-scripts
* Enable masquerading on the external zone by running firewall-cmd --permanent--zone=external --add-masquerade
I think I need to add a direct interface now? This is where I'm stuck, I'm not sure what to do.
I've seen sample commands like the following: firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -i eth0 -o eth1 -j MASQUERADE
Is this the right track? Thank you!