Netmond V2. Port directive


The Port directive enables NetState service on a specified TCP port and define access list to it. Access list is a list of string pairs evaluated sequentionally. Each pair consists of action keyword (Permit or Deny) and a "regex" mask for client's IP address or host FQDN. At a first matching, corresponded action takes place, and list evaluation ended.

NetState service reply client's requests asynchronously from Netmond main work.

When Netmond compiled without POSIX Threads, it make copy of current variables values at the session beginning to report it during this session. With POSIX Threads NetState service report the real current state of all variables. Client can issue multiple requests during the same session.

Port number {
[ Timeout seconds ]
[ Permit "regex" ] ...
[ Deny "regex" ] ...
}
number
The NetState service port. Service disabled, by default.
seconds
maximal time to wait client request, seconds. Default is 2 seconds.
If Netmond compiled with POSIX Threads, this value not used. (timeout is absent).
regex
regex(3) mask for a client IP address or FQDN.

Port directive usage example

Port 3333 {
  Timeout 30                   # so large timeout used for debug only
  Permit "^localhost$"         # enable access from localhost,
  Permit "^127\\.0\\.0\\.1$"
  Permit "^192\\.168\\.1\\."   # ... the whole C-class network
  Permit "^192\\.168\\.2\\.1$" # ... single host
  Deny ".*"                    # and deny all others
}

NetState is up on a 3333/tcp port, timeout is 30 seconds, access list is set.


See also:
NetState service protocol
Regular expression (regex)

© 1998-2002, Rinet Software