Comments (10)
I believe you mean iptables v1.4.7
It appears that afinfo is defined as static in 1.4.7 and earlier so the state switching that LDX implemented recently is unhappy.
from python-iptables.
Indeed. The long term solution is to load and keep track of extensions ourselves without libxtables - should not be too difficult, actually we already use a hack to load a module manually if it has been loaded for another protocol family before.
The only gotcha I see here is that extensions use parser routines from libxtables - but if we load all available extensions first to register with us (provide the hooks register_match()
and register_target()
in python-iptables via ctypes), and libxtables after that to provide the parser routines then we should be fine.
from python-iptables.
So as a workaround, would it be possible for it to try to access afinfo and then, if it fails, just load in the correct value when the context switches? If I recall correctly, there's a setter function but no getter.
I really rather not have to use an older version of your library to get my stuff to work :(
from python-iptables.
I'll look into this as soon as I have some free time.
from python-iptables.
@Caligatio thanks for the idea - we just use the setter function now, and the extension name prefixes are hardcoded for the two supported protocols (IPv4, IPv6).
Can you guys check that the current HEAD has fixed this? Works here with iptables 1.4.12.
from python-iptables.
Closing as there has been no feedback for >month. Please feel free to reopen this if the problem still exists.
from python-iptables.
I experienced this same problem just today:
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/init.py", line 10, in
from ip4tc import Table, Chain, Rule, Match, Target, Policy, IPTCError
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/ip4tc.py", line 11, in
from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/xtables.py", line 744, in
class xtables(object):
File "/usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg/iptc/xtables.py", line 757, in xtables
_xtables_afinfo = ct.c_void_p.in_dll(_lib_xtables, "afinfo")
ValueError: /lib/libxtables.so.5: undefined symbol: afinfo
Running version:
python-iptables in /usr/local/lib/python2.7/dist-packages/python_iptables-0.2.0_dev-py2.7-linux-armv7l.egg
And: iptables v1.4.10
Any suggestions? I really didn't want to recompile iptables for this library to work. :/
from python-iptables.
Do you use the latest version of python-iptables from git?
from python-iptables.
I also just experienced this issue this issue:
Used 0.2.0 version of the module
CentOS 6 x64
iptables-1.4.7
I'll give it a shot with the git version as well.
from python-iptables.
Version from git works okay, though #45 causes issues on CentOS.
from python-iptables.
Related Issues (20)
- Does not support custom target HOT 1
- Target already registered when applying rule for both IPv4 and IPv6 for TPROXY HOT 3
- Double free on _Buffer destruction HOT 4
- Segmentation fault when create hashlimit match HOT 3
- iptables and iptables-legacy with Docker containers HOT 2
- Rules added via iptc - not found in iptables o/p HOT 5
- iptc has problem when working with syslog module.
- iptc.errors.XTablesError: can't find target response on iptc.easy.dump_table('filter', ipv6=False) and others
- Can't find target JOOL_SIIT when iptables for both ipv4 and ipv6 are used HOT 1
- A question please, not an issue
- cannot use protocol "all"
- Empty rule list returned on Rocky8 HOT 3
- ldconfig packaged in glibc-2.28 has a different out out than ldconfig in glibc-2.17
- Can I use python-iptables on Python 3.6? HOT 1
- Match_set invalid value b'ipset_name' HOT 8
- How to set match LOCAL HOT 4
- --random parameter not working with SNAT HOT 5
- is nftable not supported?
- can't dump rules
- Is it possible to create '! --dports' rule?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-iptables.