Project

nfqueue

0.01
No commit activity in last 3 years
No release in over 3 years
nfqueue is a tiny wrapper around libnetfilter_queue. It allows you to very simply intercept and modify network traffic in a Ruby environment.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Description of nfqueue

nfqueue is a tiny wrapper around libnetfilter_queue. It allows you to do some packet filtering very simply in a Ruby environment.

For example, plugging on the #0 queue:

require 'nfqueue'

Netfilter::Queue.create(0) do |packet|
  puts "Inspecting packet ##{packet.id}"

  p packet.data
  Netfilter::Packet::ACCEPT
end

Setting up iptables

This is an example for intercepting outgoing HTTP traffic:

iptables -A OUTPUT -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass

Dependencies

You need to have kernel support for NFQUEUE and libnetfilter_queue installed to get it working. nfqueue depends on nfnetlink and ffi (https://github.com/ffi/ffi/wiki/)

Contact

Guillaume Delugré, guillaume at security-labs dot org