Replies: 2 comments 1 reply
-
|
172.25.143.177 is the inet of the Linux |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It looks like the Linux box is NATing the traffic? In the transparent proxy section, it would be the wrong redirection then |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Mitmproxy works well in regular and socks5 mode, but reports 'connection refused' in transparent mode. Wondering if there is something wrong with the iptables setting.
Andorid Shell:
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to X.XXX.XXX.XX:80
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to X.XXX.XXX.XX:443
Linux:
sudo iptables -t nat -F
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv4.conf.all.send_redirects=0
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
sudo ip6tables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo ip6tables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
the command is :
mitmdump --mode transparent --set block_global=false --showhost
the bug report is:
Proxy server listening at http://*:8080
27.47.8.226:10434: clientconnect
27.47.8.226:10434: Server connection to ('172.25.143.177', 443) failed: Error connecting to "172.25.143.177": [Errno 111] Connection refused
27.47.8.226:10434: clientdisconnect
27.47.8.226:10435: clientconnect
27.47.8.226:10435: Server connection to ('172.25.143.177', 443) failed: Error connecting to "172.25.143.177": [Errno 111] Connection refused
27.47.8.226:10435: clientdisconnect
27.47.8.226:10436: clientconnect
27.47.8.226:10438: clientconnect
27.47.8.226:10439: clientconnect
27.47.8.226:10437: clientconnect
27.47.8.226:10439: Server connection to ('172.25.143.177', 443) failed: Error connecting to "172.25.143.177": [Errno 111] Connection refused
27.47.8.226:10439: clientdisconnect
27.47.8.226:10438: Server connection to ('172.25.143.177', 443) failed: Error connecting to "172.25.143.177": [Errno 111] Connection refused
Beta Was this translation helpful? Give feedback.
All reactions