{"id":868,"date":"2008-12-11T02:26:21","date_gmt":"2008-12-10T20:26:21","guid":{"rendered":"http:\/\/www.dotcomunderground.com\/blogs\/?p=868"},"modified":"2020-12-21T20:54:18","modified_gmt":"2020-12-21T14:54:18","slug":"putty-ssh-tunnel-to-hide-ip","status":"publish","type":"post","link":"https:\/\/www.dotcomunderground.com\/blogs\/2008\/12\/11\/putty-ssh-tunnel-to-hide-ip\/","title":{"rendered":"Using SSH Tunnel with PuTTY to browse internet hiding your IP address"},"content":{"rendered":"<p>If you have access to SSH on a remote server (dedicated server, vps or shell account), you can browse the internet over the IP address hiding your original IP address.<\/p>\n<p>This can be useful for many scenarios like &#8211;<\/p>\n<p><strong>IP based authentication over dynamic IP<\/strong>:<br \/>\nIn many cases for security reasons we use restrict access only to some selected IP addresses. For example, admin area of a blog, forum, billing system or help desk can be protected with IP based authentication.<br \/>\nBut what if you are on dynamic IP? You can allow your users (or yourself) first to ssh to a server with static ip and then access your restricted web app over the ssh tunnel. Your restricted web app will get the remote server IP as the user IP.<\/p>\n<p><strong>Technical limitations related to shared\/dynamic IP<\/strong>:<br \/>\nIn many places (specially in Bangladesh) ISPs provide the clients only with dynamic or shared IP address. In some places access are limited by number of access per IP address.<br \/>\nFor example, download services like RapidShare will not allow you to download a file when someone else is downloading a file over your shared IP. You can easily bypass such limits using this SSH Tunneling.<br \/>\nJust last night I had to use ssh tunneling to create a couple of Live IDs (passport.net) as Micro$oft was not allowing to create any from my local ISP IP :S<\/p>\n<p><strong>Being a cool geek<\/strong>:<br \/>\nOr you can use it just to surprise your friends (who actaully checks for your ip =P) by showing your domain on you email and forum posts ;)<\/p>\n<p>Anyways&#8230; enough of possible &#8220;usage&#8221;. If you are reading this, I bet you already &#8220;need it&#8221; =P<\/p>\n<p>Now to get straight into the tutorial.<\/p>\n<p>What you need?<br \/>\n1. PuTTY SSH Client. (Can be downloaded from <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\">here<\/a>.)<br \/>\n2. Firefox Web Browser. (Can be downloaded from <a href=\"http:\/\/www.mozilla.com\/firefox\/\">here<\/a>.)<br \/>\n3. SSH access to a unix\/linux server. (Now thats something I can&#8217;t give you ;) )<\/p>\n<p>Now, first run PuTTY. You should be on the &#8220;<strong>PuTTY Configuration<\/strong>&#8221; window. On the &#8220;<strong>Host Name (or IP address)<\/strong>&#8221; field, type the hostname or IP address of your remote server. And select &#8220;<strong>Connection type<\/strong>&#8221; as &#8220;<strong>SSH<\/strong>&#8220;. The port should get automatically selected to 22.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-874\" title=\"PuTTY - Remote Server Hostname\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-remote-server-hostname1.jpg\" alt=\"PuTTY - Remote Server Hostname\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-remote-server-hostname1.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-remote-server-hostname1-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>Then, in the left-hand menu, click on &#8220;<strong>SSH<\/strong>&#8220;. In &#8220;<strong>Protocol options<\/strong>&#8220;, tick &#8220;<strong>enable compression<\/strong>&#8221; and set your preferred SSH version to &#8220;<strong>2<\/strong>&#8220;.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-870\" title=\"PuTTY SSH Connection Option\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-connection-option.jpg\" alt=\"PuTTY SSH Connection Option\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-connection-option.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-connection-option-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>Now expand the &#8220;<strong>SSH<\/strong>&#8221; menu and select the &#8220;<strong>Tunnels<\/strong>&#8221; sub-menu.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-871\" title=\"PuTTY - Tunnels Menu\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-tunnels-menu.jpg\" alt=\"PuTTY - Tunnels Menu\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-tunnels-menu.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-tunnels-menu-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>Now under the &#8220;<strong>Tunnels<\/strong>&#8221; menu (Options controlling SSH port forwarding), in the &#8220;Source port&#8221; field, type in a source port. Here I am using <strong>4567<\/strong>. But you can use anything. Then select &#8220;D<strong>ynami<\/strong>c&#8221; as &#8220;<strong>Destination<\/strong>&#8221; and click the &#8220;<strong>Add<\/strong>&#8221; button.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-872\" title=\"PuTTY - Port Forwarding\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-port-forwarding.jpg\" alt=\"PuTTY - Port Forwarding\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-port-forwarding.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-port-forwarding-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>After clicking the &#8220;Add&#8221; button the newly added forwarded port should get listed under &#8220;<strong>Forwarded ports<\/strong>&#8221; list.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873\" title=\"PuTTY SSH Tunnel - Port Forwarding\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-tunnel-port-forwarding.jpg\" alt=\"PuTTY SSH Tunnel - Port Forwarding\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-tunnel-port-forwarding.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-ssh-tunnel-port-forwarding-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>Now, go back to the &#8220;<strong>Session<\/strong>&#8221; tab at the top of the menu, give the new connection a name (here i used My SSH Proxy) and click on the &#8220;<strong>Save<\/strong>&#8221; button.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-875\" title=\"PuTTY - My SSL Proxy\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-my-ssh-proxy.jpg\" alt=\"PuTTY - My SSL Proxy\" width=\"491\" height=\"471\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-my-ssh-proxy.jpg 491w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/putty-my-ssh-proxy-300x287.jpg 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<p>Congrats! we are done with the PuTTY configuration.<\/p>\n<p>From now on you can use this connection to login to your server. After login, you winn be able to use the connection as SSH Tunnel.<\/p>\n<p>But before starting to browse internet using the IP address of the server, we need to configure firefox settings.<\/p>\n<p>Lets fire up the fox and go to &#8220;<strong>Tools &gt; Options&#8230;<\/strong>&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-876\" title=\"Firefox - Tools Options Menu\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-tools-options.jpg\" alt=\"Firefox - Tools Options Menu\" width=\"500\" height=\"264\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-tools-options.jpg 519w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-tools-options-300x158.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Now click the <strong>Advanced<\/strong> icon (on the upper-right of the dialog), and select the <strong>Network<\/strong> tab. Then click on the &#8220;<strong>Settings&#8230;<\/strong>&#8221; button.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-877\" title=\"Firefox Advanced Network Settings\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-advanced-network-settings.jpg\" alt=\"Firefox Advanced Network Settings\" width=\"500\" height=\"484\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-advanced-network-settings.jpg 500w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-advanced-network-settings-300x290.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>This will brings up the &#8220;<strong>Connection Settings<\/strong>&#8221; dialog. On this dialog click the &#8220;<strong>Manual proxy configuration<\/strong>&#8221; radio button, then put the address <strong>127.0.0.1<\/strong> in the &#8220;<strong>SOCKS Host<\/strong>&#8221; field. In the &#8220;<strong>Port<\/strong>&#8221; field enter the port you used when configuring your SSH tunnel with Putty. In my case this port is <strong>4567<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-878\" title=\"Firefox - Manual Proxy Configuration\" src=\"http:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-manual-proxy-configuration.jpg\" alt=\"Firefox - Manual Proxy Configuration\" width=\"486\" height=\"494\" srcset=\"https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-manual-proxy-configuration.jpg 486w, https:\/\/www.dotcomunderground.com\/blogs\/wp-content\/uploads\/2008\/12\/firefox-manual-proxy-configuration-295x300.jpg 295w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/p>\n<p>Click the &#8220;<strong>OK<\/strong>&#8221; buttons to accept your changes.<\/p>\n<p>Done!<\/p>\n<p>Now make sure you have already logged in to the server using the connection we created with PuTTY and start browsing with Firefox.<\/p>\n<p>You can visit a IP address identifier site like <a href=\"http:\/\/www.whatisyourip.com\">WhatIsYourIp.com<\/a> or <a href=\"http:\/\/www.whois.com.bd\/\">Whois.com.bd<\/a> to check which IP address firefox is showing.<\/p>\n<p>If you do not already have access to a linux server or shell account, you can grab a <a href=\"https:\/\/evolution-host.com\/vps-hosting.php\" target=\"_blank\" rel=\"noopener noreferrer\">high performance vps<\/a> from <a href=\"https:\/\/evolution-host.com\/vps-hosting.php\" target=\"_blank\" rel=\"noopener noreferrer\">evolution-host.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have access to SSH on a remote server (dedicated server, vps or shell account), you can browse the internet over the IP address hiding your original IP address. This can be useful for many scenarios like &#8211; IP based authentication over dynamic IP: In many cases for security reasons we use restrict access [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,9,13],"tags":[182,126,179,181,180,127],"class_list":["post-868","post","type-post","status-publish","format-standard","hentry","category-tech","category-tips","category-tutorials","tag-firefox","tag-linux","tag-proxy","tag-putty","tag-socks-proxy","tag-unix"],"_links":{"self":[{"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/posts\/868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/comments?post=868"}],"version-history":[{"count":0,"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/posts\/868\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/media?parent=868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/categories?post=868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dotcomunderground.com\/blogs\/wp-json\/wp\/v2\/tags?post=868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}