← Back to home
iptables firewalld Firewall UFW Linux

Firewall with iptables & firewalld

Feb 25, 2022

Firewall configuration on Linux with iptables, UFW and firewalld.

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 22,80,443 -j ACCEPT
ufw enable && ufw default deny incoming && ufw allow ssh