G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 5th, 2020 146 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. eth0='eno16777728'
  4.  
  5. iptables -P INPUT ACCEPT
  6. iptables -P FORWARD ACCEPT
  7. iptables -P OUTPUT ACCEPT
  8. iptables -F
  9. iptables -X
  10. iptables -t nat -F
  11. iptables -t nat -X
  12. iptables -t mangle -F
  13. iptables -t mangle -X
  14.  
  15. iptables -F
  16. iptables -P INPUT DROP
  17. iptables -P OUTPUT DROP
  18. iptables -P FORWARD DROP
  19.  
  20. iptables -A OUTPUT -o lo -j ACCEPT
  21. iptables -A INPUT -s 192.168.0.0/24 -j DROP
  22.  
  23. iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
  24. #always
  25. iptables -A OUTPUT -p icmp --icmp-type echo-reply -m state --state ESTABLISHED,RELATED -j ACCEPT
  26.  
  27. iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
  28. iptables -A INPUT -p icmp --icmp-type echo-reply -m state --state ESTABLISHED,RELATED -j ACCEPT
  29.  
  30. #3
  31. iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
  32. iptables -A INPUT -p udp --sport 53 -m state --state ESTABLISHED,RELATED -j ACCEPT
  33.  
  34.  
  35. #4
  36. iptables -A INPUT -p tcp --dport 22 -j ACCEPT
  37. iptables -A OUTPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT
  38.  
  39. #5
  40. iptables -A OUTPUT -p tcp --sport 1024: --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
  41. iptables -A INPUT -p tcp --sport 21 -m conntrack --ctstate ESTABLISHED -j ACCEPT
  42.  
  43. iptables -A OUTPUT -p tcp --sport 1024: --dport 1024: -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
  44. iptables -A INPUT -p tcp --sport 1024: -m conntrack --ctstate ESTABLISHED -j ACCEPT
  45.  
  46. #6.1
  47. iptables -A OUTPUT -p tcp --match multiport --dport 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
  48. iptables -A INPUT -p tcp --match multiport --sport 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
  49.  
  50. #6.2
  51. iptables -A INPUT -p tcp --match multiport --dport 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
  52. iptables -A OUTPUT -p tcp --match multiport --sport 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
RAW Paste Data
Ledger Nano X - The secure hardware wallet
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