Deep Dive Articles

The Best Way to Learn a New Programming Language from Scratch - How I Approach and Learn Any Programming Language Efficiently

Preface: The following article is based on my experiences and opinions on learning programming languages. I have been learning about computers in-depth and find learning languages with specific purposes useful. For example, Python was for beginning, C is for memory management and Rust is for learning to write memory-safe code in my case. This time, I started learning Golang which is known for its simple syntax and powerful performance, and widely known for its awesome concurrency.

Why More is Not Always Good in Terms of Software - Words on Cross Platform Utilities, Bash-ism, and POSIX Compliance.

Preface: This article is about my views on software compliance and cross-platform support, and reflects my opinions and experience with the subject. Your experience and opinions may vary, which I respect. What I am Specifically Talking About? I am going to talk about the issues caused by non-compliant software and why more features are not always good, especially in the case of the upgrade of tools on a single platform.

Why I Shifted From Arch Linux to Debian Linux?

Preface: The following article is based on my personal experience with Arch Linux and Debian Linux. While I appreciate both distributions for their unique strengths and different use cases, the information provided reflects my own opinions and experiences. Your experiences may vary. What was I going for Initially? Bit of my Story as a Beginner Linux User When I started using Linux, I was going through security stuff and learning computer security when I was in my High School.

Tmux is the Ultimate Choice for Power Users - An Awesome Terminal Multiplexer for Managing Persistent Sessions

What is Tmux? Tmux is a Terminal Multiplexer Application for Linux and MacOS for managing terminal sessions and Windows. It is to be mentioned that Tmux is not a terminal emulator, instead, it’s a terminal application, a binary that allows you to stay productive over your terminal. It doesn’t matter which terminal emulator you are using (although I recommend the Suckless Terminal). The functionality of managing Windows and the session doesn’t happen on the desktop GUI side but on the terminal session, you are working with.

The Concept of RSS Feed - A Reliable Way for Publishers and Subscribers Model

Preface: I have been looking for simple solutions in nearly everything related to computing. A lot of software designed these days is not designed per your requirements but as per companies’ profit. Hence, most of these solutions end up sucking your time and energy and need to be replaced by more optimised solutions that would boost your productivity in the right way. RSS Feed is something that I found after searching for solutions related to subscribing to websites or creators without sucking much resources and design that is reliable to the user itself.

Breaking RSA Encryption on Hardware Devices with Side Channel Power Analysis — Leaking the Private Key by Exploiting Square-Multiply Algorithm

Preface: This article is about leaking the private key from hardware devices that implement RSA encryption which is part of hardware hacking. The author is not responsible for any damage caused by the given information. It is recommended to be careful while performing these attacks as they can damage the hardware or even destroy it. All the information provided here is for educational purposes. There are no such prerequisites for understanding the theory, although knowledge about modular arithmetic, basics of encryption mathematics, basic electronics, etc.

Serious Reconnaissance with Unmanned Aerial Vehicles — Mapping Out Devices in an Area with Drones

Introduction: The following content is for educational purposes and for hackers living in basements knowing enough ethics. The author is not responsible for any damage caused by the knowledge provided here and does not support anything like that. It’s essential to check out the rules in the area of reconnaissance about the tactics provided here and the use of materials (unless and until there is any apocalypse and a solid recon is required).

The Fundamentals of Hardware Hacking — Breaking and Reverse Engineering Smart IoT Devices

Disclaimer — This is an introductory article about Hardware Hacking and Security of IoT Devices. None of the mentioned information or techniques are intended for any illegal purposes and the author is not responsible for any damage. It’s advisable to experiment on devices that you own or have explicit permission to do so. Rest of all, hardware hacking is fun! The Beauty of Electronic Devices In the ever-growing world of smart devices and the connectivity of things to the internet, life has become more convenient than ever.

Setting Up a Remote Git Server — A Simple and Concise Step-by-Step Guide to Host a Private Git Server

Preface: This is a concise and simple guide to hosting a remote git server. I have been researching this topic for a while and came up with the idea of writing an article with a step-by-step guide for hosting a private git server. Covering all the aspects of git is not possible in a single article, so it’s assumed that the reader has prior knowledge of git and version control.

The Nature of Linux Kernel Development — Difference Between Rules of Kernel Level and User-Space Application Level

Preface: This article is intended to explain a clear distinction between the core principles of Linux Kernel Development and User-Application Level Development. The provided information is based on my research on Kernel Development through various sources and I have tried to make it as accurate as possible. Efforts have been made to explain it as simply and concisely as possible. Introduction to the Nature of Linux Kernel Linux Kernel is the abstraction layer between the Operating System and the Hardware in the system.

Linux Process Scheduling — The Reason your Linux System Processes so Efficiently (Kernel Perspective)

Preface: I was going through the book “Linux Kernel Development” by Robert Love, one of the best books I have referred to for low-level stuff and understanding the workings of Linux. I study this book with intensity, simplify the concepts and write it down here so that the readers can get a straightforward description and all they need to know about the topic. Covering the whole Linux Process Scheduling is not possible and is not the goal of this article.

Linux Processes — A Kernel’s Perspective Explained with Clarity and Simplicity

Preface: I have been going through the book “Linux Kernel Development” by Robert Love which I highly recommend for understanding the Linux Kernel in depth. I decided to write this article to explain “Linux Processes” simply and concisely. The topic itself is broad and is not explained into the deepest of it, but essential for Linux Administrators, Developers and even Linux users to appreciate the beauty of the Kernel they make use of every day.

NGINX for Deploying Next.js Application on AWS EC2 with AWS ELB — Control and Stability of Deployments

I was looking for an article like this a few days ago, which I didn’t find at that time, so I did the deployment on my own and came up with this article to prevent other developers from saving those efforts and focusing on development. I am not explaining every single step and have provided links for references. I prefer manual deployment of applications over automated (and even serverless) methods. Although they are convenient and require less effort by the developers, they are bound to the providers and offer less control over the underlying system.

Configuring and Building the Linux Kernel — Absolute Guide to Compiling Your Kernel

Linux Kernel is an Open-Source Software and the user is free to modify and customise it as per the requirements. The modification of the Kernel requires a deep understanding of the working of the Kernel, although patches are available to make the Kernel optimised for specific hardware. Linux Kernel Source Code has various options to configure the drivers, modules, preferences on hardware options, etc. This part can be studied by the user and is pretty much easy to work with.

The Elegance of the Linux Kernel — A Concise History of Unix and the Creation of the Linux Kernel

Introduction and Context I was going through the book “Linux Kernel Development” by Robert Love, an absolute guide to getting started with Linux Kernel Development and a highly recommended book for understanding the core of the Linux Kernel. Linux Kernel has been one of the most important software ever written and is even considered one of the biggest projects ever undertaken by a single person. The idea of the Linux Kernel was initiated by Linus Torvalds, a student from the University of Helsinki and is maintained by him to date (while writing this article).

Linux Shell Scripting — A Suckless and Concise Guide to the Command-line of Linux

Prior Statements: This is a concise guide on the Linux Shell Scripting while consolidating all the facts about the Linux Shell for quick developer’s reference while using Linux. I am referencing the Bash (Bourne-Again Shell) which is the default shell for Linux-based systems. I will also be providing references and external links to dive into depth and not fill the article with too much explanation about a single topic which is not universally required by all the readers.

Suckless Utilities for Arch Linux — The Most Minimal Way Run a Computer

Suckless utilities have been my favourite at this time and kind of essentials for my use of the computer. I have been using Arch Linux for a fair amount of time now and I started using it with XFCE for few weeks. I would appreciate the XFCE desktop environment for it’s smoothness and light-weight nature with works really fine when newly shifting on Arch Linux. But then I learnt the suckless ecosystem and eventually shifted to it as my full-time environment.

Installing Pacman in Arch Linux — When You Blow it Up

Let me suckless and divide the article into two parts: My story how I blew up Pacman Package Manager How to reinstall the Pacman Package Manager If you only care about the second part, skip the first one. The Scenario — Blow it Up I was trying to install the pacman game from the Internet to get it running on my Arch Linux Terminal (I use Suckless Terminal BTW). When I got it installed and played it, it was super awesome.

