{"id":781,"date":"2021-01-19T01:15:46","date_gmt":"2021-01-19T01:15:46","guid":{"rendered":"https:\/\/dft.wiki\/?p=781"},"modified":"2026-03-20T06:58:02","modified_gmt":"2026-03-20T10:58:02","slug":"opening-a-tunel-trough-the-firewall-with-ngrox","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=781","title":{"rendered":"Opening a Tunel Trough the Firewall with NGROX"},"content":{"rendered":"<p>Why would I want to open a tunnel through my firewall?<\/p>\n<p>Suppose you have one service (HTTP, SSH, etc) in one specific computer (Laptop, RPi, etc) that is behind a firewall that prevents anyone from the Internet to get access to it and you need to share it with another device from outside the network.<\/p>\n<p>Go to NGROK [<a href=\"https:\/\/ngrok.com\/\">Link<\/a>] and create one account.<\/p>\n<p>Find the version of the system you want to share the service from.<\/p>\n<p>Copy the link and download the NGROK in the host machine.<\/p>\n<p>For a Linux 64 bits would be:<\/p>\n<pre>wget https:\/\/bin.equinox.io\/c\/4VmDzA7iaHb\/ngrok-stable-linux-amd64.zip<\/pre>\n<p>For a Raspberry Pi would be:<\/p>\n<pre>wget https:\/\/bin.equinox.io\/c\/4VmDzA7iaHb\/ngrok-stable-linux-arm.zip<\/pre>\n<p>In the host device, extract the zip content and insert the &#8216;<strong>authtoken<\/strong>&#8216; from your account:<\/p>\n<pre>unzip ngrok*.zip\r\n.\/ngrok authtoken 1nGTE96CoM7lXK8A0e7FNvg4NiD_6FCzSWB6fV9pgjAHQafoh<\/pre>\n<p>Now just run the NGROK setting the method and the port of the service. Follow the example for an HTTP server running in the localhost:<\/p>\n<pre>.\/ngrok http 80<\/pre>\n<p>One window will open with the public address that redirects the traffic through the tunnel to the host device.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-782\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/01\/ngrok.png\" alt=\"\" width=\"556\" height=\"167\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/01\/ngrok.png 556w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/01\/ngrok-300x90.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<p>Copy and paste the generated address into a browser on any client computer to get access. As long as the NGROK still running the tunneled service will be available. Press CTRL + C to stop at any time.<\/p>\n<p>If you want to tunnel the SSH port issue the command:<\/p>\n<pre>.\/ngrok tcp 22<\/pre>\n<p>For help:<\/p>\n<pre>.\/ngrok help<\/pre>\n<hr \/>\n<p><strong>BONUS<\/strong><\/p>\n<p>Try out this open-source tunnel service written in Rust that replicates the core functionality of ngrok, <strong>RusTunnel<\/strong> [<a href=\"https:\/\/github.com\/joaoh82\/rustunnel\">Link<\/a>].<\/p>\n<hr \/>\n<p><strong>READ MORE<\/strong><\/p>\n<p><strong>Setting Up a Cloudflare CDN<\/strong> [<a href=\"https:\/\/dft.wiki\/?p=1964\">Link<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why would I want to open a tunnel through my firewall? Suppose you have one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4,6],"tags":[],"class_list":["post-781","post","type-post","status-publish","format-standard","hentry","category-hacking","category-linux","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=781"}],"version-history":[{"count":4,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/781\/revisions"}],"predecessor-version":[{"id":5413,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/781\/revisions\/5413"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}