Advertisement
digazumxyz

iptablesstatefull.sh

Oct 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. iptables -P INPUT DROP
  2. iptables -P FORWARD DROP
  3. iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  4. iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
  5. iptables -A INPUT -p icmp -j ACCEPT
  6. iptables -A INPUT -p tcp --dport 2019 -j ACCEPT
  7. iptables -A INPUT -p udp --dport 53 -j ACCEPT
  8. iptables -A INPUT -p tcp --dport 53 -j ACCEPT
  9. iptables -A INPUT -p tcp --dport 443 -j ACCEPT
  10. iptables -A INPUT -p tcp --dport 993 -j ACCEPT
  11. iptables -A INPUT -p tcp --dport 465 -j ACCEPT
  12. iptables -A INPUT -p tcp --dport 389 -j ACCEPT
  13. iptables -A INPUT -p tcp --dport 1195 -j ACCEPT
  14. iptables -A FORWARD -p icmp -j ACCEPT
  15. iptables -A FORWARD -p udp --dport 53 -j ACCEPT
  16. iptables -A FORWARD -p tcp --dport 53 -j ACCEPT
  17. iptables -A FORWARD -p tcp --dport 443 -j ACCEPT
  18. iptables -A FORWARD -p tcp --dport 993 -j ACCEPT
  19. iptables -A FORWARD -p tcp --dport 465 -j ACCEPT
  20. iptables -A FORWARD -p tcp --dport 389 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement