Unable to uninstall after installing from deb package.

Bug #318301 reported by diablo75
4
Affects Status Importance Assigned to Milestone
WebContentControl
Fix Released
Critical
KIAaze

Bug Description

I decided to try WebContentControl by downloading the latest deb package from this site to my Ubuntu 8.10 PC. I like the software. It was simple to setup and use. But I didn't actually want it for my own computer; I was testing it out before deciding to recommend it to others.

I was instructed to uninstall it with the following command in terminal:

dpkg -r webcontentcontrol

Doing this produced this output:

user@userpc:~$ sudo dpkg -r webcontentcontrol
(Reading database ... 137435 files and directories currently installed.)
Removing webcontentcontrol ...
prerm remove|deconfigure called
Unconfiguring dansguardian+firehol+tinyproxy
FireHol is stopped
TinyProxy is stopped
DansGuardian is stopped
 * Stopping Firewall firehol [ OK ]
Stopping tinyproxy: tinyproxy.
 * Stopping DansGuardian dansguardian [ OK ]
FireHol is stopped
TinyProxy is stopped
DansGuardian is stopped
All OK! Everything was stopped
Running from /home/user
===>importing /usr/share/webcontentcontrol/backup.dgs.full
tar: /usr/share/webcontentcontrol/backup.dgs.full: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
dpkg: error processing webcontentcontrol (--remove):
 subprocess pre-removal script returned error exit status 2
Errors were encountered while processing:
 webcontentcontrol
user@userpc:~$

-------------

Since installing this software I've noticed that I can no longer VNC into my PC via port 5500. I have confirmed that this is not a network related issue by substituting my laptop in place of the PC and port forwarding from my router to the laptop instead of the PC and it works perfectly fine (my first thought was that my work had decided to start blocking port 5500, but that's not the case here).

Revision history for this message
KIAaze (zohn-joidberg) wrote :

Thanks for the bug report.
Did you use v1.2.0 or v1.1.9 from the PPA?: https://launchpad.net/~zohn-joidberg/+archive

Anyway, I think I already located the error. I removed the config file backup from the install process here: http://bazaar.launchpad.net/~zohn-joidberg/webcontentcontrol/main/annotate/head%3A/scripts/install.sh
This is because I started working on fixing the upgrade process when using the PPA.

The networking issue is most likely caused by FireHol.

To be able to remove the package, just run the following command:
/usr/share/webcontentcontrol/scripts/export_all.sh "/usr/share/webcontentcontrol/backup"

This will create /usr/share/webcontentcontrol/backup.dgs.full and then the package removal should work.

However, since the initial configuration files haven't been backed up, you will still experience networking problems and filtering.

To fix this remove firehol, tinyproxy and dansguardian:
sudo apt-get remove --purge firehol tinyproxy dansguardian
or
sudo apt-get remove firehol tinyproxy dansguardian
if you want to keep the configuration files.

I will release a fix as soon as possible.

Revision history for this message
KIAaze (zohn-joidberg) wrote :

If you use Ubuntu, the command above should be with sudo of course:
sudo /usr/share/webcontentcontrol/scripts/export_all.sh "/usr/share/webcontentcontrol/backup"

Revision history for this message
diablo75 (dave-davestechsupport) wrote :

I followed your instructions and entered

sudo /usr/share/webcontentcontrol/scripts/export_all.sh "/usr/share/webcontentcontrol/backup"

into terminal.

Then I entered:

sudo apt-get remove --purge firehol tinyproxy dansguardian

and it appears to have removed all the software (checking for firehol, tinyproxy and dansguardian in synaptic package manager confirms the software is no longer installed).

However, I am still unable to vnc from my laptop into my PC over my local network. I'm not sure what to do about this.

Revision history for this message
KIAaze (zohn-joidberg) wrote :

Try flushing the iptables settings (iptables is the real firewall, firehol only helps configuring it):
sudo iptables -F

