Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. sudo iptables -P INPUT DROP
  2. sudo iptables -P OUTPUT DROP
  3.  
  4. # accept incoming connections on the SSH port of 22
  5. sudo iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
  6. # accept incoming connections on the HTTP port of 80
  7. sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
  8. # accept incoming connection to LoopBack. Neccessary to provide full functionality to most services
  9. sudo iptables -A INPUT -i lo -j ACCEPT
  10.  
  11. # accept outgoing connection to LoopBack. Neccessary to provide full functionality to most services
  12. sudo iptables -A OUTPUT -o lo -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement