mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:15 +02:00
update sslsplit
This commit is contained in:
parent
fa6197faf6
commit
ea31d4db73
@ -10,8 +10,8 @@ network connections.
|
||||
sslsplit:
|
||||
image: vimagick/sslsplit
|
||||
command:
|
||||
-k key/ca.key -c key/ca.crt -P
|
||||
-l log/cnn.log -S log
|
||||
-k keys/ca.key -c keys/ca.crt -P
|
||||
-l logs/connections.log -S logs
|
||||
tcp 0.0.0.0 8080
|
||||
ssl 0.0.0.0 8443
|
||||
net: host
|
||||
@ -21,21 +21,37 @@ sslsplit:
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## up and running
|
||||
## Server Setup
|
||||
|
||||
```bash
|
||||
$ mkdir -p data/{key,log}
|
||||
$ openssl req -x509 -newkey rsa:2048 -nodes -keyout data/key/ca.key -out data/key/ca.crt -days 365 -subj '/CN=EasyPi'
|
||||
$ openssl req -x509 -newkey rsa:2048 -nodes -keyout data/key/ca.key -out data/key/ca.crt -days 3650 -subj '/CN=EasyPi'
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
```
|
||||
```bash
|
||||
# setup
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
iptables -t nat -F
|
||||
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
|
||||
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
|
||||
iptables -t nat -N SSLSPLIT
|
||||
iptables -t nat -A SSLSPLIT -p tcp --dport 80 -j REDIRECT --to-ports 8080
|
||||
iptables -t nat -A SSLSPLIT -p tcp --dport 443 -j REDIRECT --to-ports 8443
|
||||
|
||||
# enable
|
||||
iptables -t nat -A PREROUTING -j SSLSPLIT
|
||||
|
||||
# disable
|
||||
iptables -t nat -D PREROUTING -j SSLSPLIT
|
||||
```
|
||||
|
||||
## Client Setup
|
||||
|
||||
```bash
|
||||
sudo route change default 192.168.31.231
|
||||
curl -k https://www.baidu.com/s?wd=hello+world
|
||||
```
|
||||
|
||||
> ProTip: No warning dialog after importing `ca.crt` into system/browser.
|
||||
|
||||
## read more
|
||||
|
||||
- <https://blog.heckel.xyz/2013/08/04/use-sslsplit-to-transparently-sniff-tls-ssl-connections/>
|
||||
|
@ -1,8 +1,8 @@
|
||||
sslsplit:
|
||||
image: easypi/sslsplit-arm
|
||||
command:
|
||||
-k key/ca.key -c key/ca.crt -P
|
||||
-l log/cnn.log -S log
|
||||
-k keys/ca.key -c keys/ca.crt -P
|
||||
-l logs/connections.log -S logs
|
||||
tcp 0.0.0.0 8080
|
||||
ssl 0.0.0.0 8443
|
||||
net: host
|
||||
|
@ -1,8 +1,8 @@
|
||||
sslsplit:
|
||||
image: vimagick/sslsplit
|
||||
command:
|
||||
-k key/ca.key -c key/ca.crt -P
|
||||
-l log/cnn.log -S log
|
||||
-k keys/ca.key -c keys/ca.crt -P
|
||||
-l logs/connections.log -S logs
|
||||
tcp 0.0.0.0 8080
|
||||
ssl 0.0.0.0 8443
|
||||
net: host
|
||||
|
Loading…
Reference in New Issue
Block a user