python-iptables icon indicating copy to clipboard operation
python-iptables copied to clipboard

install python-iptable on obuntu

Open mm95 opened this issue 6 years ago • 3 comments

Hi everybody,

I installed python-iptables, according the below instructions :

% git clone git://git.netfilter.org/iptables && cd iptables % ./autogen.sh % ./configure --prefix=/tmp/iptables % make % make install

All the obove commands were runned successfully, but when I ran the below test, I received the error message : sudo IPTABLES_LIBDIR=/tmp/iptables/lib XTABLES_LIBDIR=/tmp/iptables/lib/xtables python

Python 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import iptc Traceback (most recent call last): File "", line 1, in ImportError: No module named iptc

Thanks.

mm95 avatar Jan 17 '19 07:01 mm95

This only installs iptables. You should install python-iptables separately, according to the README.

ldx avatar Mar 02 '19 00:03 ldx

Hi @mm95 , did you solve your installation issue? If you are using Ubuntu, chances are that iptables is already installed in your system. Can you provide the output of the following command?

$ sudo iptables -v
iptables v1.6.0: no command specified
Try `iptables -h' or 'iptables --help' for more information.

As far as installing python-iptables (the library of this repository), you can do it by simply running:

$ sudo pip install --upgrade python-iptables

The documentation only says that if you want to run a different version of iptables than the provided one, you could install it with those commands you mentioned, but again, the Ubuntu built-in should be sufficient :)

jllorente avatar May 19 '19 20:05 jllorente

Hi @jllorente and @ldx yes, my problems were solved after some research and try. Thank you for your attention.

mm95 avatar May 20 '19 05:05 mm95