Shortlist configuration EcoNAT Documentation / URL Filtering functionality (DPI) / Shortlist configuration
Shortlist
Shortlist configuration
In the functionality of URL filtering, it is possible to configure the logging to an external server without blocking connections. The management (MNG) port is used for sending logs to an external server.
For it you should generate a text file with a list of exceptions, similar to as described in paragraph "Lists loading". Then the file is loaded manually with the dpiload shortlist <URL> command, where the URL is entered in a format http://<server address>/<file name>.<file extension>.
Next, you need to configure shortlist settings in the system dpi shortlist configuration branch: turn on the option (enable) and specify the address and port of the server on which the logs will be sent, and specify the timeskew <MINUTES> for logs.
MyEcoNAT:3:system.dpi.shortlist# show
enable
timeskew 0
server_ip_and_port 1.2.0.1:8899
After that all URL-filtering events will be logging on the specified server for a specific (shortlist) address list. This option is automatically applied to all lists.
URL-filtering logging configuration
To turn on logging in the dpilist parameter list, you have to set log_matches on. If this option is enabled, but in system dpi shortlist configuration branch (see the previous paragraph) is not specified server address to which will be sent all the logs, then logging will not work.
If you want to keep logging without blocking or redirection, you should to set behaviour ignore in the dpilist parameters (logging will also work when setting behaviour parameter with other values).
dpilist1
{
enable
whitelist_mode off
log_matches on
log_pictures off
exceptions off
behaviour ignore
redirect_use_interval off
redirect_url ""
…
Shortlist server configuration
URL filtering events entries are sent to the server that is running shortlist_server program (available from the vendor on request).
Interaction with the shortlist_server program is done by the terminal on the server where it is running with the command ./shortlist_server <flags>.
Use the following flags:
- -c – cut out pictures and other content files,
- -d – specify the file format in which the logs will be written (see. below),
- -f – log entry in one file,
- -i – IP-address, which receives the logs (if multiple interfaces are involved in the server),
- -h – show help and quit,
- -p – UDP-port, which receives logs (it should be noted in the system dpi shortlist configuration tree branch),
- -t – output logs directly to the terminal.
You may specify multiple flags simultaneously (for example, to write logging to a file and display it on the terminal).
Since there can be a lot of URL filtering events, there is an opportunity to record groups of logs generated on a temporary basis in the program. For example, create a different file every day or every hour. To set this format of the logs record use -d flag. The possible flag codes and corresponding formats are shown in the table below. If the –f %F.log flag is specified, the log files will be generated daily, and the format of their names will be YYYY-MM-SS.log, for example, 2016-05-10.log.
Code | Description |
---|---|
%a | Abbreviated weekday name |
%A | Full weekday name |
%b | Abbreviated month name |
%B | Full month name |
%c | Standard string of date and time |
%C | The last two digits of the year |
%d | Day of the month as a decimal number (1-31) |
%D | Date in a month/day/year |
%e | Day of the month as a decimal number (1-31) in two-character field |
%F | Date in the form "year-month-day" |
%g | The last two digits of the year with weekly year |
%G | Year using a weekly year |
%h | Abbreviated month name |
%Н | Hour (0-23) |
%j | Hour (1-12) |
%j | Day of the year as a decimal number (1-366) |
%m | The month as a decimal number (1-12) |
%M | The minutes as a decimal number (0-59) |
%n | Delimeter of strings |
%p | The local equivalent of AM (before noon) or PM (afternoon) |
%r | 12-hour time |
%R | Time in the form hh:mm |
%S | The seconds as a decimal number (0-60) |
%T | Horizontal tab |
%T | Time in the form hh:mm:ss |
%u | Day of the week; Monday – the first day of the week (0-6) |
%U | Week of the year; Sunday – the first day of the week (0-53) |
%V | Week of the year with weekly year |
%w | Day of the week as a decimal number (0-6, Sunday – day 0) |
%W | Week of the year; Monday – the first day of the week (0-53) |
%x | The standard date string |
%X | Standard time string |
%y | Year as a decimal number without a century (0-99) |
%Y | Year as a decimal number, including a century |
%z | Offset relative to Coordinated Universal Time(UTC) |
%Z | The name of the time zone |
%% | The percent sign |