Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. sudo -s
  2. iptables-save > /etc/iptables/rules.v4
  3. ip6tables-save > /etc/iptables/rules.v6
  4. exit
  5.  
  6. iptables -N prohibited_traffic
  7. iptables -I INPUT 2 -j prohibited_traffic
  8.  
  9. iptables -A prohibited_traffic -s SourceIPAddress -j DROP
  10.  
  11. ip6tables -N prohibited_traffic
  12. ip6tables -I INPUT 2 -j prohibited_traffic
  13.  
  14. ip6tables -A prohibited_traffic -s SourceIPAddress -j DROP
  15.  
  16. sudo ufw deny from <ip_address> to any
  17.  
  18. sudo ufw deny from <ip_address> to any port <some_port>
  19.  
  20. sudo ufw deny proto tcp from <ip_address> to any port <some_port>
  21.  
  22. iptables -A INPUT -s IP-ADDRESS -j DROP
  23.  
  24. iptables -A INPUT -s 192.168.0.100 -j DROP
  25.  
  26. iptables -A INPUT -s 192.168.0.100 -p tcp --destination-port 80 -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement