<?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 Ammar Cader on Medium]]></title>
        <description><![CDATA[Stories by Ammar Cader on Medium]]></description>
        <link>https://medium.com/@ammarcader15?source=rss-fdbcc741329e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ENVBU1okOPDf7poh</url>
            <title>Stories by Ammar Cader on Medium</title>
            <link>https://medium.com/@ammarcader15?source=rss-fdbcc741329e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:40:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ammarcader15/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[️‍♂️ Testing ClawdBot/Openclaw:My Experience After the Hype]]></title>
            <link>https://medium.com/@ammarcader15/%EF%B8%8F-%EF%B8%8F-testing-clawdbot-openclaw-my-experience-after-the-hype-b897e6f35289?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b897e6f35289</guid>
            <category><![CDATA[clawdbot]]></category>
            <category><![CDATA[openclaw]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 09:59:05 GMT</pubDate>
            <atom:updated>2026-02-13T09:59:05.249Z</atom:updated>
            <content:encoded><![CDATA[<p>After my feed was completely flooded with content related to Clawdbot/Openclaw in a manner where it was basically the only topic I was seeing, I felt it was the universe telling me to test it out. And from my experience what I can say is what we feared AI would become it has already become.</p><p>It can do basically anything which a normal person would do in jobs which have PC’s involved. My testing was a bit different compared to the hype’s normal procedure which is using a GUI based OS(Mac os on Mac mini), I tested it out with my server at home(bear server), discussed in several of my previous posts running ubuntu server on 4gb RAM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLjwkiOmLYlfF3ueEbAWTg.png" /><figcaption>One Line Script for guided CLI install</figcaption></figure><h4>Setup:</h4><p>•Ubuntu Server — OS(CLI Only)<br>•Openclaw/Clawdbot — The main tool to make this possible AI bot<br>•Openrouter AI (openrouter/google/gemini-2.0-flash-001)- AI model which openclaw utilizes, mainly chose this instead of other options is because this model is fairly free, meaning for free you get a lot compared to other options and this model is efficient for my needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j-4QAECDDodv4Zqx7fT-rA.png" /></figure><h4>Installation/Setup:</h4><ul><li>Installed openclaw with the one line command in their official site and followed the guided setup was very easy thanks to their guided setup.</li><li>Configured open router AI with Openrouter/google/gemini-2.0-flash-001 model after obtaining the api from their api page.</li><li>Easily configured telegram with a bot as the main chat interface to instruct openclaw easily thanks to the guided setup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HkPgU91Lr23qQwiHN-3pgA.png" /></figure><h4>Advantages for my server:</h4><p>•Easily instruct it to do specific tasks such as delete old CCTV recordings, instead manually using commands to check the dates and delete specific files.<br>•Just message it and ask whether scripts were run successfully instead of manually checking. Eg: My server is set to backup media and CCTV recordings to my qnap NAS at 2.a.m. every morning with cron and rsync, but if a power cut occurred during that time the backup would fail and I have to manually check but with openclaw I can just ask him/it.<br>•Easily give instructions instead of having to ssh into the system and very easier when not in the local network when server is not accessible unless I connect to Tailscale’s tailnet to access. Now its just about chatting on telegram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaT24hF2mCseuALKarWLBg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-ZIJjs9J025X38aOeNhpA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mP5q-xHSRIeo7W3iODfN1g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qH3lpEBagztVNH4noer1-A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EswFbbpnyIJE8xC222Wpg.jpeg" /></figure><h4>Issues faced during tests:</h4><ul><li>My first biggest annoying issue I faced was choosing the wrong AI model which didn’t fit my needs(qwen), It worked remarkably well but the specific model I used had very less context so after certain time he/it couldn’t do anything. So that’s when after deep research I switched to Openrouter. But for a free plan this is something that will be faced usually.</li><li>Another issue was my server struggling to run openclaw with a local model instead of a remote model with API where the model is running elsewhere not locally. I actually tested with a local model right after qwen was giving me problems before finalizing with Openrouter AI. I used ollama with qwen2.5:3b locally for testing, the struggling was acceptable due to my servers not high specs.</li><li>Deleting of important scripts, This I would say is a mistake of mine for not giving detailed instructions, What happened was I instructed openclaw delete files older than 4 days in the CCTV recordings folder, what went wrong was I store not only the recordings there but also the scripts related to CCTV recording and backups. So it did as I said and deleted the files older than 4 days including the scripts which also older than 4 days.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AXgHz_uFhDS0TNGeYNE3GA.png" /></figure><h4>Security Considerations:</h4><p>• Restricted OpenClaw to limited privileges (avoid running as full root where possible).<br> • Secured API keys (stored safely, not hardcoded in scripts).<br> • Aware of command injection / unintended file deletion risks — precise instructions are critical.<br> • Telegram bot exposure increases attack surface, so access control and token protection are essential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q3PnneRddKPEtNbrn-UiCg.png" /></figure><h4>Conclusion:</h4><p>After testing this cool tool what I can say is it has great potential to replace us. Many times I referred to it as “He” because I could actually feel like Im conversing with a really smart person who works for me maybe even more efficient than me if instructed properly. One key skill needed to make this work in my opinion is the ability for the individual to understand the bots tasks first and then instruct it very precise details and limitations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FigtvzWK8POh652ZOr3vg.png" /></figure><p>Future Plans:<br>•After upgrading server switch to a local model with ollama<br>•Test with a GUI based system to sleep in the bed and send emails maybe, or send birthday wishes at midnight while actually sleeping</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oDK9XWqyOhrE0Z86w4dKOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANL9Iqy_CJQlvCQI250bSA.png" /></figure><p>#CyberSecurity #Automation #AI #LLM #Linux #DevOps #Python #InfoSec #Networking #OpenSource #ClawDBot #SelfHosting</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b897e6f35289" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Turning a Linux Server into a Privacy-Focused NVR (No Cloud, No SD Cards)]]></title>
            <link>https://medium.com/@ammarcader15/%EF%B8%8F-turning-a-linux-server-into-a-privacy-focused-nvr-no-cloud-no-sd-cards-4a4c3634b9dd?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a4c3634b9dd</guid>
            <category><![CDATA[nvr]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[self-hosting]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 06:31:10 GMT</pubDate>
            <atom:updated>2026-01-07T06:31:10.373Z</atom:updated>
            <content:encoded><![CDATA[<p>Constant cloud payment pop ups, ads to view playback, risk of loosing all recordings if sd card is removed or the entire camera is removed etc, Are some of the issues that are faced when CCTV-CAMs with no NVR is used for home surveillance. I was a victim of this annoying procedure/process, So with a home server(bear-server) already deployed I came up with the idea to use it as a NVR by storing recordings and creating a method to view recordings in an organized manner with proper timestamps.</p><p>Main Goal:<br>-Ditch the default CAM app with several adware and unnecessary payments for cloud storage<br>-Privacy focused approach(recordings stored locally)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdZEHB5uDvhaKI_v5N4XVg.png" /><figcaption>Recordings in local server</figcaption></figure><p>Instead of sending footage to third-party cloud services, all recordings stay on-prem, stored on the server. This eliminates recurring cloud fees and significantly reduces the attack surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*k-zCjqAcXUnql2bi6kn0Gg.png" /><figcaption>Initial script without cleanup after 7days</figcaption></figure><h4>🔐 Architecture Overview</h4><p>Cameras stream via RTSP<br>Server records continuously using FFmpeg<br>Recordings are stored locally with retention-based cleanup<br>Already deployed customized jellyfish media server is used to securely view recordings over the network and talent for remote recording viewing.<br>The recording service runs automatically using systemd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r2XsOVsucOp0SFNzeXmDjQ.png" /><figcaption>Finalized script with cleaning up of recordings surpassing 7 days</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNeNP3Ur7I69e6LQqjNtgA.png" /><figcaption>Systemd config file for recordings to start at system boot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*U6XUA-PGhK-LAk9k8yycmw.png" /></figure><h4>🎯 Why this approach?</h4><ul><li>No cloud dependency</li><li>No SD card failures or limited storage</li><li>Full control over retention and access</li><li>Easier auditing and monitoring</li><li>Integrates cleanly into a homelab or enterprise network</li></ul><p>The recording script attached in one of the post images. The script records footage in 15-minute segments, automatically rotates old files, and avoids re-encoding video for efficiency and stability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZ9Ur1i3NaBVN6hIQW_XrA.png" /><figcaption>All 3 CCTV Cams recording in the background</figcaption></figure><h4>🧠 Key Learnings</h4><ul><li>Privacy-first designs often simplify security</li><li>Local storage + proper access control beats cloud convenience for CCTV</li><li>Linux + FFmpeg is extremely powerful for media workloads</li><li>Small scripts + systemd can replace expensive proprietary systems</li></ul><p>Further improvements in future:<br>-Deploy frigate(self hosted NVR) solution<br>-Backup using unison to my Qnap NAS<br>-Setup a live-streaming surveillance instead of currently relying on the app for live streaming only.</p><p>This setup saved money, improved reliability, and gave full ownership of sensitive footage a good reminder that sometimes the most secure solution is the one you fully control.<br>Security takeaway: The most secure systems are often the ones you own, control, and fully understand.</p><p><strong>#Linux</strong> <strong>#SelfHosting</strong> <strong>#CyberSecurity</strong> <strong>#NVR</strong> <strong>#CCTV</strong> <strong>#Privacy</strong> <strong>#Homelab</strong> <strong>#FFmpeg</strong> <strong>#Jellyfin</strong> <strong>#OpenSource</strong> <strong>#Networking</strong> <strong>#DevOps</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a4c3634b9dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Keeping files in sync across Linux machines sounds simple… until you want it fast, reliable, and…]]></title>
            <link>https://medium.com/@ammarcader15/keeping-files-in-sync-across-linux-machines-sounds-simple-until-you-want-it-fast-reliable-and-8152e1126314?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8152e1126314</guid>
            <category><![CDATA[self-hosting]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[unison]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Tue, 23 Dec 2025 10:45:57 GMT</pubDate>
            <atom:updated>2025-12-23T10:45:57.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔄 <strong>Keeping files in sync across Linux machines sounds simple… until you want it fast, reliable, and conflict-aware.</strong></h3><p>I usually have the practice of using rsync and crontab to sync various remote directories with one another, which can be argued as a unhealthy method as it is one-way transfers so for directories to properly sync both remote systems need to run the same command. This method gave various issues such as file conflicts where the latest version can be silently overwritten, lack of real conflict detection, no awareness of simultaneous changes on both ends, and scheduled syncs running while files are still being modified. That’s where “Unison” plays its role.</p><p>Reference/Learning Material:https://www.tecmint.com/unison-file-synchronizer-linux/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZqL1dO7V39vfqSrvolwHXw.png" /><figcaption>unison transfer</figcaption></figure><h4>Why Unison excels:</h4><p>-Two way sync<br>-Conflict detection<br>-Local as well as remote with ssh<br>-Lightweight and open-source<br>-Automatic file handling configuration based on config<br>-efficient and simple Logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UBWOVDcMJb1lmHAmBLfgjg.png" /></figure><h4>Setup procedure:</h4><ul><li>Installed Unison on both machines which directories needs syncing (GUI version also available: Unison-gtk)</li><li>Made sure key based ssh connection was working.</li><li>Created a profile “.prf” in the “~/.unison” directory</li><li>With the syntax for functioning based on my needs which can be further checked in the article link above</li><li>Unison has two modes the normal one which run live with a profile or not and “live mode” which continuously monitors for changes and proceeds with changes. But I chose the normal method combined with cron to run every 1 hour the reason in which the “live mode” is resource high compared to my chosen method and also has constant reading and writing on disks. Based on my needs using it with cron fits perfectly, but live mode is also not an issue if the need arises.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTvgaCaQLP5UPsYKvjqYvg.png" /><figcaption>Unison profiles run with crontab every hour</figcaption></figure><p>Another thing to highlight is how unison is secure because it works over SSH, avoids third-party services, and keeps data within the network boundary but can be worked with public systems securely as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sDorXQjTZwQqJNqUc9coQ.png" /><figcaption>SSH setup</figcaption></figure><p>Key Learning point:<br>Sometimes the best tools are simple, transparent, and do exactly one thing well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AhAjOetq8HIPkLEejNCJpA.png" /><figcaption>Profile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ANphPJ5C8tQlW_c_OsWNQ.png" /><figcaption>Profile</figcaption></figure><p>Still exploring tools that improve reliability and reduce unnecessary complexity in Linux environments. If any doubts or help needed in implementing please feel free to DM me will do my best to help!</p><p>#Linux #Unison #SelfHosting #OpenSource #CyberSecurity #Networking #DevOps</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8152e1126314" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DHCP leak + Access Points/Routers + Juniper EducaOffice Experience]]></title>
            <link>https://medium.com/@ammarcader15/dhcp-leak-access-points-routers-juniper-educaoffice-experience-45d933e11b2c?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/45d933e11b2c</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[juniper-networks]]></category>
            <category><![CDATA[network-engineering]]></category>
            <category><![CDATA[jncia-junos]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 10:36:09 GMT</pubDate>
            <atom:updated>2025-12-17T10:36:09.770Z</atom:updated>
            <content:encoded><![CDATA[<h3>DHCP leak + Access Points/Routers + Juniper Office Experience</h3><p>Faced a very educative problem which gave me experience and exposure with juniper switches, My first involvement/experience with JunOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5qiVYix67Gc7VzN03yvxA.png" /><figcaption>Web config JunOS</figcaption></figure><h4>Background:</h4><p>Our office’s CCTV, one interface of NAS, Access Points, and NVR run on a Juniper ex2200 POE switch. The switch doesn’t have DHCP active and all devices are assigned static IPs from the end device’s config. The issue arised when our boss requested a centralized location to view CCTV recordings and live view. Generally this can be achieved with the NVR linked to the mobile app but since the use of different CCTV brands across the various company branches and the existence of the other branches it was not possible with our onsite NVR. Before starting the operation in Sri Lanka to overcome this issue “Videoloft” cloud adapters were used by the different foreign operations to create a centralized CCTV solution. Therefore we were given one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9ZqoHy59-jheAKHenCwvA.png" /></figure><h4>The Problem:</h4><p>After receiving the Videoloft Cloud Adapter is when we discovered this “DHCP Leak” after connecting the cloud adapter to the ex2200 it is expected for it to have no IP address or self-assign a link-local (169.254.x.x) address due to the absence of DHCP, which can then be identified using tools like nmap, ARP tables, or MAC address inspection after connecting a scanning device to the ex2200. But when we attached the scanner device we observed that it received an IP from the 192.168.10.x range, which belongs to the DHCP pool of one of our access points which NATs which was not expected since the laptop was connected directly to the switch instead of directly connecting to the access point. Even then when we ran a network scan to search for the video loft we discovered that it had the same issue where it received an IP from the same access point. For context cameras are configured with 192.168.0.x static.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*segQsDMr13T1lHUYU9swvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rY1sz8VxaQwaf8Qc4d9Og.png" /></figure><h4>Initial Attempts:</h4><ul><li>We then thought simply to just change the Videoloft cloud adapter to a static IP in 192.168.0.x range, but for our bad luck the specific model we had of the cloud adapter doesn’t support assigning a static IP.</li><li>Then applied DHCP to the ex2200 switch but then had a full wireless network outage but didn’t cause much damage because operation team machines are connected via ethernet as well to the other switches. After doing so the video loft adapter still continued to receive an IP from the access point (192.168.10.x) instead of the DHCP from switch (192.168.0.x)</li><li>Also considered using CCTV manager app from symbology with our NAS but then other operations will have to do so as well which is convenient since they all have video loft cloud adapter configured</li></ul><h4>Solution:</h4><ul><li>Then we came up with the solution of using another switch for this purpose and best practices. Access points, NAS(functions as AD and DNS) remain in the same switch and the CCTV with NVR in the new juniper switch.</li><li>With the same configs as the previous juniper switch, no dhcp since and an another router acting as DHCP router connecting to the uplink so devices have internet access.</li></ul><h4>Advantages:</h4><ul><li>In the previous architecture devices connected to access points(192.168.10.x) were able to access the NVR and CCTVs(192.168.0.x), but after our solution this threat was eliminated.</li><li>Videoloft gets convenient IP because separate router which give IP’s as desired 192.168.0.x</li></ul><h4>What I Learned:</h4><ul><li>JunOS commands and configurations(basic) when applying configs by refereeing to the running switch</li><li>DHCP behavior in mixed vendor networks</li><li>Why switches should not fight routers for DHCP</li><li>Importance of design over quick fixes</li></ul><h4>Closing Insights:</h4><ul><li>Real networking issues aren’t solved by one command</li><li>Understanding traffic flow matters more than tools</li></ul><h4>Conclusion:</h4><p>This was a great hands on learning experience with Juniper and real world networking behavior. Troubleshooting this issue helped me better understand DHCP behavior, switch isolation, and why clean network design matters especially when security and reliability are involved.</p><p>#Networking #Juniper #JunOS #DHCP #NetworkEngineering #CyberSecurity #CCTV #EnterpriseNetworking #ITInfrastructure #Troubleshooting #LearningByDoing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsxHPuvGNGDB0sMSEuzqMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrUNWCG4pYuXLkqbGRDh6A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45d933e11b2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Port Knocking + SSH Security: Securing Open Ports]]></title>
            <link>https://medium.com/@ammarcader15/port-knocking-ssh-security-securing-open-ports-54395d6d9467?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/54395d6d9467</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[iptables]]></category>
            <category><![CDATA[port-knocking]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Mon, 08 Dec 2025 10:09:46 GMT</pubDate>
            <atom:updated>2025-12-08T10:09:46.176Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently when strengthening security of systems running SSH, while researching best practices and strategies came across the process of “Port Knocking” at:<br> <a href="https://hackers-arise.com/hacking-with-the-raspberry-pi-getting-started-with-port-knocking/">https://hackers-arise.com/hacking-with-the-raspberry-pi-getting-started-with-port-knocking/</a></p><p>To simply put it, “Port Knocking” is the process of keeping a port closed/blocked unless a specific sequence or input is sent to activate it.</p><h4>🔐 How it actually works:</h4><p>On the system running the specific service on a port which is open should be blocked/Closed by the firewall eg: iptables. Then using knockd configured with specific sequence numbers which will unblock the respective port if the connection request matches the sequence.</p><p>The best part is the port is opened to the IP which initiated the correct sequence only and also for a limited time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*On7LIAqAvTpVSC9caUr8Ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TDkinxVt1qodT8I1IqnoA.png" /><figcaption>Installing Knockd and viewing iptables rules</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrSCHQhkbUVekR8dfHraJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wq5f68WA89lCC3JwqWo0bw.png" /><figcaption>Iptables configured to block ports unless correct sequence using knockd is sent. knockd also enabled on device startup</figcaption></figure><h4>🛠 Tools used:</h4><ul><li><strong>SSH</strong> — remote access the service we are securing (can be any other service as well eg: smb, http, etc)</li><li><strong>Knockd</strong> — Tools used to for the main “Port Knocking” process, when sequence done correctly unblocks the port by instructing iptables</li><li><strong>Iptables</strong> — Powerful firewall/networking tool used to block these ports unless correct knock sequence.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPO2ou1ktSmZ1QMT0i-_Vw.png" /><figcaption>knockd config for SSH port knocking</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qr8aUP8FtQFVSUpVmHZqDQ.png" /><figcaption>knockd setted for startup and only a specific network interface</figcaption></figure><h4>🔍 Testing &amp; Verification:</h4><ul><li>Performed nmap scan and ssh port wasn’t open during the scan</li><li>Accessed with Tailscale network it worked, since I didn’t specify the Tailscale logical adapter for port knocking or firewall</li><li>tested port knocking and timings</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTk-IIiYVDY-WmhYuRYh3g.png" /><figcaption>Testing with ssh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phINPJM9gsYAu1zifw0V8Q.png" /><figcaption>Nmap scan to test functionality</figcaption></figure><h4>💭 Thoughts:</h4><p>Port Knocking is a great additional layer of security but not necessarily the only step that should be taken. Combining this with key based authentication will do an amazing job. Because port knocking is a very underrated security practice it’s something that not all attackers are aware of, which will be an advantage for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQSkZ6b_fclWCNQ6ileRgA.png" /><figcaption>knock package on mac ssh session initiator</figcaption></figure><h4>🔐 7. Security Benefits</h4><ul><li>SSH port invisible to internet</li><li>Zero exposure to port scanners</li><li>Prevents brute-force attacks</li><li>Lightweight and does not affect performance</li></ul><h4>❌ Disadvantages:</h4><ul><li>Bad configuration and insufficient knowledge can lead you locked out of your remote system if no physical access</li><li>Additional step to use specific service</li><li>Knock sequence can be sniffed on local network</li></ul><p>#CyberSecurity #SSH #PortKnocking #Linux #iptables #Networking #Homelab #ServerSecurity #Tailscale #Automation #InfoSec #DevSecOps</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54395d6d9467" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ AI-Powered Recon: Using Gemini + Nmap for Automated Security Scans]]></title>
            <link>https://medium.com/@ammarcader15/ai-powered-recon-using-gemini-nmap-for-automated-security-scans-0b8eb19b15c4?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b8eb19b15c4</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[reconnaissance]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 13:38:32 GMT</pubDate>
            <atom:updated>2025-11-24T13:38:32.850Z</atom:updated>
            <content:encoded><![CDATA[<p>After reading the article:<br> <a href="https://hackers-arise.com/artificial-intelligence-in-cybersecurity-using-ai-for-port-scanning/">https://hackers-arise.com/artificial-intelligence-in-cybersecurity-using-ai-for-port-scanning/</a> by <strong>@Hackers-arise</strong> which guides on how to set up a CLI LLM to conduct nmap scans using <strong>“LLM NMAP”</strong>:<a href="https://github.com/peter-hackertarget/llm-tools-nmap">https://github.com/peter-hackertarget/llm-tools-nmap</a></p><p>I decided to give it a try, as someone who uses “nmap” for most networking and security activities I spend most of the time in the man pages for syntaxes or articles on the different scripts for Nmap Scripting Engine (NSE) for my different needs this process makes the job more simple, efficient and productive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yp4u3zc6V77i5xY9YhgJg.png" /><figcaption>Cloning tool from github</figcaption></figure><h3>🖥️ Setup &amp; Tools Used</h3><p>To set it up I used my ubuntu server VM 🖥️, Installed and configured “llm” python package which gives us the power to use a CLI based LLM. It was configured so that it would use “gemini-2.5-flash” with the api key from my account. Then with the cloned “LLM NMAP” from GitHub, <strong>the LLM was able to generate Nmap commands and execute them through the system</strong>, allowing automation of scanning tasks.</p><p>So to simply say the tools/resources used were:</p><ul><li>🔧 <strong>Pipx</strong> — python based isolation installs</li><li>🤖 <strong>Llm</strong> — python CLI interface for LLM</li><li>🔑 <strong>Gemini api</strong> — use gemini with “llm”</li><li>🧩 <strong>llm-tools-nmap</strong> — llm to command nmap</li><li>📡 <strong>nMap</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQoBoCBbcc37YXX0AQE-Zg.png" /><figcaption>Installing llm package</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVmpWLHtrr0VZbIlStpSRA.png" /><figcaption>Setting up gemini with llm package</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52mRQNeyhdzzyStfLWCJQA.png" /></figure><h3>🔎 Tests Performed</h3><p>🔹 Basic Active Host Scan</p><p>Used the following prompt:</p><pre>llm --functions llm-tools-nmap.py “scan this network 192.168.10.0/24 and tell me the hosts that are up with their IP”</pre><p>Great detailed output — exactly what I expected.</p><p>🔹 Security Analysis Scan</p><p>Then tested with a common security task I usually use nmap for.<br> I expected a failure but the results were surprising!</p><p>The prompt was:</p><pre>llm --functions llm-tools-nmap.py &quot;Gather as much information as you can and identify any security issues or items of interest to a security analyst 192.168.10.148&quot;</pre><p>The output was detailed, well organized, and easy to understand even though it was a CLI interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSnaTO_wTc4NEgFFvSNkRA.png" /></figure><pre>llm --functions llm-tools-nmap.py &quot;Gather as much information as you can and identify any security issues or items of interest to a security analyst 192.168.10.148&quot;<br>/root/.local/pipx/venvs/llm/lib/python3.10/site-packages/pydantic/main.py:1804: UserWarning: Field name &quot;register&quot; in &quot;NoneInputSchema&quot; shadows an attribute in parent &quot;BaseModel&quot;<br>  return meta(<br>The following information was gathered for 192.168.10.148:<br><br>**Open Ports and Services:**<br><br>*   **22/tcp:** SSH (OpenSSH 8.9p1 Ubuntu 3ubuntu0.13, protocol 2.0)<br>*   **80/tcp:** HTTP (nginx 1.18.0 Ubuntu) - Runs Jellyfin, and `/` is a disallowed entry in `robots.txt`.<br>*   **139/tcp:** NetBIOS Session Service (Samba smbd 4.6.2)<br>*   **445/tcp:** Microsoft-DS (Samba smbd 4.6.2)<br>*   **8096/tcp:** Unknown service - likely Jellyfin as it&#39;s a common port for it.<br><br>**Operating System:**<br><br>*   Linux (Ubuntu, based on OpenSSH and Nginx versions).<br>*   Nmap&#39;s OS detection suggests `cpe:/o:linux:linux_kernel`.<br><br>**Samba Information:**<br><br>*   Samba `smbd 4.6.2` is running.<br>*   SMB2 security mode: Message signing is enabled but not required.<br><br>**Items of Interest to a Security Analyst:**<br><br>1.  **Outdated Samba Version:** Samba `4.6.2` is quite old. This version likely has known vulnerabilities. Upgrading Samba to a newer, patched version is highly recommended.<br>2.  **Jellyfin Exposed on Port 80:** Jellyfin is a media server. Exposing it directly on port 80 without HTTPS means all traffic, including login credentials, is sent in plaintext. This is a significant security risk. It should be configured to use HTTPS.<br>3.  **SSH Open:** While necessary for remote administration, OpenSSH should be secured. Recommendations include:<br>    *   Disabling root login.<br>    *   Using strong, complex passwords or, preferably, SSH keys for authentication.<br>    *   Considering a firewall to limit SSH access to trusted IPs.<br>    *   Keeping OpenSSH updated. The current version `8.9p1` is relatively recent, but regular patching is still important.<br>4.  **SMB Message Signing Not Required:** Although enabled, the fact that SMB message signing is not *required* could potentially allow for man-in-the-middle attacks where an attacker could tamper with SMB traffic. It&#39;s generally a good practice to require SMB signing.<br>5.  **Unknown Service on Port 8096:** While likely Jellyfin, any unknown open port warrants further investigation to understand its purpose and assess potential risks.<br>6.  **`robots.txt` Disallowed Entry:** The `/` entry in `http-robots.txt` for the Nginx server indicates that the server administrator doesn&#39;t want search engines to index the root directory. While not a security vulnerability in itself, it shows an attempt at controlling access/visibility and might hint at sensitive content.<br><br>**Recommendations:**<br><br>*   **Upgrade Samba:** Update Samba to the latest stable version to mitigate known vulnerabilities.<br>*   **Enable HTTPS for Jellyfin:** Configure Nginx and Jellyfin to use HTTPS to encrypt all web traffic. Obtain and install a valid SSL/TLS certificate.<br>*   **Secure SSH:** Implement best practices for SSH security (disable root login, use SSH keys, restrict access).<br>*   **Require SMB Signing:** Configure Samba to *require* SMB message signing.<br>*   **Investigate Port 8096:** Confirm the service running on port 8096 and secure it appropriately. If it is Jellyfin, ensure it&#39;s also behind HTTPS or not directly exposed if not intended.<br>*   **Regular Patching:** Ensure all software on the system (OS, Nginx, OpenSSH, Samba, Jellyfin) is kept up-to-date with the latest security patches.<br>*   **Firewall:** Implement a host-based firewall (e.g., UFW on Ubuntu) to restrict access to only necessary ports and trusted IP addresses.</pre><p>Detailed output from prompt</p><h3>✅ Overall Pros for me:</h3><p>⚡ AI-generated command accuracy<br> ⚡ How fast it built the scan sequence<br> 📄 Human-readable summaries<br> 🛡️ CVE insights / weak service identification<br> 🧠 “Security analyst”-style output</p><h3>⚠️ Cons / Issues Faced:</h3><p>Personally no cons for me was so great and appreciate it so much. But its not perfect — supervision and thorough inspection and verification will be needed at times.<br> 🔐 The one and only issue I faced which can be solved is allowing certain permissions to make certain tasks run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFXDwJEhy8nU72MN2dhW-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Umcqufrmq14-lBtyQMXn6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWULR3cqHSM8qC1onUD4lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zq7dAnl4ZLK5RD8JnUJPCg.png" /></figure><p>Overall great stuff! If you’re studying Cyber Security, networking, or automation, tools like llm-tools-nmap are a great way to learn AI-assisted recon while still practicing safe and ethical scanning.</p><p>#CyberSecurity #EthicalHacking #Nmap #LLM #Gemini #AI #Linux #pipx #Automation #InfoSec #Networking #OpenSource #Recon #SecurityAnalysis</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b8eb19b15c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Repurposing Old Hardware: Building My Own Self-Hosted Server Setup!]]></title>
            <link>https://medium.com/@ammarcader15/repurposing-old-hardware-building-my-own-self-hosted-server-setup-d6f19716e6b8?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6f19716e6b8</guid>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Sat, 15 Nov 2025 04:19:40 GMT</pubDate>
            <atom:updated>2025-11-15T04:21:57.348Z</atom:updated>
            <content:encoded><![CDATA[<p>While browsing the Facebook marketplace I came across a great deal for a Lenovo ThinkCentre. Which was a great candidate for one of my servers. So previously I was running my server on an Intel NUC which I don’t have currently. At the beginning it was running a normal Linux Mint setup which then later was stripped down to CLI only with all the bloatware and GUI applications removed for it to function as a lightweight efficient server. The main point being I still had the 1TB HDD running on that NUC, which is being used on my new server (Lenovo Think-center)</p><h3><strong>Current Challenges / Workarounds / Configs:</strong></h3><p>The current main goal is to make the “/” partition run on an SSD for faster boot time because for my network in the future this is going to be critical server reasons mentioned below, At the moment this guy takes his own time and boots within 15 minutes max. By using the same credentials and mounting the current “/home” partition as it is can make almost no data loss. I have made sure to use the “/home/bear” Directory for all my services data and configs which is not a good idea in an enterprise setup but since its my project it doesn’t matter.</p><p>My setup is currently having 3 network interfaces:</p><p>1. Tailscale interface to make server accessible anywhere using devices which are in the tailnet only</p><p>2. Ethernet adapter</p><p>3. WiFi Adapter</p><p>The Ethernet and wifi are connected to 2 different networks which consists of 2 different ISPs and different end devices, This setup ensures that end devices on both networks can access the server.</p><p>One key thing that was done was nmcli commands were added to crontab to constantly ensure that the wireless network is always connected, because I was facing constant disconnections.</p><p>On both networks the server was Mac binded with a unique IP address.</p><p>Changed DHCP pools because both networks had the same configs.</p><h3>Near Future Plans:</h3><p>Deploy <a href="https://github.com/pi-hole/pi-hole">Pi-hole</a> to act as an ad-blocking DNS server and also assign services like jellyfish and future with an address instead of IPs for access (Local DNS Resolution)</p><p><a href="https://nginx.org/">Nginx</a> for reverse proxy because DNS only maps hostnames → IP addresses, not ports. My services don’t run on port 80 by default so the need for a reverse proxy is needed for ease of use.</p><p>Host <a href="https://github.com/nextcloud">NextCloud</a> for Google Drive alternate</p><p>Install <a href="https://github.com/n8n-io/n8n">n8n</a> for workflow automation</p><p>Test and Run <a href="https://github.com/home-assistant">Home Assistant</a></p><p>Deploy <a href="https://www.linkedin.com/posts/ammar-cader-_clamav-notes-ammar-cader-activity-7390613324515831808-Zu86?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAFj5y8UBtlGS-f9tLtjbaSL2QYOZccwFpmI">CLAM-AV</a> and Snort for server only security at the moment. Fully additional network security in the future</p><h3>Distant Future Vision:</h3><p>Add a dedicated NIC and connect to a managed switch</p><p>Deploy <a href="https://www.snort.org/">Snort</a> IDS/IPS for security monitoring and prevention</p><p>Implement network usage tracking, segmentation, and endpoint management</p><p>Build a fully monitored, layered home network lab (a long-term goal, dependent on funding)</p><p>This setup is still evolving, and I’m constantly experimenting with new tools, configurations, and ideas to make it more efficient.</p><p>If you’re exploring the world of Linux servers, networking, or automation, I’d recommend following creators such as <a href="https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;opi=89978449&amp;url=https://www.youtube.com/networkchuck&amp;ved=2ahUKEwj0pLqcpvOQAxW5zjgGHZ3TMUkQFnoECAwQAQ&amp;usg=AOvVaw1VacuIEl6S-4mO1xFtas2n">@NetworkChuck</a>, <a href="https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;opi=89978449&amp;url=https://www.youtube.com/davidbombal&amp;ved=2ahUKEwiL_4ispvOQAxWzwzgGHSUOO7gQFnoECB4QAQ&amp;usg=AOvVaw1WcQvm7_8cp9BOxC7AB0FT">@DavidBombal</a>, and the <a href="https://tailscale.com/">@Tailscale</a> community — their content offers practical insights you can directly apply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iMi1CwZI-Wjs0jDfiQFFRg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGfsRAO5FjTzCDDxF7Qp7w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbVOuBQlJBtfWNVcLbm6jw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a7wUSejuUd0rC96_eQKb7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cprc8AlzeFs1Bnu7xr8EXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7h6XAJCN9fyOQhEun6mGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0OemcOzS8-h0K9oM-jov7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*g3gwxhm_zLdNyjTFrXWbUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkzOpaqBRrfuz-wfXuAzFA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6f19716e6b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discovering Lenspect: A Powerful Binary Inspection Tool for Linux by VirusTotal]]></title>
            <link>https://medium.com/@ammarcader15/discovering-lenspect-a-powerful-binary-inspection-tool-for-linux-by-virustotal-cf546d2a9fa5?source=rss-fdbcc741329e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf546d2a9fa5</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[virustotal]]></category>
            <category><![CDATA[lenspect]]></category>
            <dc:creator><![CDATA[Ammar Cader]]></dc:creator>
            <pubDate>Wed, 05 Nov 2025 11:29:08 GMT</pubDate>
            <atom:updated>2025-11-05T11:29:08.040Z</atom:updated>
            <content:encoded><![CDATA[<p>Thanks to the Linux Unplugged podcast, I came across Lenspect powered by VirusTotal — an open-source binary inspection tool for Linux:<br>🔗<a href="https://github.com/vmkspv/lenspect">https://github.com/vmkspv/lenspect</a></p><p>While tuning into the Linux Unplugged podcast episode 638, amongst other things, what caught me was Lenspect. Since I’m a Linux user and I follow Cyber Security as my profession, this tool caught my attention.</p><p>🧠 What is this tool?</p><p>To put it simply, Lenspect is a binary inspection and visualization tool inspired by VirusTotal, built for Linux users.<br> It connects to the VirusTotal API using your own API key, allowing you to analyze and inspect binaries safely within your local environment.</p><p>Lenspect lets you visually inspect binary files like ELF and PE, showing headers, sections, and metadata in a graphical layout. It’s perfect for reverse engineers, security researchers, or anyone who loves exploring what’s inside executables.</p><p>🧰 My Experience:</p><p>The app not being available in Debian-based systems’ default app manager apt was a small inconvenience but a valid excuse since it’s in early development. The need to manually build it with **Flatpak** was another minor bump, but with the good documentation and instructions in the GitHub repo, it was a pleasant procedure.</p><p>⚙️ Why I Liked It:</p><p>I mainly liked the tool because unlike the VirusTotal web interface, Lenspect gives you more control, privacy, and context, letting you visualize binary metadata, imports, and VirusTotal scan results — all from your Linux desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*m9mo1nNYn0a8btOoxj4vNg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*U-BdXKY2qFIVL8ZKtH1G5A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*J4U4VIcb03wuVTSHcP6VtA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPYOrdaoyfMGMg7gsX3vdQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lqmD644aIB2Wr7FK81WOCg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rNkHUblJNz1Hwf3QT-UQsQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf546d2a9fa5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>