iptables.rules 797 B

1234567891011121314151617181920212223242526272829303132
  1. *filter
  2. # default policy is DROP
  3. -P INPUT DROP
  4. -P OUTPUT DROP
  5. -P FORWARD DROP
  6. # allow IPsec tunnel traffic
  7. -A FORWARD -m policy --dir in --pol ipsec --proto esp -j ACCEPT
  8. -A FORWARD -m policy --dir out --pol ipsec --proto esp -j ACCEPT
  9. # allow ESP
  10. -A INPUT -i eth0 -p 50 -j ACCEPT
  11. -A OUTPUT -o eth0 -p 50 -j ACCEPT
  12. # allow IKE
  13. -A INPUT -i eth0 -p udp --dport 500 -j ACCEPT
  14. -A OUTPUT -o eth0 -p udp --sport 500 -j ACCEPT
  15. # allow MobIKE
  16. -A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
  17. -A OUTPUT -o eth0 -p udp --sport 4500 -j ACCEPT
  18. # allow ssh
  19. -A INPUT -p tcp --dport 22 -j ACCEPT
  20. -A OUTPUT -p tcp --sport 22 -j ACCEPT
  21. # allow crl fetch from winnetou
  22. -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
  23. -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
  24. COMMIT