1

I am a newbie, so my apologies up front.

I am trying to get DansGuardian installed (which I believe I have) and working. To get it working I need to filter IP traffic through the app via iptables. There are appropriate commands in the 'Getting DansGuardian working on Ubuntu' page. My issue is that the system is telling me that iptables is not currently installed - which is wrong. I understand that it is the primary firewall service for Ubuntu.

I have tried:

xyzzy@ubuntu:/usr/sbin$ iptables

The program 'iptables' is currently not installed.  
You can install it by typing:
sudo apt-get install iptables

So:

sudo apt-get install iptables
Reading package lists... Done

Building dependency tree

Reading state information... Done

iptables is already the newest version.

The following package was automatically installed and is no longer required:

  thunderbird-globalmenu

Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 342 not upgraded.

Only to be told that the version I am running is the latest.

ufw is running.

Alaa Ali
  • 31,075
  • 11
  • 94
  • 105
CalBoy386
  • 21
  • 1
  • 1
  • 3
  • 2
    Have you tried `apt-get --reinstall install iptables`? – kraxor Jul 29 '14 at 23:25
  • What's in your $PATH variable? What is the output of `echo $PATH`? Also, what is the output of `ls -l /sbin | grep iptables`? – Alaa Ali Jul 29 '14 at 23:48
  • /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games – CalBoy386 Jul 29 '14 at 23:56
  • lrwxrwxrwx 1 root root 13 Jul 26 19:03 iptables-restore -> xtables-multi lrwxrwxrwx 1 root root 13 Jul 26 19:03 iptables-save -> xtables-multi – CalBoy386 Jul 29 '14 at 23:58
  • It seems that the `iptables` executable is not installed for some reason. Try @kraxor's suggestion by reinstalling `iptables`. You should put a `sudo` at the beginning of the command he posted, and let us know if it fixes the issue. – Alaa Ali Jul 30 '14 at 00:00
  • 2
    reinstalling worked. Thank you. Odd, this is a new insall of Ubuntu. Not sure how it was corrupted. – CalBoy386 Jul 30 '14 at 00:05
  • One more silly question, how do I tag this as answered? I do not see the icons next to the replies as described in the site help? – CalBoy386 Jul 30 '14 at 00:12
  • @CalBoy386 waw, we need more people like you that actually read the site's help =). What we're typing here are comments. You can only accept answers, not comments. Answers appear in the space below. I waited for kraxor to post an answer because he should take credit, but he still hasn't, so I just posted an answer now. You'll find the "check mark" to mark my answer as accepted to the left of the answer. – Alaa Ali Jul 30 '14 at 00:39

3 Answers3

2

Credit to kraxor's comment on the original question:

You should try reinstalling iptables by executing the following command:

sudo apt-get --reinstall install iptables
Alaa Ali
  • 31,075
  • 11
  • 94
  • 105
1

try these one by one

sudo apt-get remove iptables

sudo apt-get update

sudo apt-get install iptables

it should work now.

OverCoder
  • 490
  • 4
  • 21
1

Use following command:

sudo apt-get update
sudo apt-get install iptables-persistent

and it will install the iptables-persistent package for you.

Fabby
  • 34,341
  • 38
  • 97
  • 191
Amol Nikam
  • 11
  • 1