<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prasun Rohan on Medium]]></title>
        <description><![CDATA[Stories by Prasun Rohan on Medium]]></description>
        <link>https://medium.com/@prasun.rohan?source=rss-b7e4c67a25a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9EEAHRs9fzo7Qkcs</url>
            <title>Stories by Prasun Rohan on Medium</title>
            <link>https://medium.com/@prasun.rohan?source=rss-b7e4c67a25a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:42:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prasun.rohan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Share your localhost with anyone using Python and Cloudflared]]></title>
            <link>https://medium.com/@prasun.rohan/share-your-localhost-with-anyone-using-python-and-cloudflared-f1afe8f67380?source=rss-b7e4c67a25a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1afe8f67380</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[port-forwarding]]></category>
            <dc:creator><![CDATA[Prasun Rohan]]></dc:creator>
            <pubDate>Sat, 12 Sep 2026 08:59:56 GMT</pubDate>
            <atom:updated>2026-09-12T08:59:56.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivIM_2YZtyqDD7fsv5pfFg.png" /></figure><p>Recently I ran into a small but annoying problem. I was trying to move a file from my virtual machine to my main machine, and I assumed it would be easy since both were on the “same” network. But when I checked the IP addresses, they weren’t the same the VM was sitting on its own separate network.</p><p>So I thought: what if I just expose the specific folder containing my file as a temporary public server? Grab the file, then shut everything down.</p><p>Here’s how I did it, and how you can too.</p><h3>First, start a local server</h3><p>Go into the folder that has the file you want to share, and run:</p><pre>python3 -m http.server 8000</pre><p>Python comes with this built in, so there’s nothing to install. It instantly serves everything in your current folder on port 8000. (You can pick any port — just remember the number, you&#39;ll need it in the next step.)</p><p>To confirm it’s actually working, open a browser on the <em>same</em> machine and go to:</p><pre>http://127.0.0.1:8000</pre><p>You should see a list of your files. Good — the server works.</p><p><strong>But here’s the catch I hit:</strong> from my main device I tried to reach it and saw nothing, even though I thought we were on the same network. That’s exactly the problem — the VM was on a different network, so 127.0.0.1 (which only means &quot;this machine&quot;) and even the local network address weren&#39;t reachable from my main device.</p><p>The fix: don’t fight the network at all. Just tunnel out.</p><h3>Then, port forward it with cloudflared</h3><p>cloudflared is Cloudflare&#39;s tunnel tool. It creates an outbound connection from your machine to Cloudflare, and Cloudflare hands you a public https:// link that anyone can open — no router config, no matching networks, no account needed.</p><p>If you don’t have cloudflared yet, install it (Debian/Ubuntu/Kali):</p><pre>wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb<br>sudo dpkg -i cloudflared-linux-amd64.deb</pre><p>Then in a <strong>second terminal</strong>, point it at the same port your server is on:</p><pre>cloudflared tunnel --url http://localhost:8000</pre><p>After a second, it prints a public link like:</p><pre>https://random-words-here.trycloudflare.com</pre><p>Open that on <em>any</em> device, anywhere — different network, phone, whatever. Your file is right there to download.</p><h3>When you’re done, shut it down</h3><p>Press Ctrl+C in both terminals.</p><p>This matters: while the tunnel is live, that link exposes your folder to the entire public internet with no password. So the moment you’ve grabbed your file — kill it.</p><h3>Quick recap</h3><p>bash</p><pre># Terminal 1 — start the server (inside the folder you want to share)<br>python3 -m http.server 8000</pre><pre># Terminal 2 — expose it to the internet<br>cloudflared tunnel --url <a href="http://localhost:8000/">http://localhost:8000</a></pre><p>Two commands, one temporary public link.</p><h3>Want an even faster shortcut?</h3><p>I turned this exact two-step process into a small Python tool so you don’t have to remember the commands. Just install it:</p><p>bash</p><pre>pip install prosoon-pf</pre><p>Then run the single command <em>(check the package page for the exact command and flags)</em> and it starts the server and opens the tunnel for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1afe8f67380" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>