{"id":4944,"date":"2018-05-06T23:57:51","date_gmt":"2018-05-06T23:57:51","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=4944"},"modified":"2021-02-27T09:07:03","modified_gmt":"2021-02-27T09:07:03","slug":"secure-tunnels-to-localhost-using-ngrok","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/","title":{"rendered":"Secure Tunnels to localhost using ngrok"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5004\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/architecture-after-ngrok-deployment.png\" alt=\"\" width=\"600\" height=\"350\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/architecture-after-ngrok-deployment.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/architecture-after-ngrok-deployment-300x175.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Secure Tunnels to localhost using ngrok<\/strong><\/p>\n<p><strong>ngrok is a free tool that allows you to expose a web server running on your local machine to the internet.<\/strong> It includes additional functionality that makes it easy to install and manage itself as a native operating system service on Windows, OS X and Linux.<\/p>\n<p>It is is a multiplatform tunnelling, reverse proxy software that establishes secure tunnels from a public endpoint such as internet to a locally running network service while capturing all traffic for detailed inspection and replay.<\/p>\n<p>The following are the issues that we were facing before Ngrok deployment:<\/p>\n<ol>\n<li>Unable to expose localhost application directly to internet without DMZ &amp; other network configuration<\/li>\n<li>Unable to demonstrate an application to Client on urgent basis<\/li>\n<li>Unable to share websites for testing purpose<\/li>\n<li>Develop any services which consume Webhooks (HTTP CallBacks)<\/li>\n<li>Can\u2019t share a website temporarily that is running only on our developer machine<\/li>\n<li>Time Consuming on network and DNS configurations<\/li>\n<li>Can\u2019t debug or inspect HTTP Traffic in a precise manner<\/li>\n<li>Can\u2019t run networked services on machines that are firewalled off from the internet<\/li>\n<li>Unable to expose application behind http proxy<\/li>\n<li>Unable to forward non-http and non-local network services<\/li>\n<\/ol>\n<p>It\u2019s really easy to install and use<\/p>\n<p>ngrok is built in Go so it is packaged as binaries for each major platform. To install ngrok do the following:<\/p>\n<ol>\n<li>Download the package for your system<\/li>\n<li>Unzip the package<\/li>\n<li>There is no step 3!<\/li>\n<\/ol>\n<p><strong>Once you have ngrok installed, using it to tunnel to an application running on, say, port 3000 is as easy as:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ .\/ngrok http 3000<\/pre>\n<p><strong>Once you\u2019ve unzipped the ngrok executable move it to a folder that\u2019s in your $PATH then you can run ngrok from anywhere you want on the command line by just typing:<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ ngrok http 3000<\/pre>\n<p><strong>It has a dashboard<\/strong><br \/>\nhttp:\/\/127.0.0.1:4040<\/p>\n<p><strong>You can secure your tunnels<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ ngrok http -auth &quot;user:password&quot; 3000<\/pre>\n<p><strong>You can use custom subdomains<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$ ngrok http -subdomain=thisisreallycool 3000<\/pre>\n<p><a href=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/Architecture-after-Ngrok-deployment.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4945\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/Architecture-after-Ngrok-deployment.jpg\" alt=\"\" width=\"849\" height=\"478\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/Architecture-after-Ngrok-deployment.jpg 849w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/Architecture-after-Ngrok-deployment-300x169.jpg 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/Architecture-after-Ngrok-deployment-768x432.jpg 768w\" sizes=\"auto, (max-width: 849px) 100vw, 849px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Secure Tunnels to localhost using ngrok ngrok is a free tool that allows you to expose a web server running [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":5003,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4919],"tags":[4921,4920],"class_list":["post-4944","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ngrok","tag-localhost","tag-ngrok"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Secure Tunnels to localhost using ngrok - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Secure Tunnels to localhost using ngrok - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Secure Tunnels to localhost using ngrok ngrok is a free tool that allows you to expose a web server running [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-06T23:57:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:07:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Secure Tunnels to localhost using ngrok\",\"datePublished\":\"2018-05-06T23:57:51+00:00\",\"dateModified\":\"2021-02-27T09:07:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/\"},\"wordCount\":338,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/jenkins-architecture-explained-1.png\",\"keywords\":[\"localhost\",\"ngrok\"],\"articleSection\":[\"ngrok\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/\",\"name\":\"Secure Tunnels to localhost using ngrok - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/jenkins-architecture-explained-1.png\",\"datePublished\":\"2018-05-06T23:57:51+00:00\",\"dateModified\":\"2021-02-27T09:07:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/jenkins-architecture-explained-1.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/jenkins-architecture-explained-1.png\",\"width\":600,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/secure-tunnels-to-localhost-using-ngrok\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secure Tunnels to localhost using ngrok\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Secure Tunnels to localhost using ngrok - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/","og_locale":"en_US","og_type":"article","og_title":"Secure Tunnels to localhost using ngrok - scmGalaxy","og_description":"Secure Tunnels to localhost using ngrok ngrok is a free tool that allows you to expose a web server running [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/","og_site_name":"scmGalaxy","article_published_time":"2018-05-06T23:57:51+00:00","article_modified_time":"2021-02-27T09:07:03+00:00","og_image":[{"width":600,"height":350,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Secure Tunnels to localhost using ngrok","datePublished":"2018-05-06T23:57:51+00:00","dateModified":"2021-02-27T09:07:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/"},"wordCount":338,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png","keywords":["localhost","ngrok"],"articleSection":["ngrok"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/","name":"Secure Tunnels to localhost using ngrok - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png","datePublished":"2018-05-06T23:57:51+00:00","dateModified":"2021-02-27T09:07:03+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/05\/jenkins-architecture-explained-1.png","width":600,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/secure-tunnels-to-localhost-using-ngrok\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Secure Tunnels to localhost using ngrok"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=4944"}],"version-history":[{"count":4,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4944\/revisions"}],"predecessor-version":[{"id":5007,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/4944\/revisions\/5007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/5003"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=4944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=4944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=4944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}