Firewalld
HomeTech JournalsPersonal ProjectsSysadmin Wiki
  • Firewalld Cheat Sheet
  • Subsection
    • Tips and Tricks
  • NCAE
    • Setup
    • Test Page
    • Action Plan
    • DNS
    • Scripts
    • Spice Client
Powered by GitBook
On this page
  • Setting Interfaces:
  • Setup Zones:
  • Setup Masquerading
  • Allow web traffic internally:
  • Port Forwarding:
  1. NCAE

Setup

PreviousTips and TricksNextTest Page

Last updated 1 year ago

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:

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

reload firewall

sudo firewall-cmd --reload
Internal
External