Hiển thị các bài đăng có nhãn firewall. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn firewall. Hiển thị tất cả bài đăng

Thứ Hai, 5 tháng 12, 2016

General Iptables Firewall Rules

1. Delete all existing rules
# iptables -F

2. Set default chain policies
# iptables -P INPUT DROP
# iptables -P FORWARD DROP
# iptables -P OUTPUT DROP

3. Block a specific ip-address
BLOCK_THIS_IP=”x.x.x.x”
# iptables -A INPUT -s “$BLOCK_THIS_IP” -j DROP