I’m having a look at the config in the docs, but am wondering if this will work in my setup.
CLIENT_NET=192.168.1.0/24 TABLE_ID=100 MARK=1 echo "$TABLE_ID mitmproxy" >> /etc/iproute2/rt_tables iptables -t mangle -A PREROUTING -d $CLIENT_NET -j MARK --set-mark $MARK iptables -t nat \ -A PREROUTING -p tcp -s $CLIENT_NET \ --match multiport --dports 80,443 -j \ REDIRECT --to-port 8080 ip rule add fwmark $MARK lookup $TABLE_ID ip route add local $CLIENT_NET dev lo table $TABLE_ID
Mitmproxy is running on my custom configured router.
The router has 2 NICs.
Internet facing NIC has the address: 192.168.178.40
The gateway NIC (that the client connects to) has address: 10.0.0.1
The client address is 10.0.0.12
I’m having a hard time understanding the config so maybe someone can explain it to me?
Or maybe someone has been in a similar situation?