home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110725.etc.tar.gz / bradford.20110725.etc.tar / etc / sysconfig / scripts / SuSEfirewall2-custom < prev    next >
Text File  |  2006-04-22  |  4KB  |  88 lines

  1. #
  2. # Authors: Marc Heuse <marc@suse.de>,
  3. #          Volker Kuhlmann <kuhlmav@elec.canterbury.ac.nz>
  4. #
  5. # /etc/sysconfig/scripts/SuSEfirewall2-custom
  6. #
  7. # ------------------------------------------------------------------------
  8. #
  9. # This is file is for SuSEfirewall2 and is an example for using
  10. # the hooks which are supplied to load customized ipchains rules.
  11. #
  12. # THERE IS NO HELP FOR USING HOOKS EXCEPT THIS FILE ! SO READ CAREFULLY !
  13. # IT IS USEFUL TO CROSS-READ /sbin/SuSEfirewall2 TO SEE HOW HOOKS WORK !
  14. #
  15. # ------------------------------------------------------------------------
  16.  
  17. fw_custom_before_antispoofing() {
  18.     # these rules will be loaded before any anti spoofing rules will be
  19.     # loaded. Effectively the only filter lists already effective are
  20.     # 1) allow any traffic via the loopback interface, 2) allow DHCP stuff,
  21.     # 3) allow SAMBA stuff [2 and 3 only if FW_SERVICE_... are set to "yes"]
  22.     # You can use this hook to prevent logging of uninteresting broadcast
  23.     # packets or to allow certain packet through the anti-spoofing mechanism.
  24.  
  25. #example: allow incoming multicast packets for any routing protocol
  26. #iptables -A INPUT -j ACCEPT -d 224.0.0.0/24
  27.  
  28.    true
  29. }
  30.  
  31. fw_custom_after_antispoofing() { # could also be named "before_port_splitting()"
  32.     # these rules will be loaded after the anti-spoofing and icmp handling
  33.     # but before any IP protocol or TCP/UDP port allow/protection rules
  34.     # will be set.
  35.     # You can use this hook to allow/deny certain IP protocols or TCP/UDP
  36.     # ports before the SuSEfirewall2 generated rules are hit.
  37.  
  38. #example: always filter backorifice/netbus trojan connect requests and log them.
  39. #for target in LOG DROP; do
  40. #    for chain in input_ext input_dmz input_int forward_int forward_ext forward_dmz; do
  41. #        iptables -A $chain -j $target -p tcp --dport 31337
  42. #        iptables -A $chain -j $target -p udp --dport 31337
  43. #        iptables -A $chain -j $target -p tcp --dport 12345:12346
  44. #        iptables -A $chain -j $target -p udp --dport 12345:12346
  45. #    done
  46. #done
  47.  
  48.     true
  49. }
  50.  
  51. fw_custom_before_port_handling() { 
  52.     # these rules will be loaded after the anti-spoofing and icmp handling
  53.     # and after the input has been redirected to the input_XXX and 
  54.     # forward_XXX chains and some basic chain-specific anti-circumvention
  55.     # rules have been set,
  56.     # but before any IP protocol or TCP/UDP port allow/protection rules
  57.     # will be set.
  58.     # You can use this hook to allow/deny certain IP protocols or TCP/UDP
  59.     # ports before the SuSEfirewall2 generated rules are hit.
  60.  
  61.     true
  62. }
  63.  
  64. fw_custom_before_masq() { # could also be named "after_port_handling()"
  65.     # these rules will be loaded after the IP protocol and TCP/UDP port
  66.     # handling, but before any IP forwarding (routing), masquerading
  67.     # will be done.
  68.     # NOTE: reverse masquerading is before directly after
  69.     #       fw_custom_before_port_handling !!!!
  70.     # You can use this hook to ... hmmm ... I'm sure you'll find a use for
  71.     # this ...
  72.  
  73.     true
  74. }
  75.  
  76. fw_custom_before_denyall() { # could also be named "after_forwardmasq()"
  77.     # these are the rules to be loaded after IP forwarding and masquerading
  78.     # but before the logging and deny all section is set by SuSEfirewall2.
  79.     # You can use this hook to prevent the logging of annoying packets.
  80.  
  81. #example: prevent logging of talk requests from anywhere
  82. #for chain in input_ext input_dmz input_int forward_int forward_ext forward_dmz; do
  83. #    iptables -A $chain -j DROP -p udp --dport 517:518
  84. #done
  85.  
  86.     true
  87. }
  88.