NxFilter Tutorial

Configuration files
There are several configuration files you can modify or create in /nxfilter/conf directory.

Config values set by files are not share across clustering nodes. It's only for the current server. You have to restart your server to load new config values.


cfg.properties
This is the main configuration files. You can set some parameters below for NxFilter.

- listen_ip

At default, NxFilter listents on all IPs of the system.

- dns_port

You can change UDP DNS port of NxFilter. The default value is 53.

- http_port

You can change webserver port of NxFilter. The default value is 80.

- https_port

You can change webserver port of NxFilter. The default value is 443.

- upstream_dns

You can override the upsream DNS servers set by GUI. You can set up to 3 DNS server IP addresses separated by commas.

- local_dns_port

You can run a local recursive DNS server and use it as the upstream server of NxFilter. For example, you run it on UDP/5353 and set '5353' as the value of this parameter.

- keystore_file

When you have your own SSL certificate as a JSK file. You can put it into /nxfilter/conf directory and set the filename as the value of 'keystore_file'.
    ex) keystore_file = conf/myssl.jks

- keystore_pass

The password of your JKS file.

- stop_auto_delete

NxFilter delete old traffic data on 2 AM. You can stop it and run '/nxfilter/bin/dbclean.sh' once a week.

- classifier_num

You can increase the number of classifiers for dynamic classification.

- rh_num

You can increase the number of its request handler. For more detail, read The number of request handlers

- www_dir

The diretory of GUI pack of NxFilter.

- cluster_mode

Clustering mode of the server.
    ex) 0 = stand-alone, 1 = master, 2 = slave

- master_ip

The IP address of your master node.

- slave_ip

The IP addresses of your slave nodes.

- block_node_ip

Node specific block redireciton IP. This is for when you override the block redirection IP for a cluster node.

- cluster_double_check

This is for master node connection checking. For more details, read Master node connection checking

You don't need to set these values by yourself in most cases. Some of them are to be set by GUI.


log4j.properties
We use Log4j for system logging. You can set log level in the file. For debugging, change INFO to DEBUG in the file.


oem.properties
This file is for customization. For more details, read OEM properties


appname
This file is used for creating Windows service. The service name of NxFilter can be defined in the file.


Access control files
You can have dns-allow-ip.txt and dns-block-ip.txt files and allowed IPs and blocked IPs in the files. For more details, read Access control by IP blocks


Language files
NxFilter supports multiple languages. We place the language files in the /nxfilter/lang directory. Within this directory, there are subdirectories for each language based on the 2-character country codes. Each country code directory contains three files:

1. dict.txt : GUI translation
2. categories.txt : Jahaslist categories
3. cloudlist.map : Cloudlist categories

To add a new language, create a new directory inside /nxfilter/lang using the 2-character country code for the language. Then, copy the following files into the new directory and translate them into the desired language:

  • /nxfilter/lang/dic.txt
  • /nxfilter/jahaslist/categories.txt
  • /nxfilter/conf/cloudlist.map