Untitled

 avatar
user_1332111
plain_text
2 months ago
404 B
2
Indexable
Never
# Allow connections from specific IPs on INPUT chain (Google DNS)
iptables -A INPUT -p tcp -s 8.8.8.8 -j ACCEPT
iptables -A INPUT -p tcp -s 8.8.4.4 -j ACCEPT

# Allow ICMP (ping) traffic on OUTPUT chain (existing DROP on INPUT allows ping replies)
iptables -A OUTPUT -p icmp -j ACCEPT

# Drop all outgoing packets from http port (without ICMP message)
iptables -A OUTPUT -p tcp --dport 80 -j DROP
Leave a Comment