🔅 Set Up a Basic Firewall with `iptables` in Linux
Secure your Linux system by setting up a basic firewall. 🔒
Use these commands:
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -P INPUT DROP
This allows SSH traffic and existing connections, dropping all other incoming traffic. 🚀
Join @LinuxMastery for more tutorials.
Secure your Linux system by setting up a basic firewall. 🔒
Use these commands:
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -P INPUT DROP
This allows SSH traffic and existing connections, dropping all other incoming traffic. 🚀
Join @LinuxMastery for more tutorials.