{"id":24,"date":"2006-07-27T09:51:53","date_gmt":"2006-07-27T13:51:53","guid":{"rendered":"http:\/\/thesmithfam.org\/blog\/?p=24"},"modified":"2019-08-12T07:16:33","modified_gmt":"2019-08-12T13:16:33","slug":"setting-up-a-socks-server-with-ssh","status":"publish","type":"post","link":"https:\/\/thesmithfam.org\/blog\/2006\/07\/27\/setting-up-a-socks-server-with-ssh\/","title":{"rendered":"Setting up a SOCKS server with SSH"},"content":{"rendered":"<p>Does your firewall block port 25 so you can&#8217;t use Thunderbird to send email? Do you have a Linux box on the open Internet? If so, you are in luck.<\/p>\n<p>I run Windows on my desktop, and I have a Linode machine that runs my email server. When I discovered that I was behind a firewall that blocked port 25, I was bummed that I couldn&#8217;t send email via Thunderbird.<\/p>\n<p>SOCKS to the rescue!<\/p>\n<p>By setting up a SOCKS server with SSH, you can encrypt all out-bound email on your desktop, tunnel it to your Linux box, where it is decrypted and sent to its destination. Here&#8217;s how you do it:<\/p>\n<p>On your Windows box, open Cygwin and run<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ssh user@mylinuxbox.com -D 1234<\/pre>\n<p>Once the command runs, it will put you in a normal SSH console session. Just minimize the window and leave it like that.<\/p>\n<p>Then, open Thunderbird and click Tools -> Options -> Connection Settings. Enter localhost for the SOCKS Host and 1234 for the Port. Tick the &#8220;SOCKS v5&#8221; radio button, and you are good to go. Now, all email that Thunderbird sends will be SSH-encrypted between your desktop and your Linux box and you can send email again despite the firewall blocking port 25.<\/p>\n<p>If you get really fancy, you can install your public key in your Linux box&#8217;s .ssh\/authorized_keys file and then you won&#8217;t even have to enter a password. Then, create a shortcut in Windows like this:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">C:\\cygwin\\ssh.exe user@mylinuxbox.com -D 1234<\/pre>\n<p>And put it in the Start Menu under the Startup folder, and your SOCKS server will automagically start every time you login to Windows.<\/p>\n<p>The other cool thing you can do now that you have a SOCKS server running is tunnel all your web traffic through it in Firefox. Just configure Firefox to use localhost as its SOCKS server and no one on your LAN will be able to see what you are surfing, since it will just look like encrypted SSH traffic to and from mylinuxbox.com.<\/p>\n<p>Of course you&#8217;ll have to replace mylinuxbox.com with your actual Linux box&#8217;s host name.<\/p>\n<p>Enjoy!<\/p>\n<p>(edited on April 23, 2007 to fix two incorrect host settings)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Does your firewall block port 25 so you can&#8217;t use Thunderbird to send email? Do you have a Linux box on the open Internet? If so, you are in luck. I run Windows on my desktop, and I have a Linode machine that runs my email server. When I discovered that I was behind a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-code-and-cruft"],"_links":{"self":[{"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":1,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":1613,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions\/1613"}],"wp:attachment":[{"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thesmithfam.org\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}