Tuesday, September 15, 2009

IPCop with CopPlus Troubleshooting Guide

First off, you want to make sure that you have a backup of your dansguardian configuration files so that the restore part below works. To make a suitable backup:
1. SSH into the box as root (ssh -p 222 root@192.168.1.1)
2. tar -cf dansguardian.tar /etc/dansguardian

What to do if the internet stops working

Make sure it's not a fluke:
1. Log into the IPCop GUI by going to this address:
https://192.168.1.1:445
There will be some dumb security warning, click OK or Yes or whatever you need to be able to view it.
2. Click (System -> Shutdown).
3. You will be prompted for the username and password.
4. Click the Reboot button.
5. Wait 10 minutes (it takes this long to reboot!) and see if the internet is now working. If it is, great! If not, continue on.

Make sure that the Proxy server and Dansguardian are running.
1. Open the IPCop GUI as before.
2. Go to Status->System Status.
3. Make sure there is a green "Running" next to Web Proxy and DansGuardian Content Filter.
4. If they are both "Stopped" and red, start the web proxy up: Services->Proxy make sure the checkboxes next to Enabled on Green and Transparent on Green are checked and click Save.
4.1. See if there is green "Running" next to Web Proxy. If so, use the first procedure again to reboot the IPCop and begin at the top of this current procedure if internet does not start working.
5. If there is a green "Running" next to Web Proxy but not DansGuardian make sure you've waited a full 10 minutes and then proceed with the next sequence of instructions at *.
6. If there is a green "Running" next to both Web Proxy and DansGuardian and you still don't have internet access (or it is intermittent), try to find a misconfigured router plugged into the network with the IP address 192.168.1.1 that is causing an IP conflict.
7. If all else fails, proceed with the following:

Re-install Dansguardian (if the above has not fixed the problem)
1. Uninstall the CopPlus addon (IPCop GUI->Addons->Addons).
Mark CopPlus, click remove.
2. Stop the proxy server (IPCop GUI -> Services -> Proxy)
Uncheck Enabled on Green. Uncheck Transparent on Green. Click Save.
3. Reboot the IPCop (IPCop GUI -> System -> Shutdown -> Reboot
4. Enable the proxy server (IPCop GUI -> Services -> Proxy)
Check Enabled on Green. Check Transparent on Green. Click Save.
5. Verify proxy is running (Status->System Status) and access to internet websites.
6. Download file CopPlus V2.2 b3 at
http://softlayer.dl.sourceforge.net/project/firewalladdons/firewalladdons%20mods/COP%2B/Copplus-2.2-GUI-b3.tar.gz
7. Install CopPlus (Addons->Addons)
Bottom of the page, Upload addon file: Browse to where you downloaded the file and click Upload.
8. Reboot IPCop.
9. ssh into 192.168.1.1 as root (from the kiosk, bring up Accesories->Terminal, type ssh -p 222 root@192.168.1.1) or use putty IP: 192.168.1.1 Port: 222 User: root
10. type the following commands followed by the enter key
cd /
tar -xf ~/dansguardian.tar
logout
11. Restart Dansguardian (Services -> Content Filter) click the Restart button.
12. Check for internet access after 10 minutes (it takes a while for Dansguardian to start)

Some other command-line commands you may find useful:
arping -i eth0 192.168.1.1
cat /var/log/messages | grep dans
sh /etc/rc.d/dansguardian status
sh /etc/rc.d/dansguardian restart