{"id":3171,"date":"2023-12-18T13:57:56","date_gmt":"2023-12-18T04:57:56","guid":{"rendered":"https:\/\/derrylab.com\/?p=3171"},"modified":"2023-12-18T14:01:26","modified_gmt":"2023-12-18T05:01:26","slug":"how-to-enable-browsing-when-you-have-ssh-access","status":"publish","type":"post","link":"https:\/\/blog.derrylab.com\/index.php\/2023\/12\/18\/how-to-enable-browsing-when-you-have-ssh-access\/","title":{"rendered":"How to Enable Browsing when You Have SSH Access"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>If you have access to SSH into a machine, it means you have full control of that machine. However if not all of the things can be done via terminal SSH, sometimes you need to browse some sites using that machine connection. The simplest solution for this is to create an SSH tunnel.<\/p>\n\n\n\n<p>SSH tunneling is a powerful and secure way to browse the web anonymously and access restricted content. It allows you to route your internet traffic through a remote server using an encrypted SSH connection, providing both privacy and security. In this post, we&#8217;ll explore Dynamic Port Forwarding, a popular technique to enable secure browsing via SSH tunneling.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before we begin, ensure you have the following prerequisites:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Access to a remote server with SSH enabled.<\/li>\n\n\n\n<li>A local machine with SSH client installed (usually pre-installed on most Unix-based systems).<\/li>\n\n\n\n<li>A web browser (e.g., Chrome, Firefox) for configuring the proxy settings.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Dynamic Port Forwarding (SOCKS Proxy)<\/h2>\n\n\n\n<p>Open a terminal on your local machine and use the following command to establish an SSH connection to your remote server. Replace <code>username<\/code> with your remote server username and <code>remote_server<\/code> with the server&#8217;s hostname or IP address.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ssh -D 8080 -C -N username@remote_server<\/code><\/pre>\n\n\n\n<p>The options used in this command have the following meanings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-D 8080<\/code>: Specifies the local port (8080) to act as the SOCKS proxy.<\/li>\n\n\n\n<li><code>-C<\/code>: Enables compression to reduce data transfer overhead.<\/li>\n\n\n\n<li><code>-N<\/code>: Tells SSH not to execute any remote commands (we only want to create the tunnel).<\/li>\n<\/ul>\n\n\n\n<p>Authenticate and enter your SSH password when prompted. Then configure your browser. Open your web browser and go to its proxy settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Host\/Address: <code>127.0.0.1<\/code> (localhost)<\/li>\n\n\n\n<li>Port: <code>8080<\/code> (or the port you specified in the SSH command)<\/li>\n<\/ul>\n\n\n\n<p>And there you have it! Your browser is now all set up to utilize the SSH tunnel as a SOCKS proxy, providing you with web traffic through a remote server! I hope this helps. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction If you have access to SSH into a machine, it means you have full control of that machine. However if not all of the things can be done via terminal SSH, sometimes you need to browse some sites using that machine connection. The simplest solution for this is to create an SSH tunnel. SSH [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,149],"tags":[36,57,230,59,64],"class_list":["post-3171","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-security","tag-linux","tag-ssh","tag-ssh-tunneling","tag-terminal","tag-tutorial"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1880%2C1253&ssl=1","jetpack-related-posts":[{"id":2789,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/04\/25\/how-to-ssh-with-proxyjump-in-linux\/","url_meta":{"origin":3171,"position":0},"title":"How to SSH with ProxyJump in Linux","author":"derry","date":"April 25, 2023","format":false,"excerpt":"Secure Shell (SSH) is a widely used protocol for remotely connecting to a computer system, typically over a network. It provides encrypted communication and authentication to ensure secure access to a remote machine. In this article, we will discuss how to SSH with ProxyJump in Linux. ProxyJump is a feature\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"photo of jumping man","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":127,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/17\/how-to-fix-raspberry-pi-ssh-hangs-or-not-responding\/","url_meta":{"origin":3171,"position":1},"title":"How to Fix Raspberry Pi SSH Hangs or Not Responding","author":"derry","date":"November 17, 2020","format":false,"excerpt":"I just set up a Raspberry PI 4 Model B in the laboratory to automatically connect to the lab's router. I found that each random minutes the SSH is hangs and not responding. Adding IPQoS cs0 cs0 line to the end of \/etc\/ssh\/sshd_config file will fix the issue. :)","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":135,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/18\/how-to-start-a-fresh-raspberry-pi-without-monitor\/","url_meta":{"origin":3171,"position":2},"title":"How to Start a Fresh Raspberry Pi without Monitor","author":"derry","date":"November 18, 2020","format":false,"excerpt":"I mean using SSH because HDMI, mouse, keyboard, and monitor will eat up the whole space in my desk. Prepare the Raspberry Pi OS Firstly we need to get our microSD card with bootable Raspberry Pi OS. I recommend using Raspberry Pi Imager to make this process easier. We just\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":100,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/08\/19\/git-tutorial-how-to-push-to-a-new-repository\/","url_meta":{"origin":3171,"position":3},"title":"GIT Tutorial: How to Push to a New Repository","author":"derry","date":"August 19, 2020","format":false,"excerpt":"Set up your global git configuration first. git config --global user.name \"Your Name\" git config --global user.email \"id@your.site\" If you want to create a new repository: git clone ssh:\/\/id@your.site\/some-repo.git cd some-repo touch README.md git add README.md git commit -m \"add README\" git push -u origin master Or just push the\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2555,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/01\/31\/how-to-find-and-connect-to-hidden-wifi-network\/","url_meta":{"origin":3171,"position":4},"title":"How to Find and Connect to Hidden Wifi Network","author":"derry","date":"January 31, 2023","format":false,"excerpt":"Suppose you have a device that communicates using wifi, and you already know the password, but you can't find the SSID name on your phone or computer. How can you connect? In this post, I will show you how to find and connect to the hidden network using Kali Linux.\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/blog.derrylab.com\/index.php\/category\/hardware\/"},"img":{"alt_text":"photo of a wi fi tower under a blue sky","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/pexels-photo-7862565.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/pexels-photo-7862565.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/pexels-photo-7862565.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/pexels-photo-7862565.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/01\/pexels-photo-7862565.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2572,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/02\/08\/how-to-install-the-latest-openwrt-on-arduino-yun\/","url_meta":{"origin":3171,"position":5},"title":"How to Install the Latest OpenWRT on Arduino Yun","author":"derry","date":"February 8, 2023","format":false,"excerpt":"By the time I am writing this, this might be the first article that tells you how to install OpenWRT on Arduino Yun because no one talks about it. Also, Arduino Yun is already reached its end of life, and the version history is not well documented in each article\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/blog.derrylab.com\/index.php\/category\/hardware\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/02\/ArduinoYunFront_2.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/3171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/comments?post=3171"}],"version-history":[{"count":2,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/3171\/revisions"}],"predecessor-version":[{"id":3175,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/3171\/revisions\/3175"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media\/3172"}],"wp:attachment":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media?parent=3171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/categories?post=3171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/tags?post=3171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}