Untitled

user_1332111 avatar
user_1332111
plain_text
04/12/2024 4:38 PM
540 B
32
Indexable
# 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
Editor is loading...
Leave a Comment