ShapeShifter499

/etc/default/iptables

Jun 7th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. #---------------------------------------------------------------------
  2. # This file is part of iRedMail, which is an open source mail server
  3. # solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
  4. #
  5. # iRedMail is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # iRedMail is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
  17. #---------------------------------------------------------------------
  18.  
  19. #
  20. # Sample iptables rules. It should be localted at:
  21. # /etc/sysconfig/iptables
  22. #
  23. # Shipped within iRedMail project:
  24. # * http://iRedMail.googlecode.com/
  25. #
  26.  
  27. *filter
  28. :INPUT DROP [0:0]
  29. :FORWARD DROP [0:0]
  30. :OUTPUT ACCEPT [0:0]
  31.  
  32. # Keep state.
  33. -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  34.  
  35. # Loop device.
  36. -A INPUT -i lo -j ACCEPT
  37.  
  38. # http, https
  39. -A INPUT -p tcp --dport 80 -j ACCEPT
  40. -A INPUT -p tcp --dport 443 -j ACCEPT
  41.  
  42. # smtp, submission
  43. -A INPUT -p tcp --dport 25 -j ACCEPT
  44. -A INPUT -p tcp --dport 587 -j ACCEPT
  45.  
  46. # pop3, pop3s
  47. -A INPUT -p tcp --dport 110 -j ACCEPT
  48. -A INPUT -p tcp --dport 995 -j ACCEPT
  49.  
  50. # imap, imaps
  51. -A INPUT -p tcp --dport 143 -j ACCEPT
  52. -A INPUT -p tcp --dport 993 -j ACCEPT
  53.  
  54. # ssh
  55. -A INPUT -p tcp --dport 22 -j ACCEPT
  56.  
  57. # Allow PING from remote hosts.
  58. -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
  59.  
  60. # ejabberd
  61. #-A INPUT -p tcp --dport 5222 -j ACCEPT
  62. #-A INPUT -p tcp --dport 5223 -j ACCEPT
  63. #-A INPUT -p tcp --dport 5280 -j ACCEPT
  64.  
  65. # ldap/ldaps
  66. #-A INPUT -p tcp --dport 389 -j ACCEPT
  67. #-A INPUT -p tcp --dport 636 -j ACCEPT
  68.  
  69. # ftp.
  70. #-A INPUT -p tcp --dport 20 -j ACCEPT
  71. #-A INPUT -p tcp --dport 21 -j ACCEPT
  72.  
  73. COMMIT
Advertisement
Add Comment
Please, Sign In to add comment