<?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 Gazel Stronoff on Medium]]></title>
        <description><![CDATA[Stories by Gazel Stronoff on Medium]]></description>
        <link>https://medium.com/@gazelstronoff?source=rss-cc4a90669cb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bemA6ppmBYZtw6zBUUnPqQ.jpeg</url>
            <title>Stories by Gazel Stronoff on Medium</title>
            <link>https://medium.com/@gazelstronoff?source=rss-cc4a90669cb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:27:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gazelstronoff/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[Accessing a Docker-Based Ubuntu Server on WSL from Android Termux]]></title>
            <link>https://medium.com/@gazelstronoff/accessing-a-docker-based-ubuntu-server-on-wsl-from-android-termux-25b68a40089a?source=rss-cc4a90669cb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/25b68a40089a</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-project]]></category>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[remote-server]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Gazel Stronoff]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 16:45:42 GMT</pubDate>
            <atom:updated>2025-10-09T17:59:58.694Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently experimented with running a full Ubuntu server inside Docker on WSL2 and accessing it remotely from my Android device using Termux/ Termius.</p><p>You must be thinking why inside a WSL2? ….Well IDK, actually this made this project a bit complex for me in the first hand, but it worked out well😁</p><p>This would also work if you have installed, Docker on your windows itself, just skip some steps mentioned below.</p><h3>Why This Project?</h3><p>WSL2 allows running Linux inside Windows, but accessing services from external devices isn’t straightforward. Combining Docker with WSL gives a portable server, and with some networking tweaks, you can access it from anywhere on your LAN using your phone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*3Tg4b1zUe3ZhiTd1CVpCoQ.png" /><figcaption>Just for the preview window</figcaption></figure><h3>Step 1: Set Up Docker in WSL</h3><p>Skip this step if want to use docker in windows, if not installed docker in the windows, use this link to download docker : <a href="https://www.docker.com/products/docker-desktop/"><em>Docker Desktop</em></a></p><p>Install Docker inside your WSL distro (Ubuntu in my case):</p><pre>sudo apt update<br>sudo apt install docker.io -y<br>sudo service docker start</pre><p>Verify:</p><pre>docker run hello-world</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*3J_GscE5yNoqyTPB1Bc_iQ.png" /></figure><h3>Step 2: Run an Ubuntu Server Container</h3><p>Create a container that stays alive and exposes SSH: <br><em>Bonus tip : If the docker command gives some error write the command with sudo privileges.</em></p><pre>docker run -d --name ubuntu-server -p 0.0.0.0:2222:22 ubuntu sleep infinity</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*ho8tFOUwu5K4TzuU0pVchw.png" /></figure><h3>Step 3: Enable SSH in the Container</h3><p>Access the container:</p><pre>docker exec -it ubuntu-server bash</pre><p>Install and configure SSH:</p><pre>apt update &amp;&amp; apt install openssh-server -y<br>service ssh start<br>passwd root</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*ESMAJ9SNR4j_Ps11eC8dPg.png" /><figcaption><strong>Select any options if prompted, it doesn’t matter, I selected Indian then Maldives.</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*ARcXAojojYmQ4porJQqCIw.png" /></figure><p>Edit /etc/ssh/sshd_config to allow root login:</p><ol><li>Install Nano (Text Editor)</li></ol><pre>apt install nano</pre><p>2. Edit the file</p><pre>nano /etc/ssh/sshd_config</pre><p>3. Modify the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*37Lb7iuUOIZZWNv6RXCAAg.png" /><figcaption><strong>ctrl + s (to save changes) and ctrl + x (to exit)</strong></figcaption></figure><p>Restart SSH:</p><pre>service ssh restart</pre><h3>Step 4: Configure Windows Networking</h3><p>WSL2 uses a virtual network, so you need add a port proxy that would be directing the network traffic you get on you PC, to the virtual network. WSL2 is</p><ol><li><strong>Find WSL IP:</strong></li></ol><pre> ifconfig eth0</pre><p>Example: 172.21.87.65</p><p>2. <strong>Open PowerShell as Admin and forward Windows port to WSL: </strong>This is important, if you are using WSL2, if not skip this👍</p><pre>netsh interface portproxy add v4tov4 listenport=2222 listenaddress=0.0.0.0 connectport=2222 connectaddress=&lt;WSL_IP&gt;</pre><p>Check to Verify</p><pre>netsh interface portproxy show all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*FL0MM11Md0sowK5gAolzOA.png" /></figure><p>3. <strong>Allow firewall access:</strong> This is important, it allows your server(PC/Laptop) to listen on port 2222 for the incoming network traffic, on our case it’s a ssh connection.</p><pre>netsh advfirewall firewall add rule name=&quot;WSL SSH Forward&quot; dir=in action=allow protocol=TCP localport=2222</pre><p>4. <strong>Get Windows LAN IP</strong>:</p><pre>ipconfig</pre><p>Use the IPv4 address of your Wi-Fi adapter, e.g., 192.168.1.5.</p><h3>Step 5: Connect from Android Termux</h3><p>On your phone (same Wi-Fi network), open Termux and run:</p><pre>ssh root@&lt;yourIP&gt; -p 2222</pre><p>Example : ssh root@192.168.1.165 -p 2222</p><p>Enter the root password you set. You now have full shell access to your Ubuntu server running inside Docker on WSL!</p><h3>Conclusion</h3><p>This project taught me how WSL2, Docker, and Windows networking interact. It also showed how to make a Linux server accessible from anywhere on my home network, including mobile devices.</p><p>It’s a small but satisfying step into remote Linux management using Android.</p><p>If errors occur do comment! I will try my best to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25b68a40089a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>