Last active
November 5, 2021 20:10
-
-
Save olivx/ba61dfe9b98d82b3a70078102eed16dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Incluir regras de firewall: | |
iptables -t nat -A PREROUTING -p udp --dport <31001> -i ens3 -j DNAT --to <ip-destino>:<porta-destino> <- ip:port | |
Listar regras de firewall: | |
iptables -t nat -nL --lin | |
Deletar regra: | |
iptables -t nat -D PREROUTING <numero de regra> <- 1 | |
iptables -t nat -D PREROUTING -p udp --dport 80 -i ens3 -j DNAT --to <ip-destino>:<porta-destino> | |
Para eliminar a regra tem que ter todas as condicoes iguais. | |
tcpdump -i ens3 -Nnl udp and port 80 | |
Mostrar todos os pacotes filtrados por protocolo e numero de porta. | |
watch -n0 iptables -t nat -v -nL PREROUTING | |
Comando para verificar todos os pacotes sendo enviados atraves do PREROUTING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment