GithubHelp home page GithubHelp logo

Comments (4)

ldx avatar ldx commented on June 18, 2024

Do you mean Debian Sid (unstable)? I also use Sid, on my system:

% l /proc/sys/kernel/modprobe
-rw-r--r-- 1 root root 0 ápr   26 19:25 /proc/sys/kernel/modprobe

from python-iptables.

ldx avatar ldx commented on June 18, 2024

No feedback, assuming this has been solved. Feel free to reopen if that's not the case.

from python-iptables.

skrzyp avatar skrzyp commented on June 18, 2024

I have the same issue.
That error is thrown when I'm using custom kernel with bulit-in netfilter on Gentoo, so you need to provide other method for checking netfilter/iptables existence on running system.
IPython backtrace:

In [5]: import iptc
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-5-49a367781e85> in <module>()
----> 1 import iptc

/usr/lib64/python2.7/site-packages/iptc/__init__.py in <module>()
      8 """
      9 
---> 10 from iptc.ip4tc import (is_table_available, Table, Chain, Rule, Match, Target,
     11                    Policy, IPTCError)
     12 from iptc.ip6tc import is_table6_available, Table6, Rule6

/usr/lib64/python2.7/site-packages/iptc/ip4tc.py in <module>()
     16 __all__ = ["Table", "Chain", "Rule", "Match", "Target", "Policy", "IPTCError"]
     17 
---> 18 load_kernel("ip_tables")
     19 
     20 _IFNAMSIZ = 16

/usr/lib64/python2.7/site-packages/iptc/util.pyc in load_kernel(name, exc_if_failed)
     30 # Load a kernel module. If it is already loaded modprobe will just return 0.
     31 def load_kernel(name, exc_if_failed=False):
---> 32     rc, err = _load_ko(name)
     33     if rc:
     34         if not err:

/usr/lib64/python2.7/site-packages/iptc/util.pyc in _load_ko(modname)
     21 def _load_ko(modname):
     22     # this will return the full path for the modprobe binary
---> 23     proc = open("/proc/sys/kernel/modprobe")
     24     modprobe = proc.read(1024)
     25     if modprobe[-1] == '\n':

IOError: [Errno 2] No such file or directory: '/proc/sys/kernel/modprobe'

from python-iptables.

ldx avatar ldx commented on June 18, 2024

@skrzyp I pushed a fix, can you confirm that this resolves your problem?

from python-iptables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.