Hi. I'm setting up the architecture below. Essentially my goal is to do mitm between my iot device and its server.
iot device <--> ethernet to usb conv(eth1) <--> laptop(eth0, bridge between eth1 and eth0)<--> internet
- At first I'm setting up the rules below with iptables
iptables -t nat -I PREROUTING -p tcp --sport 80 -j REDIRECT --to-ports 8080
iptables -t nat -I PREROUTING -p tcp --sport 443 -j REDIRECT --to-ports 8080
iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -I OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 8080
-Then I'm plugging in an 'ethernet to usb' converter between my pc and iot device. Setting up the bridge between my lan adapter and external usb lan adapter.
And iot device has internet when I sniff with wireshark over external adapter eth1. With the rules I set I'm able to do mitm from my browser etc. but i can not proxy the packets that comes from/to the external adapter. What am I missing?
No comments:
Post a Comment