tcpprism v0.1.0
TCPPrism
Mirrors TCP traffic between a client
and a forward
host, but also sends the same traffic to a mirror
host. The response from the mirror
is thrown away.
Installation
From source:
git clone https://github.com/84codes/tcpprism.git
cd tcpprism
shards build --release --production
install bin/tcpprism /usr/local/bin/
Or download precompiled binaries.
Usage
Usage: tcpprism [arguments]
-l, --listen=ADDR Address and port to listen on (required)
-f, --forward=ADDR Address and port to forward traffic to (required)
-m, --mirror=ADDR Address and port to mirror traffic to (required)
-h, --help Show this help
If you for example would like to mirror the traffic currently coming in to a server on port 80, to another server also running on port 80, but without stopping and changing port of the original server, you can use trick with iptables that redirects port 80 to the tcpprism
server, which in turn will forward the traffic to both the original server and the server on the other host.
ulimit -n 16384
iptables -t nat -A PREROUTING -i ens5 -p tcp --dport 80 -j REDIRECT --to-port 8080
tcpprism --listen 0.0.0.0:8080 --forward 127.0.0.1:80 --mirror 10.0.0.2:80
Contributing
- Fork it (https://github.com/84codes/tcpprism/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Carl Hörberg - creator and maintainer
Repository
tcpprism
Owner
Statistic
- 8
- 1
- 1
- 0
- 0
- about 1 month ago
- June 8, 2019
License
MIT License
Links
Synced at
Fri, 22 Nov 2024 05:30:34 GMT
Languages