MOCs

Setup

Setting Interfaces:

nmtui

Get the 3 octet from what team you’re on:

Make sure to turn on connections: (If on will have *)

Setup Zones:

Get what zones are available

firewall-cmd --get-zones

Assign zones

sudo firewall-cmd --zone=external --change-interface=eth0 --permanent
sudo firewall-cmd --zone=internal --change-interface=eth1 --permanent

Setup Masquerading

sudo firewall-cmd --zone=external --add-masquerade --permanent

Allow web traffic internally:

sudo firewall-cmd --zone=internal --add-service=http --permanent
sudo firewall-cmd --zone=internal --add-service=https --permanent

Port Forwarding Web Server:

sudo firewall-cmd --zone=external --add-forward-port=port=80:proto=tcp:toaddr=192.168.1.5 --permanent
sudo firewall-cmd --zone=external --add-forward-port=port=443:proto=tcp:toaddr=192.168.1.5 --permanent

Port Forward DNS:

sudo firewall-cmd --zone=external --add-forward-port=port=53:proto=tcp:toaddr=192.168.1.12 --permanent

Reload Firewall

sudo firewall-cmd --reload