We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hi guys i want to make a packet queue with this simple code :
from netfilterqueue import NetfilterQueue def print_and_accept(pkt): print(pkt) nfqueue = NetfilterQueue() nfqueue.bind(0, print_and_accept)
but "print_and_accept" is not fire and work ! program doesnt print packet and internet is worked well ! how ? and how can fix it
The text was updated successfully, but these errors were encountered:
You need to accept the packet after you print it and you need to call run on nfqueue.
from netfilterqueue import NetfilterQueue def print_and_accept(pkt): print(pkt) pkt.accept() nfqueue = NetfilterQueue() nfqueue.bind(0, print_and_accept) nfqueue.run()
You also need to insert a rule in to iptables to queue the packets.
sudo iptables -I INPUT 1 -j NFQUEUE --queue-num 0
Remove the rule after with
sudo iptables -D INPUT 1
Sorry, something went wrong.
Reply is correct, closing this since it hasn't seen any activity.
No branches or pull requests
hi guys i want to make a packet queue with this simple code :
but
"print_and_accept" is not fire and work !
program doesnt print packet and internet is worked well !
how ?
and how can fix it
The text was updated successfully, but these errors were encountered: