Howto Connect To Device On Internal Network
Classic scenario - we want to access a Wi-Fi access point from an outside network, but an AP has only a internal IP address. How to handle this?
We’ll use the same principle as reverse SSH tunnel, but we won’t access a service running on loopback device on the server, but use a server to map port from a device on an internal network to our computer.
ssh -L 4003:10.0.0.173:443 firstname.lastname@example.org
The command creates a SSH tunnel through example.org using username me and maps remote port 443 port (HTTPS) on device 10.0.0.173 to local port 4003 on our computer. We’ll see a shell on the example.org, keep it open to keep the tunnel open.
Then we open up a web browser and type:
and we’ll see a login page of Wi-Fi access point.
Works for any port, MySQL, Postgres, anything. Not sure if it’s possible to map multiple ports in one command.