Sudo: iptables: command not found

Hello fellow OSMC fans,

I’m experiencing an issue with my OSMC installation (on RPi2). I tryed to configure an iptables rule, but I am getting an error back.
“sudo: iptables: command not found”

Do I need to install iptables first? I am worried to install it without knowing, because I don’t want to break the networking.

Thanks in advance for any answers!



iptables will be installed by default on most systems. Please make sure you’re up to date

It is possible you have iptables installed, use dpkg -l iptables to confirm

An upgrade is probably needed. Please do that and confirm that helps. You can only upgrade to RC3 from RC1 or later


Hi Sam,

thanks for the reply.
dpkg -l iptables responds for me with:

osmc@osmc:~$ dpkg -l iptables
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
un  iptables       <none>       <none>       (no description available)

So it tells me to reinstall it, do I get this correct?

I am unaware of the updateing function. Could you please tell me how I can upgrade?

iptables has been installed since RC2 so you must be running an older version of OSMC.

What version of OSMC did you originally install and have you run any updates ?

If you installed any of the Alpha releases you must do a fresh install to the latest version, however if you installed RC or RC2, just go into OSMC settings updater and do a manual check for updates, then you will have iptables installed.

Hi DBMandrake,

I installed the first release of OSMC so I guess it would be RC1?
I there any way to update it via ssh?

No RC1 is not the first release, there were 4 public Alpha releases before that. (Alpha 1 - 4)

On older versions there isn’t an easy way to check the version, but if you provide us the output of this command we will be able to tell you:

dpkg -l | grep osmc

This is the output:

osmc@osmc:~$ dpkg -l | grep osmc
ii base-files-osmc 1.4.8 all modified base-files for OSMC system
ii diskmount-osmc 1.2.5 all Disk automounting for OSMC using udisks with standby support
ii ftr-osmc 1.2.0 all First-time-run scripts for OSMC
ii mediacenter-addon-osmc 2.9.95 all OSMC addon for mediacenter
ii mediacenter-eventclients-common-osmc 1.0.1 all Eventclient common resources for mediacenter
ii mediacenter-send-osmc 1.0.1 all Eventclient send for mediacenter
ii mediacenter-skin-osmc 2.3.3 all OSMC skin for mediacenter
ii network-osmc 1.0.23 all Network support for OSMC
ii niceprioritypolicy-osmc 1.0.1 all Configures /etc/security/limits.d to allow NICE value to be changed
ii perftune-osmc 1.0.8 all Performance tuning tweaks for OSMC
ii rbp-armmem-osmc 1.01 armhf ARM accelerated functions of string.h
ii rbp-bootloader-osmc 1.0.6 armhf Raspberry Pi Bootloader components
ii rbp-eventlircd-osmc 1.0.1 armhf eventlircd for OSMC
rc rbp-image-3.18.5-2-osmc 2 armhf Linux kernel binary image for version 3.18.5-2-osmc
rc rbp-kernel-osmc 1.1.6 armhf Kernel meta package bringing in the latest OSMC kernel for this device
ii rbp-libafpclient-osmc 0.8.102 armhf libafpclient for osmc
ii rbp-libcec-osmc 2.1.4 armhf libcec
ii rbp-libnfs-osmc 1.9.61 armhf libnfs library
ii rbp-librtmp-osmc 2.4.0-3 armhf librtmp library
ii rbp-libshairplay-osmc 0.11 armhf libshairplay package
ii rbp-mediacenter-osmc 14.1.0 armhf Media Center package for OSMC
ii rbp-remote-osmc 1.0.3 armhf Remote support for OSMC, achieved with lirc and eventlircd
ii rbp-splash-osmc 1.1.2 armhf Splash screen implementation for OSMC using ply-lite
ii rbp-userland-osmc 1.1.17 armhf Raspberry Pi userland package
ii ssh-app-osmc 1.1.3 all SSH server for OSMC with prepopulated configuration
ii sysctl-osmc 1.0.2 all sysctl tweaks for OSMC
ii wireless-firmware-osmc 1.0.5 all Wireless firmware (proprietary) for OSMC

Ok, you have one of the Alpha releases.

Unfortunately this cannot be upgraded to later versions and is no longer supported. Please do a fresh install of the latest release (currently RC3) and you will find that you have iptables support.

You can back up your .kodi directory and restore it to the new version to save setting up your Kodi libraries etc from scratch.

From RC3 you will be able to upgrade to any newer versions without reinstalling, it was only the Alpha releases which cannot be upgraded.

Can I somehow backup everything i installed on my own like seafile, pyload, samba?

There is no automated way, no. Samba (if you mean the samba server) you will probably want to set up again as the configuration files have changed greatly in RC3. The other things you’ve installed outside Kodi you will just need to set up again unfortunately. (Or backup their configuration files)

It’s worth the effort though because you are currently stuck on a system with out of date Kernel and Kodi and will not receive any updates to most of the system packages.

Samba is now installable from the App Store which did not exist in Alpha 4.


Could this be the problem why I cannot setup my Pi to tether the network over an wifi adapter?

Quite possibly.

Not all wireless adaptors support AP mode but at the moment you will have a current version of the OSMC networking GUI but out of date connman and system services behind it, so tethering is unlikely to work.

I believe either the alpha OSMC or connman isn’t supporting my wifi adapter, because I had no issues when I tested it with raspbian and the normal network config.