Debian Codegraph @

docs/config/section/template.md

raw
1 # template
2
3 Template is very similar to [macro](macro.md). It's just another
4 way to define list of rules. Usually macro refers to single service
5 (like `domain` or `facetime`) while template refers to list of different
6 services. Example:
7
8 ```
9 template outgoing_services {
10 # Define template called "outgoing_services"
11 dhcp-server
12 domain
13 https
14 ntp
15 ping
16 ssh
17 }
18
19 localhost-public {
20 # Include template's content here
21 template outgoing_services
22
23 # Continue with other rules
24 http
25 reject log
26 }
27
28 dmz-public {
29 # Use same template for traffic coming from dmz zone
30 template outgoing_services
31
32 # Continue with other rules
33 reject log
34 }
35 ```
36
37 See [host firewall](../../example/host-firewall.md#multi-zone)
38 for real life example.