Boot Process of Computers — A Learner’s Perspective Of Exploring the Depth of Computers

Prior Clarifications: Here, I will be providing a philosophical explanation about the bootloaders and understanding them in a simple and as minimal way as possible. This is not supposed to be a manual for bootloader or provide any advice for experimenting over your live system. It’s my journey to understand computers (one of the most complex creations of mankind) and I will be stating my thoughts. Take it with a pinch of salt.

Networking Fundamentals for Linux Administrators — A Suckless and Concise Explanation

Statistics are clear on the fact that 96.3% (while writing this article) of the servers use Linux as their Operating System which is no doubt what every other Linux user on this Earth expects. I believe that the Linux Administrator has to take the shot about the configuration of Networking in Linux Based Server. Some of the underlying concepts remain the same for any other distros but it is mainly intended for Linux.

Operating Systems and Low-Level Access to the Hardware — Why should you learn it?

Today, I completed the whole read of the book “Linux Kernel in a Nutshell” by Greg Kroah-Hartman and I highly recommend that you go through it if you want to understand how to build your custom configuration of Linux Kernel and all you need to know about all the nuts and bolts. It’s always great to have such handbooks around the desk. This blog is about why it’s so awesome to look into the operating system you are using with your hardware and why have a grasp on the Low-Level aspects of a computer.

Arch Linux Custom Builds — Freedom of the Operating System

While writing this blog, I was reading the book “Linux Kernel in a Nutshell” by Greg Kroab-Hartman and as far as the pages of the book are concerned, it seems to be a two-day read (this is a handbook so reading it once and having around the desk is super useful). By the way, the author has the book left open for download http://www.kroah.com/lkn/ so check that out if you want to follow up.

Bypassing the Linux Login to access the files (with Physical Access), even the root!

