How to Solve NameError: name 'NetfilterQueue' is not defined -- netfilterqueue

Solution: Import the 'NetfilterQueue' module

To Solve the error, add the following line to the top of your code.

from netfilterqueue import NetfilterQueue

 

For more information:
Python netfilterqueue NetfilterQueue