acl.conf.sample 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ;
  2. ; Named Access Control Lists (ACLs)
  3. ;
  4. ; A convenient way to share acl definitions
  5. ;
  6. ; This configuration file is read on startup
  7. ;
  8. ; CLI Commands
  9. ; -----------------------------------------------------------
  10. ; acl show Show all named ACLs configured
  11. ; acl show <name> Show contents of a particular named ACL
  12. ; reload acl Reload configuration file
  13. ;
  14. ; Any configuration that uses ACLs which has been made to be able to use named
  15. ; ACLs will specify a named ACL with the 'acl' option in its configuration in
  16. ; a similar fashion to the usual 'permit' and 'deny' options. Example:
  17. ; acl=my_named_acl
  18. ;
  19. ; Multiple named ACLs can be applied by either comma separating the arguments or
  20. ; just by adding additional ACL lines. Example:
  21. ; acl=my_named_acl
  22. ; acl=my_named_acl2
  23. ;
  24. ; or
  25. ;
  26. ; acl=my_named_acl,my_named_acl2
  27. ;
  28. ; ACLs specified by name are evaluated independently from the ACL specified via
  29. ; permit/deny. In order for an address to pass a given ACL, it must pass both
  30. ; the ACL specified by permit/deny for a given item as well as any named ACLs
  31. ; that were specified.
  32. ;
  33. ;[example_named_acl1]
  34. ;deny=0.0.0.0/0.0.0.0
  35. ;permit=209.16.236.0
  36. ;permit=209.16.236.1
  37. ;
  38. ;[example_named_acl2]
  39. ;permit=0.0.0.0/0.0.0.0
  40. ;deny=10.24.20.171
  41. ;deny=10.24.20.103
  42. ;deny=209.16.236.1
  43. ;
  44. ; example_named_acl1 above shows an example of whitelisting. When whitelisting, the
  45. ; named ACLs should follow a deny that blocks everything (like deny=0.0.0.0/0.0.0.0)
  46. ; The following example explains how combining the ACLs works:
  47. ; <in another configuration>
  48. ; [example_item_with_acl]
  49. ; acl=example_named_acl1
  50. ; acl=example_named_acl2
  51. ;
  52. ; Suppose 209.16.236.0 tries to communicate and the ACL for that example is applied to it...
  53. ; First, example_named_acl1 is evaluated. The address is allowed by that ACL.
  54. ; Next, example_named_acl2 is evaluated. The address isn't blocked by example_named_acl2
  55. ; either, so it passes.
  56. ;
  57. ; Suppose instead 209.16.236.1 tries to communicate and the same ACL is applied.
  58. ; First, example_named_acl1 is evaluated and the address is allowed.
  59. ; However, it is blocked by example_named_acl2, so the address is blocked from the combined
  60. ; ACL.
  61. ;
  62. ; Similarly, the permits/denies in specific configurations that make up an ACL definition
  63. ; are also treated as a separate ACL for evaluation. So if we change the example above to:
  64. ; <in another configuration>
  65. ; [example_item_with_acl]
  66. ; acl=example_named_acl1
  67. ; acl=example_named_acl2
  68. ; deny=209.16.236.0
  69. ;
  70. ; Then 209.16.236.0 will be rejected by the non-named component of the combined ACL even
  71. ; though it passes the two named components.
  72. ;
  73. ;
  74. ; Named ACLs can use ipv6 addresses just like normal ACLs.
  75. ;[ipv6_example_1]
  76. ;deny = ::
  77. ;permit = ::1/128
  78. ;
  79. ;[ipv6_example_2]
  80. ;permit = fe80::21d:bad:fad:2323