Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Reinitialise les regles
- iptables -t filter -F
- iptables -t filter -X
- # Bloque tout le trafic
- iptables -t filter -P INPUT DROP
- iptables -t filter -P FORWARD DROP
- iptables -t filter -P OUTPUT DROP
- # Autorise les connexions deja etabli et localhost
- iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
- iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
- iptables -t filter -A INPUT -i lo -j ACCEPT
- iptables -t filter -A OUTPUT -o lo -j ACCEPT
- # DNS In/Out
- iptables -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT
- iptables -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT
- iptables -t filter -A INPUT -p tcp --dport 53 -j ACCEPT
- iptables -t filter -A INPUT -p udp --dport 53 -j ACCEPT
- # SSH
- iptables -t filter -A INPUT -p tcp --dport 995 -j ACCEPT
- iptables -t filter -A OUTPUT -p tcp --dport 995 -j ACCEPT
- # HTTP/HTTPS
- iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT
- iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
- iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
- iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
- # ICMP
- iptables -t filter -A OUTPUT -p icmp -j ACCEPT
- iptables -t filter -A INPUT -p icmp -j ACCEPT
- # TOR
- #iptables -t filter -A OUTPUT -p tcp --dport 9001 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 9001 -j ACCEPT
- #iptables -t filter -A OUTPUT -p tcp --dport 9030 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 9030 -j ACCEPT
- #iptables -t filter -A OUTPUT -p tcp --dport 9050 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 9050 -j ACCEPT
- # IRC
- #iptables -t filter -A OUTPUT -p tcp --dport 6667 -j ACCEPT
- #iptables -t filter -A OUTPUT -p udp --dport 6667 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 6667 -j ACCEPT
- #iptables -t filter -A INPUT -p udp --dport 6667 -j ACCEPT
- # Murmur
- #iptables -t filter -A OUTPUT -p tcp --dport 64837 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 64837 -j ACCEPT
- #iptables -t filter -A OUTPUT -p udp --dport 64837 -j ACCEPT
- #iptables -t filter -A INPUT -p udp --dport 64837 -j ACCEPT
- # Minecraft Server
- #iptables -t filter -A OUTPUT -p tcp --dport 2281 -j ACCEPT
- #iptables -t filter -A OUTPUT -p udp --dport 2281 -j ACCEPT
- #iptables -t filter -A INPUT -p tcp --dport 2281 -j ACCEPT
- #iptables -t filter -A INPUT -p udp --dport 2281 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement