{"id":2111,"date":"2015-07-04T10:33:37","date_gmt":"2015-07-04T08:33:37","guid":{"rendered":"http:\/\/possiblelossofprecision.net\/?p=2111"},"modified":"2021-05-15T11:46:37","modified_gmt":"2021-05-15T09:46:37","slug":"tunneling-browser-traffic-through-an-ssh-jumpbox","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=2111","title":{"rendered":"Tunneling browser traffic through an ssh jumpbox"},"content":{"rendered":"<p>It can be very handy sometimes to tunnel your browser&#8217;s traffic through a secure channel, for example when you are on an insecure or unknown network like a hotel, cafe or airport etc.<\/p>\n<p>To open up a SOCKS proxy on port 8080, run<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nssh -C2qTnN -D 8080 your-user@example.com\r\n<\/pre>\n<p>\nTo configure Firefox to use the proxy go to <b>Edit &rarr; Preferences &rarr; Advanced &rarr; Network &rarr; Settings<\/b> and enable &#8216;Manual proxy configuration&#8217;\n<\/p>\n<div id=\"attachment_2147\" style=\"width: 503px\" class=\"wp-caption aligncenter\"><a data-rokbox href=\"wordpress\/wp-content\/uploads\/2016\/03\/FirefoxSocksProxy.png\" data-rokbox-caption=\"Edit &rarr; Preferences &rarr; Advanced &rarr; Network &rarr; Settings\" > <img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2147\" src=\"wordpress\/wp-content\/uploads\/2016\/03\/FirefoxSocksProxy.png\" alt=\"Edit &rarr; Preferences &rarr; Advanced &rarr; Network &rarr; Settings\" width=\"493\" height=\"624\" class=\"size-full wp-image-2147\" srcset=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2016\/03\/FirefoxSocksProxy.png 493w, https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2016\/03\/FirefoxSocksProxy-435x550.png 435w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/> <\/a><p id=\"caption-attachment-2147\" class=\"wp-caption-text\">Enable SOCKS proxy in <b>Edit &rarr; Preferences &rarr; Advanced &rarr; Network &rarr; Settings<\/b><\/p><\/div>\n<p>You can also tunnel Firefox&#8217;s DNS queries through the SOCKS proxy by enabling the &#8216;Remote DNS&#8217; checkbox.<\/p>\n<p>For chrome, you can use the settings dialog quite similar to the Firefox example above, but you can also specify the proxy through the command line with the <code>SOCKS_SERVER<\/code> environment variable. To spawn a new, temporary chrome session with the SOCKS proxy configured, run<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nSOCKS_SERVER=localhost:8080 google-chrome --user-data-dir=\/tmp\/chrome $1\r\n<\/pre>\n<p>Note that&#8217;s it&#8217;s a bit more tricky to tell chrome not to rely on local DNS queries. For details have a look at the <a href=\"https:\/\/www.chromium.org\/developers\/design-documents\/network-stack\/socks-proxy\">chromium documentation<\/a>.<\/p>\n<p>Resources:<br \/>\n<a href=\"https:\/\/news.ycombinator.com\/item?id=1536126\">https:\/\/news.ycombinator.com\/item?id=1536126<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It can be very handy sometimes to tunnel your browser&#8217;s traffic through a secure channel, for example when you are on an insecure or unknown network like a hotel, cafe or airport etc. To open up a SOCKS proxy on port 8080, run ssh -C2qTnN -D 8080 your-user@example.com To configure Firefox to use the proxy go to Edit &rarr; Preferences&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=2111\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[74,29,15],"class_list":["post-2111","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-chrome","tag-firefox","tag-ssh"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/2111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2111"}],"version-history":[{"count":19,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/2111\/revisions"}],"predecessor-version":[{"id":2165,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/2111\/revisions\/2165"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}