JavaScript error: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' http: https: data: blob: 'unsafe-inline'". (https://git.lalonde.me/assets/js/index.js?v=1.18.3 @ 19:71758). Open browser console to see more details.
brl 2d8afe1d60
Initial commit
10 years ago
..
LICENSE Initial commit 10 years ago
README.md Initial commit 10 years ago
multiqueue.go Initial commit 10 years ago
nfqueue.c Initial commit 10 years ago
nfqueue.go Initial commit 10 years ago
nfqueue.h Initial commit 10 years ago
packet.go Initial commit 10 years ago

README.md

Go-NFQueue

Go Wrapper For Creating IPTables' NFQueue clients in Go

Usage

Check the examples/main.go file

	cd $GOPATH/github.com/OneOfOne/go-nfqueue/examples
	go build -race && sudo ./examples
  • Open another terminal :
sudo iptables -I INPUT 1 -m conntrack --ctstate NEW -j NFQUEUE --queue-num 0
#or
sudo iptables -I INPUT -i eth0 -m conntrack --ctstate NEW -j NFQUEUE --queue-num 0
curl --head localhost
ping localhost
sudo iptables -D INPUT -m conntrack --ctstate NEW -j NFQUEUE --queue-num 0

Then you can ctrl+c the program to exit.

  • If you have recent enough iptables/nfqueue you could also use a balanced (multithreaded queue).
  • check the example in examples/mq/multiqueue.go
iptables -I INPUT 1  -m conntrack --ctstate NEW -j NFQUEUE --queue-balance 0:5 --queue-cpu-fanout

Notes

You must run the executable as root. This is WIP, but all patches are welcome.

License

go-nfqueue is under the Apache v2 license, check the included license file. Copyright © Ahmed W. See the included LICENSE file.

Copyright (c) 2014 Ahmed W.