Creare un proxy utilizzando un tunnel SSH per bypassare il firewall aziendale Create a proxy using an SSH tunnel to bypass the corporate firewall

In questo articolo vi verrà spiegato come creare un proxy sock utilizzando il servizio SSH. In this article we will explain how to create a sock proxy using SSH service.
La creazione di questo tipo di proxy comporta due vantaggi: The creation of this type of proxy has two advantages:
1 – ogni comunicazione attraverso il proxy viene criptata (essendo SSH un protocollo sicuro) 1 - all communication through the proxy is encrypted (SSH as a secure protocol)
2 – utilizzando il proxy si scavalcano le restrizioni imposte dai firewall aziendali 2 - using the proxy bypass restrictions imposed by corporate firewalls
Ecco lo schema sintetico di cosa andremo a fare con il tunnel / proxy SSH Here's the brief outline of what we're going to do with the tunnel / proxy SSH

I prerequisiti per creare questo tipo di proxy sono 2 The prerequisites for creating this kind of proxy 2
1 – dovete avere la porta 22 aperta in uscita verso internet 1 - you must have port 22 open outbound Internet
2 – dovete avere accesso SSH ad una macchina esterna. 2 - you must have SSH access to a car outside. E' sufficiente ad esempio avere un sito web che permette l'accesso via SSH And 'just for example have a website that allows access via SSH
Procediamo. Proceed.
Windows di suo non ha un client ssh, dobbiamo quindi scaricare un programma per stabilire una connessione SSH. Its not a Windows ssh client, so we have to download a program to establish an SSH connection.
Putty è il programma che fa al caso nostro: è opensource e gratuito. Putty is a program that fits our case is open source and free. (si scarica da qui ) (Download it from here )
Lanciamo Putty e nella schermata iniziale inseriamo l'indirizzo IP della macchina sui cui gira il server SSH Launch Putty and screen enter the IP address of the machine running the SSH server

Ora seguendo le indicazioni in figura sotto Now follow the directions in figure
1 – selezionate SSH 1 - select SSH
2 – selezionate Tunnels 2 - select Tunnels
3 – selezionate Auto 3 - Choose Car
4 – selezionate Dynamic 4 - select Dynamic
5 – scegliete la porta (tra 3000 e 65000) 5 - choose the port (between 3000 and 65000)
6 – premete Add 6 - Press Add

Finalmente potete aprire la connessione premendo Open Now you can open the connection by pressing Open
Inserite le credenziali di accesso a SSH (login/pass) e lasciate Putty aperto Enter the credentials for access to SSH (login / pass) and left open Putty
Ora dovrete configurare il vostro browser (o qualsiasi altro programma: msn, skype, utorrent etc etc) per utilizzare il proxy appena creato. Now, you must configure your browser (or any other program, msn, skype, utorrent etc etc) to use the proxy you just created.
Prendiamo ad esempio la configurazione di Firefox Take for example the configuration of Firefox
Andate sul menu Strumenti –> Opzioni… Go to Tools -> Options ...
e selezionate il tab Avanzate. and select the Advanced tab. Ora premete su Impostazioni.. Now click on Settings ..

Inserite qui i dati del proxy appena creato con la porta che avete scelto (nel mio caso la porta è la 1080) Enter the data just created the proxy with the port that you chose (in my case the port is 1080)

