| 1 |
# zone-any, any-zone, any-any |
| 2 |
|
| 3 |
These sections are similar to zone-zone section, except that they match |
| 4 |
any destination (zone-any), any source (any-zone) or all (any-any) traffic. |
| 5 |
These [rules](../rule/index.md) are processed first and then normal zone-zone rules. |
| 6 |
Example: |
| 7 |
|
| 8 |
``` |
| 9 |
localhost-any { |
| 10 |
# Allow ping and SSH from localhost, no matter where it is going. |
| 11 |
ping |
| 12 |
ssh |
| 13 |
|
| 14 |
# Final drop/reject rule is usually added to specific localhost-zone |
| 15 |
# section, not in localhost-any. |
| 16 |
} |
| 17 |
|
| 18 |
localhost-public { |
| 19 |
# Accept all localhost-any rules (ping, SSH), plus HTTPS. |
| 20 |
https |
| 21 |
reject log |
| 22 |
} |
| 23 |
|
| 24 |
localhost-internal { |
| 25 |
# Accept all localhost-any rules (ping, SSH), plus DNS queries. |
| 26 |
domain |
| 27 |
reject log |
| 28 |
} |
| 29 |
``` |
| 30 |
|
| 31 |
Matcher `szone -public` can be used in rule to skip adding it to |
| 32 |
`public-localhost`. Example: |
| 33 |
|
| 34 |
``` |
| 35 |
any-localhost { |
| 36 |
ssh # allow ssh from anywhere |
| 37 |
https szone -public # allow https from anywhere except from public |
| 38 |
} |
| 39 |
|
| 40 |
localhost-any { |
| 41 |
ssh # allow ssh to anywhere |
| 42 |
vnc dzone -public # allow vnc to anywhere except to public |
| 43 |
} |
| 44 |
``` |