Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install python-iptable on obuntu #263

Open
mm95 opened this issue Jan 17, 2019 · 3 comments
Open

install python-iptable on obuntu #263

mm95 opened this issue Jan 17, 2019 · 3 comments

Comments

@mm95
Copy link

mm95 commented Jan 17, 2019

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.

@ldx
Copy link
Owner

ldx commented Mar 2, 2019

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

@jllorente
Copy link
Collaborator

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 :)

@mm95
Copy link
Author

mm95 commented May 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants