Basic IPTables Configuration
Learn basic IPTables configuration for Linux firewalls.
- List current rules:
sudo iptables -L -v -n
- Allow SSH:
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
- Block IP:
sudo iptables -A INPUT -s 192.168.1.100 -j DROP
- Save rules:
sudo iptables-save > /etc/iptables/rules.v4
Read more: IPTables Documentation