I was unable to access my router from the public network or outside my home network. Since I often have to go out and access my network, I wanted to able to able to access my router too. Port 80 was blocked by my ISP so even though i know public ip of my router was unable to access the page.
So I figured out there is a way to forward packets to another machine. for that you have to use iptables, however it may have some glitches, I have not used this.
While searching for this I came across a tcp proxy command as follows
socat tcp-listen:8083,fork tcp:192.168.18.1:80
also
socat TCP-LISTEN:8080,fork,reuseaddr TCP:google.com:443
Code language: CSS (css)
fork keyword means it can create new thread if there are multiple clients. so I ran this command on raspberry pi which would forward all my traffice on its port 8083 to router page.
This worked on chrome browser but firefox was caught up in some kind of a loop.
References
- https://stackoverflow.com/questions/34791674/socat-port-forwarding-for-https
- https://unix.stackexchange.com/questions/57721/how-to-forward-a-port-from-one-machine-to-another