Advertisement
Guest User

Untitled

a guest
Sep 27th, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ls -l /etc/rc.local
  2. -rwxr-xr-x 1 root root 843 2012-09-27 17:02 /etc/rc.local
  3.  
  4. /etc/rc.local
  5.  
  6. #!/bin/sh -e
  7. #
  8. # rc.local
  9. #
  10. # This script is executed at the end of each multiuser runlevel.
  11. # Make sure that the script will "exit 0" on success or any other
  12. # value on error.
  13. #
  14. # In order to enable or disable this script just change the execution
  15. # bits.
  16. #
  17. # By default this script does nothing.
  18.  
  19. #Flush of all rules
  20. iptables -F
  21. #permit SSH access
  22. iptables -A INPUT -p tcp --dport 22 -j ACCEPT
  23. #Permit local traffic
  24. iptables -A INPUT -p tcp -s 127.0.0.1/8 -j ACCEPT
  25. iptables -A INPUT -p tcp -s 192.168.0.98 -j ACCEPT
  26. #Permit access from you workstation
  27. iptables -A INPUT -p tcp -s 192.168.0.98 -j ACCEPT
  28. #Block all Zimbra ports for incoming traffic
  29. iptables -A INPUT -i eth0 -p tcp -m multiport --dport 25,80,110,143,443,993,995 -j REJECT
  30. #Block all Zimbra outgoing traffic
  31. iptables -A OUTPUT -o eth0 -p tcp --dport 25 -j REJECT
  32.  
  33. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement