ssh -L 8080:192.168.1.180:8585 made4it@186.193.0.42
If you need to access a customer's CPE but can't because the CPE is accessible only on the customer's network, use the following command to create a tunnel, where it will be possible to access the CPE through the customer's network.
ssh -L 8080:100.64.1.19:8585 made4it@192.168.162.201
ssh: is the service that makes the connection
-L: it is an option that specifies that TCP connections for a certain port on the local host are forwarded to a remote host and port, thus allowing the connection to be redirected through this tunnel.
let's separate what comes after -L to be more clear...
8080: Local Port, which can be accessed in the browser via the link http://localhost:8080/
100.64.1.19:8585 : Remote host and port “this here is the CPE address”
Note: note that the address above is a CGNAT address, change it to the address given to you.
made4it@192.168.162.201 this here is the server where the client's network is located, that is, it is through this server that we will redirect our request and access the CPE
After that, just go to http://localhost:8080/ and access the desired CPE.
Did you have any questions <https://man.openbsd.org/ssh> or in the # man ssh terminal
Until next time!!