Periodic forwarding setup EcoNAT Documentation / URL Filtering functionality (DPI) / Periodic forwarding setup
The function of URL filtering of EcoNAT equipment allows for periodic redirection of users from certain websites (for example, competitors' websites) by a timer.
To configure periodic redirects, in the dpilist must be manually loaded a list of sites for which you want to implement a redirection (see more in "Lists loading" paragraph).
Next, you have to configure the list parameters, including redirection timers and the address to which the user will be redirected, for example, this might be the service provider’s page with a description of the services and special offers.
The redirection mechanism is activated automatically when the user first visits any page from the list. Countdown timers starts with this point. One of the timers (redirect_interval) counts down the time until the next redirect for all other URLs from the list, the second counts time before next redirection by the first triggered address occur (redirect_interval_url).
For example, if the list of addresses is uploaded:
For the list set:
- redirect_interval – day,
- redirect_interval_url – 10 minutes.
The user enters the rg.ru, and it immediately redirects to the provider’s page. After that, he may visit rg.ru during the day, after that again will be redirection. At the same time, the remaining sites in the list are free to visit within 10 minutes. After that, it comes, for example, to ya.ru and it redirected again to the provider’s page. Twenty-four hours after that ya.ru opens in normal mode, then again there is a redirection.
The parameters that should be configured for periodic redirects are presented in the table below.
Parameter | Description |
---|---|
system dpi dpilist<NUMBER> | |
redirect_interval | The interval between the redirection for the sites in the list (seconds). Default 10 minutes (600). After the first redirecting all other sites from the list will be opened within 10 min in the normal mode |
redirect_interval_url | The interval between the redirections of the same page. By default, 30 days (2592000). When you try to visit the page from the list the redirection is triggered. After that, this page will be opened in the normal mode for 30 days, then redirection will occur |
behaviour redirect | Specifies the behavior of the list |
redirect_use_interval on | Enables redirection timers. If you turn off this setting, redirection will be triggered every time you try to access any site from the list |
redirect_url | The address of the page which user will be redirected. EcoSGE is capable to add some client specificators to the address string. It helps to personalize the redirection site. Used specificators: %c - send to redirect_url the callback-id received from the RADIUS server; The redirect_url parameter format: <URL>/?<VAR_NAME1>=<SPEC1>&<VAR_NAME2>= <SPEC2>..<VAR_NAMEN>=<SPECN> where URL -redirection sites address, VAR_NAME1 .. VAR_NAMEN - variable name, SPEC1 .. SPECN - specificator. For example, http://example.com/?var1=%u&ip=%i&qwe=%v2. In this case if client will try to address to forbidden.com, it will be redirected to: http://example.com/?var1= forbidden.com&ip=10.1.1.10&qwe=0 |
List configuration example:
MyEcoNAT:2:system.dpi# show
enable
functionality_mode normal_nat
certificate_file "cert.pem"
…
dpilist1
{
enable
whitelist_mode off
log_matches on
exceptions off
behaviour redirect
redirect_use_interval on
redirect_interval 600
redirect_interval_url 2592000
redirect_url "http://redirect.domen.ru/"
color_direction both
color_tos_byte 32
download_url ""
update_schedule never
no_ip ( )
ip ( 0.0.0.0/0 )
}