Ciao,
capita alle volte che sia necessario fare un accesso ad un software (es. RDP) da una rete dove non sia disponibile l’apertura di rete alla porta necessaria.
Un modo veloce per risolvere è quello di usare in socks o un tunneling usando una porta che sia disponibile.
A seguito un esempio di server SOCKS usando ssh:
ssh -D 1080 user@<IP Address or Domain of your Server>
Al prompt, definite la password per l’utente indicato e ..fino a quando la finestra resta aperta, avremo disponibile un server SOCKS operativo su localhost:1080.
Se invece volessimo fare un tunneling su una sola porta, basterà usare sempre ssh nel seguente modo:
ssh -L [localhost:]3389:remote.desktop.host:3389 ssh.server.reacheable
fino a quando la finestra resterà aperta, basterà fare un RDP su localhost per essere mandati via tunneling ssh verso ssh.server.reacheable per poi finire su remote.desktop.host
Ulteriori switch che potrebbero essere utili:
-C: compress data in the tunnel, save bandwidth
-q: quiet mode, don’t output anything locally
-N: do not execute remote commands, useful for just forwarding ports
-f: to fork it to a background command