TCPRULE
/?
database
command(s) …
TCPRULE is a utility that adds to, removes from, or lists the TCP access control rules in a rules database file, as used by the TCP server dæmon. TCPRULE is designed to be capable of updating a live database, that the TCP server is actively using at the time.
The required database argument, naming the database file is followed by one or more commands, which are
LISTList all of the rules currently in the database.
ADD address/prefix access-levelAdd a new access control rule that specifies that IP addresses matching the given prefix bits of address have access level access-level. If a rule already exists, it is replaced atomically.
DELETE address/prefixDelete the access control rule for IP addresses matching the given prefix bits of address.
QUERY address/prefixQuery the access control rule for IP addresses matching the given prefix bits of address.
Access control rules are stored in the database in a canonical form, with the bits of the IP addresses that are not part of the prefix set to zeroes.
Add the rule specifying access level 2 for all IP (version 4) addresses matching the first 8 bits of 127.0.0.1:
[c:\]tcprule rules.db add 127.0.0.1/8 2
Delete the rule specifying the access level for all IP (version 6) addresses matching the first 10 bits of FEC0::0:
[c:\]tcprule rules.db delete FEC0::/10
List all of the rules currently in the database:
[c:\]tcprule rules.db list