Date OK e provate a navigare. Date OK and try to navigate.
Se tutto funziona a dovere il vostro IP dovrebbe essere quello della macchina dove risiede il server SSH. If everything is working properly your IP should be the machine where SSH server.
Se volete fare il tutto in modo più veloce basterà installare sulla vostra macchina CygWin e digitare nel terminale il seguente comando: If you want to do everything faster on your machine just install Cygwin in the terminal and type the following command:
ssh -D 8182 utente@server ssh-D 8182 user @ server
Dove utente è il vostro login e server è l'indirizzo ip della macchina dove risiede il server SSH Where user is your login and server is the IP address of the machine where SSH server
ARTICOLI CORRELATI RELATED ARTICLES
10 commenti a “Creare un proxy utilizzando un tunnel SSH per bypassare il firewall aziendale” 10 comments to "Create a proxy using an SSH tunnel to bypass the corporate firewall"
Mi sfugge qualcosa, se il pc client si trova dietro un firewall aziendale e quindi si presuppone che se è un firewall serio la porta 22 sia chiusa e apribile solo dall'amministratore di rete, come fa l'user a rendere ad utilizzare questa guida???? I miss something, if the client computer is behind a corporate firewall, and then assumes that if a firewall is serious port 22 is closed and opened only by the network, as the user to make use this guide? ??
Infatti, come ho scritto, un prerequisito è che la porta 22 IN USCITA deve essere aperta e in molte realtà aziendali spesso lo è. As I wrote, a prerequisite is that the OUT port 22 must be open and many companies often is. Potresti comunque far girare il server SSH sulla porta 80 (HTTP) o 443 (HTTPS) che di sicuro sono aperte. You still run the SSH server on port 80 (HTTP) or 443 (HTTPS) that are open for sure.
ma su un firewall aziendale serio le porte 80 e 443 sono si aperte ma anche quelle più sottoposte a, come dire, controllo, un amministratore, se tale, capirebbe facilmente l'inghippo. but on a serious corporate firewall ports 80 and 443 are open but are also those most subject to, like, control, an administrator, if such can easily understand the catch.
Certo… ma ricorda che essendo in un tunnel SSH tutto il traffico è criptato Sure ... but remember that being in an SSH tunnel all traffic is encrypted
io penso che il problema non è decriptare il traffico ma proprio che su quelle porte (almeno la 80) ci Sia del traffico criptato. I think the problem is not decrypt the traffic on that port but just that (at least 80) there is the traffic encrypted.
bello bello… mi piace… ma… domanda… volendo installare su un pc di casa un server ssh… cosa consiglieresti? so handsome ... I like ... but ... question ... wanting to install on a PC at home ssh server ... what you recommend?
googlando rapido ho visto FreeSSHd … ma non l' ho ancora provato… lunedì @ work mi sa che faccio due prove… FreeSSHd quick google I saw ... but I didn 't yet tried Monday @ work ... I know I do two tests ...
sono stufo del lento refresh del vnc per vedere le pagine che quello stupido sonicwall si inventa di categorizzarmi come non consentite!!! I'm tired of the slow refresh vnc to see the pages that stupid SonicWALL is invented to categorize as not allowed!^_^ ^ _ ^
[...] Mambro: Interessante guida per Bypassare il Firewall aziendale utile a crearsi un proxy utilizzando un tunnell SSH. [...] Mambro: Interesting guide to bypass the corporate firewall to create a useful proxy using an SSH tunnels. Continua a leggere… [...] Continue reading ... [...]
Salve. Hello. Vorrei sapere… è possibile attuare questo procedimento, invertendo server e client ssh? Let me know ... you can implement this procedure, reversing the server and ssh client? Cioè, il pc che fa da proxy che sia il client, e quello che deve navigare su internet sia il server. That is, the computer that acts as a proxy that both the client and what needs to surf the Internet and the server. Si potrebbe per esempio, in putty ssh tunnel, invece di porta remota, cliccare sulla voce “local”. It could, for example, putty ssh tunnel instead of the remote port, click on "local". Funzionerebbe? Work?
ciao !! hello! ti ringrazio molto !! Thank you much!
Ti sarei ulteriormente grato se mi spiegassi come settare il programma “jdownloader” perchè con firefox ho capito e funziona, l'ip è quello della macchina in remoto, ma con jdownloader non capisco bene come settarlo, I would be grateful if you further explain to me how to set the "JDownloader" I understand why with firefox and it works, what is the ip of the machine remotely, but do not quite understand how to set it JDownloader,ancora grazie !! thanks again!
Nicola Nicola
Se vi serve per far passare skype dovete toccare anche le iptables: http://robotics.rtfmnet.com/?p=38 If you need to pass you even touch the iptables skype: http://robotics.rtfmnet.com/?p=38
E' un articolo in inglese, abbastanza tecnico, ma per i volenterosi non dovrebbe essere un problema. It 'an article in English, quite technical, but for those willing should not be a problem.
Soprattutto, funziona. It works.







Ultimi commenti Last comments