-
Notifications
You must be signed in to change notification settings - Fork 118
Guide: transparent proxy
JonDoNym edited this page Dec 13, 2015
·
5 revisions
-
VM router:
- eth0: NAT, DHCP (internet)
- eth1: fix IP (gateway for pc1)
-
VM pc1:
- eth0
install peinjector on vm "router": https://github.com/JonDoNym/peinjector/wiki/Guide:-full-installation
test the basic installation (config the proxy your browser; set shellcode; infect a pe-file)
config the transparent mode: /etc/peinjector-interceptor/config.ini
mode = transparent
service peinjector-interceptor stop
service peinjector-interceptor start
sysctl -w net.ipv4.ip_forward=1 # this is NOT persistent !
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080 # use the "gateway for pc1" interface
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 8080 # use the "gateway for pc1" interface
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # use the "internet" interface
pc1 use eth1 from router as gateway!
now it works!