Skip to content

Commit

Permalink
more text in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Jun 8, 2019
1 parent 4503d7e commit 2ca8c31
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ Usage: tcpprism [arguments]
-h, --help Show this help
```

Eg.:

```
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.

```sh
ulimit -n 16384
tcpprism --listen 0.0.0.0:80 --forward 127.0.0.1:8080 --mirror 10.0.0.2:8080
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

1. Fork it (<https://github.com/84codes/tcpprism/fork>)
Expand Down

0 comments on commit 2ca8c31

Please sign in to comment.