question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NetfilterQueue run_socket error

See original GitHub issue

I’m running NetfilterQueue git version because I couldn’t get pip to install it but that shouldn’t matter I think. LOG:

##$ sudo python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{IP:len:replace:64},)-|" --log debug

2020-01-25 04:13:35 DEBUG:[ENGINE] Engine created with strategy [TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-| \/ (ID xlez5tdl) to port 80
2020-01-25 04:13:35 DEBUG:[ENGINE] Configuring iptables rules
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A OUTPUT -p tcp --dport 80 -j NFQUEUE --queue-num 1
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A INPUT -p tcp --sport 80 -j NFQUEUE --queue-num 2
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A OUTPUT -p udp --dport 80 -j NFQUEUE --queue-num 1
2020-01-25 04:13:35 DEBUG:[ENGINE] iptables -A INPUT -p udp --sport 80 -j NFQUEUE --queue-num 2
2020-01-25 04:13:36 DEBUG:[ENGINE] NFQueue Initialized after 0
2020-01-25 04:13:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=in)
Traceback (most recent call last):
  File "engine.py", line 115, in run_nfqueue
    nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
2020-01-25 04:13:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=out)
Traceback (most recent call last):
  File "engine.py", line 115, in run_nfqueue
    nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error ``` 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
2xyocommented, Feb 17, 2020

@zayn1991 could you try:

$ pip3 install --upgrade pip 
$ pip3 install --upgrade git+https://github.com/kti/python-netfilterqueue
0reactions
FireMasterKcommented, Aug 18, 2020

I’m getting the same error in Ubuntu 20.04 unfortunately. Any idea on what I can do?

ubuntu@instance-20200501-0913:~/geneva$ sudo python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{IP:len:replace:64},)-|" --log debug
2020-08-18 21:38:36 WARNING:[ENGINE] No environment ID given, one has been generated (2mn7qqlc)
2020-08-18 21:38:36 DEBUG:[ENGINE] Engine created with strategy [TCP:flags:PA]-duplicate(tamper{IP:len:replace:64},)-| \/ (ID 2mn7qqlc) to port 80
2020-08-18 21:38:36 DEBUG:[ENGINE] Configuring iptables rules
2020-08-18 21:38:36 DEBUG:[ENGINE] iptables -A OUTPUT -p tcp --dport 80 -j NFQUEUE --queue-num 2
2020-08-18 21:38:36 DEBUG:[ENGINE] iptables -A INPUT -p tcp --sport 80 -j NFQUEUE --queue-num 1
2020-08-18 21:38:36 DEBUG:[ENGINE] iptables -A OUTPUT -p udp --dport 80 -j NFQUEUE --queue-num 2
2020-08-18 21:38:36 DEBUG:[ENGINE] iptables -A INPUT -p udp --sport 80 -j NFQUEUE --queue-num 1
2020-08-18 21:38:36 DEBUG:[ENGINE] NFQueue Initialized after 0
2020-08-18 21:38:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=in)
Traceback (most recent call last):
  File "engine.py", line 197, in run_nfqueue
    nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
2020-08-18 21:38:37 ERROR:[ENGINE] Exception out of run_nfqueue() (direction=out)
Traceback (most recent call last):
  File "engine.py", line 197, in run_nfqueue
    nfqueue.run_socket(nfqueue_socket)
SystemError: <method 'run_socket' of 'netfilterqueue.NetfilterQueue' objects> returned NULL without setting an error
Read more comments on GitHub >

github_iconTop Results From Across the Web

netfilterqueue problem when I start code? - Stack Overflow
I tried to write INPUT and OUTPUT instead FORWARD; and change --queue-num 1,2,3... When I write python3 net_cut.py nothing happens and then ...
Read more >
Python bindings for libnetfilter_queue - NetfilterQueue - GitHub
Number of packets dropped due to netlink socket failure; Total number of packets sent to queue; Something for libnetfilter_queue's internal use. Limitations. We ......
Read more >
netfilterqueue installation error too many argument solved
netfilterqueue not installing?? watch these 3 actually to methods to solve this.
Read more >
Netfilterqueue Program error while installing!!!!! - YouTube
Hello guys in this video we are going to solve the netfilterqueue programm common error while installing..........See this video and enjoy ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found