Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oneofone/go-nfqueue
Go Wrapper For Creating IPTables NFQueue clients in Go
https://github.com/oneofone/go-nfqueue
Last synced: about 5 hours ago
JSON representation
Go Wrapper For Creating IPTables NFQueue clients in Go
- Host: GitHub
- URL: https://github.com/oneofone/go-nfqueue
- Owner: OneOfOne
- License: apache-2.0
- Created: 2014-04-25T11:32:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-04-28T21:04:05.000Z (over 10 years ago)
- Last Synced: 2024-06-20T00:44:58.305Z (5 months ago)
- Language: Go
- Homepage: http://www.limitlessfx.com
- Size: 164 KB
- Stars: 29
- Watchers: 2
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Go-NFQueue
==========
Go Wrapper For Creating IPTables' NFQueue clients in GoUsage
------
Check the `examples/main.go` file```bash
cd $GOPATH/github.com/OneOfOne/go-nfqueue/examples
go build -race && sudo ./examples
```
* Open another terminal :
```bash
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````bash
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.](http://www.limitlessfx.com/)
See the included `LICENSE` file.> Copyright (c) 2014 Ahmed W.