Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Vari�veis
- # -------------------------------------------------------
- echo "Securing your System"
- # -------------------------------------------------------
- iptables=/sbin/iptables
- IF_EXTERNA=eth0
- $iptables -P INPUT ACCEPT
- $iptables -P FORWARD ACCEPT
- $iptables -F
- $iptables -X
- $iptables -F -t mangle
- $iptables -X -t mangle
- # Determina a pol�tica padr�o
- $iptables -A INPUT -p tcp --dport 22003 -j ACCEPT
- # -------------------------------------------------------
- $iptables -P INPUT DROP
- $iptables -P FORWARD DROP
- $iptables -A INPUT -i lo -j ACCEPT
- $iptables -A OUTPUT -o lo -j ACCEPT
- $iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
- # Libera acesso externo a determinadas portas
- # -------------------------------------------------------
- $iptables -A INPUT -p tcp --dport 22003 -j ACCEPT
- $iptables -A INPUT -p tcp --dport 22253 -j ACCEPT
- $iptables -A INPUT -p udp --dport 22253 -j ACCEPT
- $iptables -A INPUT -p tcp --dport 80 -j ACCEPT
- # --------------------------------------
- echo "Iptables Firewall Filtering Active"
Add Comment
Please, Sign In to add comment