Do you use any other firewall config tool like Firestarter, etc?

Did you install webcontentcontrol on your PC or your laptop?
And could you vnc from your laptop into your PC while webcontentcontrol was installed?

Anyway, I made a new release which should fix the removal problem you initially had:
https://launchpad.net/webcontentcontrol/+announcement/1820

Since the previous package didn't back up the config during install, it couldn't restore it. So this might be a cause of problems if you had configured firehol, tinyproxy and/or dansguardian before installation to allow vnc to work.

Revision history for this message
diablo75 (dave-davestechsupport) wrote :

Just wanted to add that I followed up with:

sudo aptitude purge firehol

Which appeared to remove a few more things (I think I saw clamAV in there) and restarted the computer.

That didn't work. I then tried:

sudo aptitude purge firehol tinyproxy dansguardian

And that didn't remove anything more.

After one more reboot I am still unable to VNC into my PC from my laptop.

Revision history for this message
KIAaze (zohn-joidberg) wrote :

Please post the output of the following command:
sudo iptables -L

I discovered something interesting by the way: "ufw" (uncomplicated firewall) seems to come by default on Ubuntu since v8.04:
https://wiki.ubuntu.com/UbuntuFirewall
https://wiki.ubuntu.com/HardyHeron/Alpha4#Firewall

So another thing you could try is this:
sudo ufw disable

Note that you can also install "gufw" to configure ufw through a GUI:
http://www.ubuntugeek.com/gufw-simple-gui-for-ufw-uncomplicated-firewall.html

Concerning changes made to the system by webcontentcontrol:
By default, changes are only made to files from the dansguardian, tinyproxy and firehol packages.
If you locked the firefox proxy settings, changes are made to: /etc/firefox-3.0/pref/firefox.js
If you locked WPA interfaces, changes are made to: /etc/wpa_supplicant/ifupdown.sh

More info:
http://www.netfilter.org/
https://help.ubuntu.com/community/IptablesHowTo
https://launchpad.net/ufw
http://gufw.tuxfamily.org/index.html
http://www.ubuntugeek.com/ufw-uncomplicated-firewall-for-ubuntu-hardy.html

Revision history for this message
KIAaze (zohn-joidberg) wrote :

You should also check to see if you can ssh into your PC.
Here's a howto: https://help.ubuntu.com/community/SSHHowto

For security reasons, you should also make sure to disable SSH root access if you plan on keeping SSH installed:
http://spiralbound.net/2007/04/30/disable-ssh-root-logins-on-rhel

Revision history for this message
diablo75 (dave-davestechsupport) wrote :

I did:

sudo iptables -L

I forgot to paste the output in here before restarting my computer after doing the other two commands you suggested. (oops).

I then ran:

sudo iptables -F

Followed by:

sudo ufw disable

And restarted the computer. This still did not do the trick.

I decided to install firestarter, run it, launch vncviewer from my laptop, and noticed it appear as a blocked event. So I right-clicked on it and told it to allow and I can now VNC into the PC once again. I also ran vncviewer -listen from the PC and then ran x11vnc -connect [my dyndns address] and it worked without any need to make a rule in firestarter. So everything that I need is working once again.

Revision history for this message
diablo75 (dave-davestechsupport) wrote :

Just an additional thought...

I didn't try this, but I wonder if I had opened Preferences>Remote Desktop and disabled it, then re-enabled it if it might reset an iptables setting that opens up port 5900...

Anyway, I got it working none the less. Thank you very much for your help and assistance with getting webcontentcontrol removed. I liked it.

Revision history for this message
KIAaze (zohn-joidberg) wrote :

Ok, glad to know you got it working again.
I'm marking this bug as fixed then, altough I'll have to check up on the firewall problems after an uninstall.

Changed in webcontentcontrol:
assignee: nobody → zohn-joidberg
importance: Undecided → Critical
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.