Imagine being away from the computer for a couple of minutes and getting to know that the system has been compromised and a backdoor has been installed into the system. “The system was locked?” doesn’t matter, without the bios security implementation (which most probably would not be implemented), all the files can be recovered without any login made to the Login Screen. This goes with the story of me trying to get my Wi-Fi troubleshooting in Arch Linux where I was trying to upgrade the Kernel of my System to get the Wi-Fi working properly (as mentioned in the previous blog.

Networking Fundamentals for Linux Administrators — A Suckless and Concise Explanation

Planted January 10, 2024

Statistics are clear on the fact that 96.3% (while writing this article) of the servers use Linux as their Operating System which is no doubt what every other Linux user on this Earth expects. I believe that the Linux Administrator has to take the shot about the configuration of Networking in Linux Based Server. Some of the underlying concepts remain the same for any other distros but it is mainly intended for Linux.

“An idiot admires complexity, a genius admires simplicity, a physicist tries to make it simple, for an idiot anything the more complicated it is the more he will admire it, if you make something so clusterfucked he can’t understand it he’s gonna think you’re a god cause you made it so complicated nobody can understand it. That’s how they write journals in Academics, they try to make it so complicated people think you’re a genius” — Terry Davis, Creator of Temple OS

Prior Statements before proceeding: I would like to keep it simple and suckless to make it a real practical and useful article which would get your things done. Use this as a reference or guide to proceed with. This contain less about the command and more emphasis on consice theorotical explanation of networking topics in the Linux perspective.

Introduction to Linux Networking

Networking is at the heart of Linux and is expandable through Kernel modules as per the user’s requirements. To work over the networks, one system must continuously run server processes in the background. These are called “daemons”. Example: “named” which translates IP addresses to human-readable names.

Unix networking commands are based on Internet Protocols which are standardised as per the industry requirements. Hence, these support the TCP/IP stack with most of its commands. So any network engineers can have a good familiarity with the underlying processes happening.

The core of the TCP/IP stack — Essentials for Linux Networking

TCP/IP stack is a suite of communications protocols that define how different computers can talk. TCP refers to the Transmission Control Protocol which is a reliable way of sending packets in the network and ensuring that the packet reaches safely. More of the protocols that come under the TCP/IP protocol suite are:

(I have provided here WikiPedia Links for all of them. It’s not like I don’t want to explain them at all, it’s just I don’t want to explain them here. It’s a quick guide so WikiPedia I found the most relevant source for you to go into depth and research more)

IP Addressing Concepts for Linux Networking

IP (Internet Protocol) Addresses are universally recognised concepts and are used to differentiate devices on the Network. There are two types of IP Addresses: IPV4 and IPV6.

  • IPV4: 4 bytes (32-bits) Address, each byte splitted with a period notation. Contains a network part and host part. Network goes on the left and Host goes on the right side. The biforgation is made with the Subnet mask which separated them. More reference for table on WikiPedia Link: Classful Network
  • IPV6: 16 bytes (128-bits) Address, which is more advance and next version of IPV4 which solves the problem of running out of IPs. IPV4 addresses can be packed to IPV6. The Concept of CIDR extends the use of Subnets and removes most of the boundations put forward by the Classful Network. Example, 192.168.32.1/24 and 128.66.128.1/17 use CIDR notation.

ISPs provide mostly provide Dynamic Addresses to the users. These IP address may change without warnings so incase you need a Static IP address for any purpose, contact the ISP to allocate a Static IP address. These address don’t change and hence, things like DNS registration of IP address becomes more easy since the IP is not gonna change.

Gateways and Routing for Linux Networking

A Gateway stands as a resolution for the address that are not on the Network and routes the traffic out into the Internet. Each portion of a network that is under a separate local administration is called an autonomous system (AS).

Gateway Protocols

EGP (Exterior Gateway Protocol) BGP (Border Gateway Protocol) RIP (Routing Information Protocol) Hello Protocol OSPF (Open Shortest Path First) Routing Daemons exists in the Linux System like quagga and GNU Zebra which work with these protocols and handle the routing configuration of the system. routed, a network routing daemon uses RIP to allow a host to function as only an interior gateway and manages the Internet Routing Tables

Routing Tables: Routing tables provide information needed to route packets to their destinations like the destination network, gateway to use, the route status as well as the number of packets transmitted.

Name Service — DNS and BIND for Linux Networking

DNS (Domain Name System) is a distributed database of information about the hosts on a network. It is responsible for resolving the IP Addresses of domain names provided by the user and communicate with the right client. BIND refers to (Berkeley Internet Name Domain) which is a popular implementation of DNS.

The nameserver of a domain is responsible for keeping the names of the machine in its domain. Other nameservers on the network forward requests for these machines to this nameserver.

Configuring TCP/IP for Linux Networking

Network Interfaces are the ways in which the softwares uses the hardware to achieve it’s purpose. It depends on the Network Card installed, like a Wireless Network Card or an Ethernet Network Card. With ip command, you can configure the network interface of the device like assigning anIP address, netmask, etc.

Firewalls and Masquerading

A firewall is responsible for protecting the internal network from other sources with configurations and rules to determine weather the packet to allow or block. Firewalls can be applied on the gateway to protect the network from Internet Threats or on the Local System to protect the single system from network based attacks. iptables command on Linux provides a way to configure rules in the system.

NFS (Network File System) for Linux Networking

The Network File System which is referred as NFS is a protocol for the usage of network attached storage devices to mount to the system as they where on there local system. NFS is an RPC-based application-level protocol.

The /etc/exports file is the NFS server configuration file; it controls which files and directories are exported and which kinds of access are allowed. Names and addresses for clients that should be allowed or denied access to NFS are kept in the /etc/hosts.allow and /etc/hosts.deny files.

NFS Server daemons, called nfsd daemons, run on the server and accept RPC calls from clients. NFS servers also run mountd daemon to handle mount requests. Clients use rpcbind daemon to work with NFS server.

Conclusion

These were the absolutely essential concepts for Linux Network written in as concise and suckless as possible. I would consider writing each of these concept in-depth in other articles. This was a quick reference for engineers on Network Concepts for Linux as well as a beginning guide starting to learn Networking for Linux.