Internet Control Setup

After the Internet proxy is setup and logging usernames correctly, then the PaperCut NG Internet Control service must be configured to monitor the proxy log files. The Internet Control service is a PaperCut NG program that is responsible for analyzing log files and reporting the usage back to the PaperCut NG Application Server. Setting up the Internet Control service involves configuring the following settings:

Once these settings are configured, PaperCut NG can find the most recent log file, parse the contents and send usage information to the application server.

Where you install the PaperCut NG Internet Control service will depend on the layout of your network. Many networks will have a dedicated proxy server, which may or may not be a suitable canditate for a PaperCut NG application server installation. For this reason, the Internet Control service may either be deployed separately to the primary server, or access the proxy server logs remotely via a network share. Some reasons for separate deployment may include:

The following are some common network layout examples involving the Internet Control service.

Configuring the Internet Control Service on Windows

  1. The setup wizard for the Internet Control service is included with the PaperCut NG application server. To start it, as an administrator level user run: StartProgram FilesPaperCut NGInternet ControlInternet Control Configuration Wizard, or the file located at [appdir]\providers\net\bin\win\setup-net-service.exe

  2. Select the type of proxy server you have under Web proxy type, and the location of your log files under Log file path. The Log mask will be set for automatically based on the selected proxy type. If you have changed the naming format of your log files, enter a custom file mask here.

    Selecting the proxy server type and log file location

    Figure 13.5. Selecting the proxy server type and log file location

  3. Press Test settings. The Test results area should now show some data reflecting the information found in the proxy log files. If the data looks correct (i.e. you recognize the user names and the data received looks correct), press Next. Otherwise, check that the information entered is correct, and that the log file path contains the correct log files.

    Example output from a test parse of proxy server log files

    Figure 13.6. Example output from a test parse of proxy server log files

    A few parse errors may be encountered if a log file has been corrupted in some way, but if there are too many this may indicate an incorrect log format. Check that the Web proxy type you have selected is correct for your system.

  4. Select an appropriate Security group for users with internet access. The Internet Control service will modify group membership to reflect the users who have available credit (i.e. when users run out of credit, they will be removed from this group). If you have not already created a group for this purpose when configuring your proxy server, it is recommended to create a new group with a name such as Internet Users.

    Selecting a security group to allow internet access

    Figure 13.7. Selecting a security group to allow internet access

    Once an appropriate group is selected, press Next.

  5. To allow the Internet Control service to modify group membership it must have the appropriate privileges. It is recommended to create a new domain user with appropriate privileges for this purpose. The password for the service account should be set to not expire.

    Selecting a service account

    Figure 13.8. Selecting a service account

    Press Next to continue.

  6. The Internet Control service will now be configured. Press Finish to complete the setup wizard.

    To confirm that the installation was successful and that the PaperCut NG application server is now monitoring internet usage, continue reading at the section called “Verifying the Net Control service setup”.

Configuring the Internet Control Service on Windows as a Secondary Server

  1. Ensure the primary server is set up correctly.

    Before installing the Internet Control service you should take some time to ensure the primary server (central application server) is set up and running correctly. If it is not running fine now adding an extra server will only "add an extra variable to the equation" and complicate troubleshooting. For example, verify that:

    • Users are allowed top login to user pages from their workstations.

    • Administrators can access the system.

  2. Ensure firewall software is set to allow access to port 9191.

    The Internet Control service needs to communicate (initiate a TCP connection) on port 9191. Administrators should ensure that any firewall software on the primary Application Server is not set to block any incoming local network traffic on this port.

  3. Install the Internet Control service

    Install the Internet Control service software onto the secondary server. On a Windows server, this is done by selecting the "Secondary Internet Server installation" option in the installation wizard.

  4. Enter primary server location

    The Internet Control service on the secondary server needs to know where the primary server is installed.

    1. Open a text editor such as Notepad.

    2. Open the file: [appdir]\providers\net\connection.properties

    3. Update the server-ip, server-port and server-name lines to match the primary server.

    4. Restart the server so the new configuration is detected. To avoid a restart, an administrator may also choose to manually restart the PaperCut Internet Provider service.

  5. Configure the Internet Control service

    Continue with the steps found at the section called “Configuring the Internet Control Service on Windows”.

Configuring the Internet Control Service on Linux

PaperCut NG includes a command-line utility to assist with this configuration. To perform this configuration:

  1. Log into the Linux server running PaperCut NG as the papercut user.

  2. Run the command: [appdir]/providers/net/bin/linux-i686/setup-net-provider

  3. Follow the prompts, answering the questions as required.

  4. The utility will perform a test parse of the log file. Check that the results are as expected.

  5. When prompted, restart the Application server. This will restart the application server and the will also start the Internet Control service which will start parsing the log file.

  6. To confirm that the installation was successful and that the PaperCut NG application server is now monitoring internet usage, continue reading at the section called “Verifying the Net Control service setup”.

Configuring the Internet Control Service on Linux as a Secondary Server

Documentation pending - contact PaperCut NG support for details.

Verifying the Net Control service setup

First verify that the Net Control service is running. To do this:

  1. Login to the admin pages of PaperCut NG

  2. Navigate to the Internet section.

  3. Look at the bottom of the page in the Internet Control Service Status section. This show the last status message from the service and the time the status was last updated.

  4. If the status text is The Internet Control service has never been started, then the service has not started and the settings should be checked and the application server restarted if required. See Figure 13.9, “Example of Internet Control service status when service is running.”.

    Example of Internet Control service status when service is running.

    Figure 13.9. Example of Internet Control service status when service is running.

  5. If the service is running correctly then access the Internet using the proxy server and verify that the status indicates that the service is reading the logs. This should be apparent because the current line number should be increasing.

  6. By default the service reports Internet usage to the Application server once a minute. Once this time has elapsed the Internet Usage Log can be viewed and should include the recent internet usage. If this is the case then the Internet Charging service is correctly monitoring the proxy logs.