I am learning nftables and the goal is to filter packets based on ip and port destination. They have to be enqueued to userspace where my script will change the payload field and send out the packet to destination.
The following rule enqueue packet:
% nft add filter input counter queue
I tried to add ip and port but command returns syntax error (unexpected daddr):
% nft add filter input udp daddr 192.168.1.111 dport 10100 counter queue
Next step is to connect a script to the queue to process packets. I installed libnetfilter-queue-dev but not clear how to use it.