Skip to content

Instantly share code, notes, and snippets.

@rodrigoSyscop
Created July 24, 2016 03:12
Show Gist options
  • Save rodrigoSyscop/cb4b9a06566f330926b82862fc5ed416 to your computer and use it in GitHub Desktop.
Save rodrigoSyscop/cb4b9a06566f330926b82862fc5ed416 to your computer and use it in GitHub Desktop.
Firewall IPTables
# EXIBE REGRAS ATIVAS
# -n : usa números ao invés de nomes de portas
# -v : exibe estatísticas
# -L : lista regras ativas
iptables -nvL
# Altera a política padrão da chain FORWARD
iptables -P FORWARD DROP
# Apaga todas as regras em todas as chains
iptables --flush
# Barrando pacotes chegando pela interface de rede
# -p | --portocol :
# -i | --interface:
# -j : target DROP|ACCEPT|REJECT|REDIRECT|...
iptables -A INPUT -p icmp -i eth0 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment