| Class | Symbiosis::Firewall::TemplateDirectory |
| In: |
firewall/lib/symbiosis/firewall/directory.rb
|
| Parent: | Directory |
This class describes a directory containing rule names and ports.
For example the following directory tree will allow ports 22, 33, and those defined by the "dns" template, in that order.
. |--- 10-22 |--- 20-33 \--- 30-dns
The order in which the rules are generated is determined by filename. The part of the filename up to the first dash is used for this, and it must be numeric.
Each file can be empty, or contain a list of addresses or hostnames. In the case of an emtpy file, no restrictions are placed on which IP can access that port. If hostnames or addresses are specified, then only those hosts can access that port. If the addresses are IPv4, then they‘re added using iptables. If they are IPv6, they are added using ip6tables.
NB that hostnames are resolved using A and AAAA lookups when the firewall is run.