SHARE
TWEET

Untitled

a guest Jun 15th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Install ufw:
  2.  
  3. apt install ufw
  4.  
  5. # Set rules back to default:
  6. ufw default deny incoming
  7. ufw default allow outgoing
  8.  
  9.  
  10. # Allow ssh:
  11. ufw allow ssh
  12. # or
  13. ufw allow 22
  14.  
  15. # Enable ufw:
  16. ufw enable
  17.  
  18. # Disable:
  19. ufw disable
  20.  
  21. # See rules:
  22. ufw status verbose
  23.  
  24. # Allow multiple ports: from 6000-6007
  25. ufw allow 6000:6007/tcp
  26. ufw allow 6000:6007/udp
  27.  
  28. # Allow incoming traffic on a public interface on a specific port:
  29. ufw allow in on eth0 to any port 80
  30.  
  31. # List rules by number:
  32. ufw status numbered
  33.  
  34. # Delete rule:
  35. ufw delete 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top