It is no secret that computing resources are rapidly migrating from physical infrastructure to a combination of physical, virtual and cloud environments. A similar trend is also evident in the networking space, with network control logic shifting from proprietary hardware-based platforms to open source software-based platforms (SDN or Software Defined Networking).
I recently built a simple gateway/router using firewalld and NAT on CentOS 7 and thought I’d share the firewall-cmd commands used. The machine in question was used as a gateway/router for two VMWare virtual networks being used by students to build Windows domains. As their domain controllers were running DHCP servers, their networks had to be isolated from the TAFE (college) network and each other to avoid problems, but the students also needed access to the TAFE network for DNS forwarding and internet access purposes.