<?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 Md. Ishraque Bin Shafique on Medium]]></title>
        <description><![CDATA[Stories by Md. Ishraque Bin Shafique on Medium]]></description>
        <link>https://medium.com/@ibshafique?source=rss-a7dd0dd25d4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9ljQym2_oqxx7Cwl</url>
            <title>Stories by Md. Ishraque Bin Shafique on Medium</title>
            <link>https://medium.com/@ibshafique?source=rss-a7dd0dd25d4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:59:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ibshafique/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[Secure and Seamless: Mastering GitHub Authentication with SSH Keys]]></title>
            <link>https://medium.com/@ibshafique/secure-and-seamless-mastering-github-authentication-with-ssh-keys-f0441d6bfcee?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0441d6bfcee</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[repositories]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 18:32:45 GMT</pubDate>
            <atom:updated>2023-06-22T18:32:45.313Z</atom:updated>
            <content:encoded><![CDATA[<p>GitHub has removed the option to use password based authentication from August, 2021. They have taken this step in order to make it more secure. Passwords can be easily stolen using popular hacking techniques. However, using of <strong><em>GPG Keys</em></strong> or <strong><em>SSH Keys</em></strong> are very much secure and are more easier to manage. According to their official blogpost, tokens offer a number of security benefits over password-based authentication:</p><blockquote><strong>1. Unique</strong> — tokens are specific to GitHub and can be generated per use or per device</blockquote><blockquote><strong>2. Revocable</strong> — tokens can can be individually revoked at any time without needing to update unaffected credentials</blockquote><blockquote><strong>3. Limited</strong> — tokens can be narrowly scoped to allow only the access necessary for the use case</blockquote><blockquote><strong>4. Random</strong> — tokens are not subject to the types of dictionary or brute force attempts that simpler passwords that you need to remember or enter regularly might be</blockquote><p>Sometimes, things can get very confusing for new-comers to the World of GitHub to setup their first repository due to this restriction. This post attempts to simplify the steps to setup a password-less authentication using SSH Keys.</p><p><strong><em>Step-1: Creating SSH Keys:</em></strong></p><blockquote>ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa_github</blockquote><p>This will create two files, namely id_rsa_github and id_rsa_githib.pub.</p><p><strong><em>Step-2: Copying public key to GitHub</em></strong></p><p>Go to the <strong><em>Settings </em></strong>on the upper right corner of your GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*d59kM-CsZQ0lOK2zH2_AUA.png" /></figure><p>Then go to <strong><em>SSH and GPG keys.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*Sn-Vy_vZJVHlqN7mTNNL4g.png" /></figure><p>Click on <strong><em>New SSH Key</em></strong> and then paste the contents of i<strong><em>d_rsa_github.pub</em></strong> into it. Give a name to your SSH keys. In this example, the key is identified by <em>laptop</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*9R_MEe0GRBgwGhkCSRCRyg.png" /></figure><p>After adding the SSH key, you may have to provide GitHub password and/or OTP from Authenticator app for verification.</p><p><strong><em>Step-3: SSH into GitHub</em></strong></p><p>SSH into GitHub by executing the following command:</p><blockquote>ssh git@github.com</blockquote><pre>[ibshafique@test-vm]# ssh git@github.com<br>PTY allocation request failed on channel 0<br>Hi ibshafique! You&#39;ve successfully authenticated, but GitHub does not provide shell access.<br>Connection to github.com closed.</pre><p>Congratulations! You have now successfully setup password-less GitHub authentication.</p><p><em>P.S. You may keep a backup of the SSH Keys in a private repository in GitHub.</em></p><p><strong><em>References:</em></strong></p><ol><li><a href="https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/">https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/</a></li><li><a href="https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/#what-you-need-to-do-today">https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/#what-you-need-to-do-today</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0441d6bfcee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Linux Network Namespaces: Creating and Communicating with Isolated Network Environments]]></title>
            <link>https://medium.com/@ibshafique/exploring-linux-network-namespaces-creating-and-communicating-with-isolated-network-environments-b6b68a69d5ee?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6b68a69d5ee</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[linux-networking]]></category>
            <category><![CDATA[linux-containers]]></category>
            <category><![CDATA[namespaces]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 14:26:30 GMT</pubDate>
            <atom:updated>2023-06-19T13:56:35.537Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>What are Namespace in Linux?</em></strong></p><p>Namespaces in Linux are a powerful feature of the Linux kernel that allow for the partitioning of kernel resources, enabling different sets of processes to perceive and access distinct sets of resources. This partitioning is achieved by assigning different namespaces to specific sets of resources, providing isolation and separation between them. Resources such as process IDs, hostnames, user IDs, file names, and network access names can exist in multiple namespaces.</p><p>Linux namespaces play a crucial role in containerization in Linux, as they enable the creation of isolated environments where processes can operate independently from one another. By utilizing namespaces, containers can have their own unique set of resources, providing encapsulation and isolation for applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PFIfDunlt4O-1zKq" /><figcaption>Photo by <a href="https://unsplash.com/@rumpf?utm_source=medium&amp;utm_medium=referral">Christina Rumpf</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this article, we will delve into the world of Linux namespaces, exploring their significance, benefits, and practical applications. We will learn how to create multiple isolated network namespaces, demonstrating how they can be used to establish independent network environments. Additionally, we will explore techniques for communication between these namespaces, providing a comprehensive understanding of how to manipulate and leverage Linux network namespaces effectively.</p><p>Network namespaces play a crucial role in Kubernetes for several reasons:</p><ol><li>Isolation: Kubernetes leverages network namespaces to provide isolation between different pods. Each pod in Kubernetes has its own network namespace, which ensures that the network resources, such as IP addresses and network routes, are isolated from other pods. This isolation prevents conflicts and interference between pods, allowing them to operate independently.</li><li>Network Policies: Network namespaces enable the implementation of network policies in Kubernetes. Network policies define the rules and restrictions for network traffic within the cluster, specifying which pods can communicate with each other and which protocols and ports are allowed. By associating network policies with specific network namespaces, Kubernetes allows fine-grained control over network traffic within the cluster.</li><li>Routing and Connectivity: Network namespaces enable the routing of network traffic within the Kubernetes cluster. Each pod has its own network namespace with a unique IP address, and Kubernetes uses network namespaces to ensure that traffic is directed to the appropriate pod. This enables seamless connectivity between pods and facilitates reliable communication across the cluster.</li><li>Network Plugin Integration: Kubernetes provides a pluggable network architecture, allowing various network plugins to be integrated with the cluster. Network plugins interact with network namespaces to implement networking features specific to the underlying infrastructure, such as software-defined networking (SDN) or virtual overlay networks. By leveraging network namespaces, these plugins can create virtual networks and manage network resources efficiently.</li><li>Network Functionality Testing: Network namespaces are valuable for testing and validating network functionality within Kubernetes. They allow developers and operators to create isolated network environments and simulate complex network topologies, enabling thorough testing of network policies, routing configurations, and connectivity scenarios.</li></ol><p><strong><em>What are Virtual Ethernet (v-eth)?</em></strong></p><p>In Linux networking, “Virtual Ethernet” refers to a mechanism that allows the creation of virtual network interfaces that behave like physical Ethernet interfaces. These virtual interfaces are commonly known as “virtual Ethernet interfaces” or “virtual Ethernet pairs.”</p><p>Virtual Ethernet interfaces are created using software tools and techniques, such as bridge interfaces, tunneling, or virtualization technologies. They enable the establishment of logical connections between different network entities, even if they are not physically connected.</p><p>One common use case for virtual Ethernet interfaces is network bridging. Bridge interfaces connect two or more physical or virtual network interfaces, allowing them to function as a single logical interface. This facilitates communication between devices or networks that are connected to different interfaces but need to be part of the same network segment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*nfGNItro9CusZySgM7WLVw.png" /></figure><p><strong><em>Lets get our hands dirty!</em></strong></p><p>For this lab we are using a Ubuntu 22.04.2 LTS (Jammy Jellyfish) VM. We have switched to root user and assumed the following environmental variables:</p><pre>nameSpace1=&quot;red&quot;<br>nameSpace2=&quot;blue&quot;<br>vEth1=&quot;veth-red&quot;<br>vEth2=&quot;veth-blue&quot;<br>ipAddr1=&quot;192.168.10.1/24&quot;<br>ipAddr2=&quot;192.168.10.2/24&quot;<br>ip1=&quot;192.168.10.1&quot;<br>ip2=&quot;192.168.10.2&quot;</pre><p>Step-1: Creating The Two Network Namespaces</p><pre>ip netns add $nameSpace1<br>ip netns add $nameSpace2</pre><p>Step-2: Creating and connecting the two v-eth cables</p><pre>ip link add $vEth1 type veth peer name $vEth2</pre><p>Step-3 Attach the two ends of the v-eth cables to the namespaces</p><pre>ip link set $vEth1 netns $nameSpace1<br>ip link set $vEth2 netns $nameSpace2</pre><p>Step-4: Assigning IP Addresses Two The Virtual Interfaces</p><pre>ip -n $nameSpace1 addr add $ipAddr1 dev $vEth1<br>ip -n $nameSpace2 addr add $ipAddr2 dev $vEth2</pre><p>Step-5: Bringing Up The Interfaces</p><pre>ip -n $nameSpace1 link set $vEth1 up<br>ip -n $nameSpace2 link set $vEth2 up</pre><p>Step-5: Adding correct routes</p><pre>ip netns exec $nameSpace1 ip route add default via $ip1 dev $vEth1<br>ip netns exec $nameSpace2 ip route add default via $ip2 dev $vEth2</pre><p>Checking connectivity</p><pre>root@test-vm:~# ip netns exec $nameSpace1 ping $ip2 -c 10<br>PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data.<br>64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=0.023 ms<br>64 bytes from 192.168.10.2: icmp_seq=2 ttl=64 time=0.084 ms<br>                          ...<br>64 bytes from 192.168.10.2: icmp_seq=9 ttl=64 time=0.057 ms<br>64 bytes from 192.168.10.2: icmp_seq=10 ttl=64 time=0.070 ms<br><br>--- 192.168.10.2 ping statistics ---<br>10 packets transmitted, 10 received, 0% packet loss, time 9207ms<br>rtt min/avg/max/mdev = 0.023/0.083/0.152/0.031 ms</pre><p>To remove the two network namespaces, execute the following:</p><pre>ip netns del $vEth1; ip netns del $vEth2</pre><p>Putting it all together:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e06839bf7a9d22cfd8b79e8f5a0f8384/href">https://medium.com/media/e06839bf7a9d22cfd8b79e8f5a0f8384/href</a></iframe><p><strong><em>Takeaways From This Demo?</em></strong></p><ol><li>Get an insight on Linux NameSpaces and their uses.</li><li>How to create network namespaces in Linux.</li><li>How to create v-eth cables and attach the two different network Namespaces.</li></ol><p><strong><em>References:</em></strong></p><ol><li><a href="https://developers.redhat.com/blog/2018/10/22/introduction-to-linux-interfaces-for-virtual-networking#vxcan"><em>https://developers.redhat.com/blog/2018/10/22/introduction-to-linux-interfaces-for-virtual-networking#vxcan</em></a></li><li><a href="https://man7.org/linux/man-pages/man7/namespaces.7.html"><em>https://man7.org/linux/man-pages/man7/namespaces.7.html</em></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6b68a69d5ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All About Traceroute]]></title>
            <link>https://medium.com/@ibshafique/all-about-traceroute-4d81707d0d7c?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d81707d0d7c</guid>
            <category><![CDATA[tcp-ip-model]]></category>
            <category><![CDATA[traceroute]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Fri, 14 Jan 2022 19:58:39 GMT</pubDate>
            <atom:updated>2022-01-14T20:08:27.258Z</atom:updated>
            <content:encoded><![CDATA[<p>A Very Handy Tool For Network Diagnosis</p><p>Traceroute is a computer network diagnosis tool for measuring the time it takes for data packets to travel from one hop to the next in Internet Protocol network.</p><p>This utility is implemented by a clever trick involving the TTL header in IP. This is the “Time To Live” of an IP packet. The name can be confusing. It’s not a temporal measure but rather a number representing the number of hops an packet can take before it is dropped. The key to traceroute is that when a packet is dropped, the device that drops the packet sends an “ICMP TTL Expired in Transit” message back to the originator of the packet. (It’s possible to disable this behaviour which makes devices appear as unknown in traceroute.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Ae48aVZvSP94is4.png" /><figcaption>IPV4 Packet Header</figcaption></figure><p>Traceroute uses this function by sending packets towards the destination with increasing TTL’s. The first packet is sent with a TTL of 1. This means the first router will drop the packet and send and ICMP message back. This ICMP message will have the source IP of the router that dropped the packet, so traceroute learns the IP of the first router.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZthRDF9VoQHVc8DJPdMLfA.png" /><figcaption>How Traceroute works</figcaption></figure><p>Traceroute then sends out a packet with a TTL of 2, so the second router will drop the packet and send back an ICMP messages. This process continues until the packet reaches the destination address.</p><p>On Unix-like operating systems, traceroute sends, by default, a sequence of <em>User Datagram Protocol (UDP)</em> packets, with destination port numbers ranging from 33434 to 33534. On Windows however, tracert sends ICMP Echo Request packets, rather than the UDP packets traceroute sends by default.</p><p><strong><em>A Practical Example</em></strong></p><p>The following shows the output to running the traceroute program to trace the pathway to the Google DNS (8.8.8.8) as an example.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af87b0ab3e0bbcb40da09c092a1f974f/href">https://medium.com/media/af87b0ab3e0bbcb40da09c092a1f974f/href</a></iframe><ol><li>The source address will make a packet with the destination IP address of 8.8.8.8 and a destination port number between 33434 to 33534. And the important thing it does is to make the TTL Value 1.</li><li>Of course, the packet will reach the gateway server. On receiving the packet, the gateway server will reduce the TTL by 1 (All routers/hops in between does this job of reducing the TTL value by 1). Once the TTL is reduced by the value of 1 (1–1= 0), the TTL value becomes zero. Hence the gateway server will send back a TTL Time exceeded message.</li><li>On receiving this TTL Time exceeded message, the traceroute program will come to know the source address and other details about the first hop (which is the gateway server.)</li><li>Now the traceroute program will again send the same UDP packet with the destination of 8.8.8.8, and a random UDP destination port between 33434 to 33534. But this time it will make the initial TTL 2. This is because the gateway router will reduce it by 1 and then forward that same packet to the next hop/router (the packet sent by the gateway to its next hop will have a TTL value of 1).</li><li>On receiving the UDP packet, the next hop to the gateway server will once again reduce it to 1 which means now the TTL has once again become 0. Hence it will send back an ICMP Time exceeded message with its source address, and also the first 28-byte header of the packet which is sent.</li><li>On receiving that message of TTL Time Exceeded, the traceroute program will come to know about that hop/router’s IP address.</li><li>Now again the traceroute program will make a similar UDP packet with again a random UDP port with the destination address of 8.8.8.8. But this time the TTL value is made to 3 so that the TTL will automatically become 0 when it reaches the third hop/router.</li><li>When the original receiver (8.8.8.8) gets the UDP packet, it will send an “ICMP Destination/PORT Unreachable” message. This is bound to happen because the traceroute program is sending a random UDP port between 33434 to 33534. On the destination server-side, there is no one listening on that port. As a result, an “ICMP Destination/PORT Unreachable” message is sent to the source address.</li></ol><p><strong><em>How to use traceroute?</em></strong></p><pre><strong><em>traceroute -w 3 -q 1 -m 16 -n facebook.com<br>====================================================================</em></strong></pre><pre>-I   -&gt; use ICMP packets<br>-m x -&gt; m number of hops instead of 30<br>-n   -&gt; donot resolve hostname<br>-p   -&gt; destination port<br>-q x -&gt; x number of queries per hop instead of 3<br>-T   -&gt; use TCP packets<br>-U   -&gt; use UPD packets<br>-w x -&gt; wait x seconds instead of 5</pre><p><strong><em>References</em></strong></p><ol><li><a href="https://www.redhat.com/sysadmin/ping-traceroute-netstat"><em>Red Hat Sysadmin Blogs; Ping, traceroute, and netstat: The network troubleshooting trifecta</em></a></li><li><a href="https://obkio.com/blog/traceroutes-what-are-they-and-how-do-they-work/"><em>Obkio Blogs; What is a Traceroute and How Do Traceroutes Work?</em></a></li><li><a href="https://archive.nanog.org/meetings/nanog47/presentations/Sunday/RAS_Traceroute_N47_Sun.pdf"><em>A Practical Guide to (Correctly) Troubleshooting with with Traceroute</em></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d81707d0d7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hashing, Encryption, Encoding, Obfuscation?]]></title>
            <link>https://medium.com/@ibshafique/hashing-encryption-encoding-obfuscation-7271e994cb5e?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7271e994cb5e</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Wed, 12 Jan 2022 10:31:11 GMT</pubDate>
            <atom:updated>2022-01-12T10:31:11.187Z</atom:updated>
            <content:encoded><![CDATA[<h4>Which is what and when do we use them?</h4><p>Before diving deep into the crazy world of hashes, encryption, cryptography and other such tongue twisting complex terms, one should understand the concept of handling data safely and securely without it being compromised in anyways.</p><p>With the emergence of ultra high speed internet and the <em>Internet of Things (IoT)</em>, people are becoming more reliant on passing on information to the internet. This possesses a major security threat to the users and a challenge for the companies who handle them. Companies need to make sure that their clients’ data are kept <em>Confidential</em>, the <em>Integrity</em> of their data is ensured and the data can be made <em>Available</em> whenever needed.</p><p><strong><em>CIA Triad</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5nOofcRmvZjTQwVR.png" /><figcaption>The CIA Triad</figcaption></figure><p>The three terms; <em>Confidentiality, Integrity, and Availability together forms the CIA Triad. </em>This is the cornerstone of any organization’s security infrastructure; in fact, they (should) function as goals and objectives for every security program.</p><p><em>Confidentiality</em></p><p>Confidentiality refers to an organization’s efforts to keep their data private or secret. In practice, it’s about controlling access to data to prevent unauthorized disclosure. As an example, only authorized Payroll employees should have access to the employee payroll database. Furthermore, within a group of authorized users, there may be additional, more stringent limitations on precisely which information those authorized users are allowed to access. Another example: it’s reasonable for eCommerce customers to expect that the personal information they provide to an organization (such as credit card, contact, shipping, or other personal information) will be protected in a way that prevents unauthorized access or exposure.</p><p><em>Integrity</em></p><p>Data integrity is about ensuring that data has not been tampered with and, therefore, can be trusted. It is correct, authentic, and reliable. eCommerce customers, for example, expect product and pricing information to be accurate, and that quantity, pricing, availability, and other information will not be altered after they place an order. Banking customers need to be able to trust that their banking information and account balances have not been tampered with. Ensuring integrity involves protecting data in use, in transit (such as when sending an email or uploading or downloading a file), and when it is stored, whether on a laptop, a portable storage device, in the data center, or in the cloud.</p><p>To protect the integrity of an organization’s data, they can use hashing, encryption, digital certificates, or digital signatures. For websites, they can employ trustworthy <em>Certificate Authorities (CAs)</em> that verify the authenticity of the website so visitors know they are getting the site they intended to visit.</p><p><em>Availability</em></p><p>Even if data is kept confidential and its integrity maintained, it is often useless unless it is available to those in the organization and the customers they serve. This means that systems, networks, and applications must be functioning as they should and when they should. Also, individuals with access to specific information must be able to consume it when they need to, and getting to the data should not take an inordinate amount of time.</p><p>A natural disaster like a flood or even a severe snowstorm may prevent users from getting to the office, which can interrupt the availability of their workstations and other devices that provide business-critical information or applications. Availability can also be compromised through deliberate acts of sabotage, such as the use of <em>Denial-of-Service (DoS)</em> attacks or ransomware.</p><p><strong><em>Hashing</em></strong></p><p>Cryptography uses hashing to confirm that a file is unchanged or in other words it is done to check for integrity of a file. The simple explanation is that the same hashing method is used on a file at each end of an Internet download. The file is hashed on the web server by the web administrator, and the hash result is published. A user downloads the file and applies the same hash method. The hash results, or <em>checksums</em>, are compared. If the checksum of the downloaded file is the same as that of the original file, then the two files are identical, and there have been no unexpected changes due to file corruption, man-in-the-middle attacks, etc. Technically, hashing takes arbitrary input and produce a fixed-length string that has the following attributes:</p><ol><li>The same input will always produce the same output.</li><li>Multiple disparate inputs should not produce the same output.</li><li>It should not be possible to go from the output to the input.</li><li>Any modification of a given input should result in drastic change to the hash.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3XYxd-5RsRIgptKMsUVVzQ.png" /><figcaption>How Hashing Works</figcaption></figure><p>Hashing is a one-way process. The hashed result cannot be reversed to expose the original data. The checksum is a string of output that is a set size. Technically, that means that hashing is not encryption because encryption is intended to be reversed (decrypted).</p><p>The two common types of Hashing are:</p><ol><li><em>Message Digest 5 Algorithm (MD5)</em></li><li><em>Secure Hash 256 bit (SHA256)</em></li></ol><p>SHA256 generates a bigger hash, and may take more time and computing power to complete. It is considered to be a more secure approach.</p><p><strong><em>Encryption</em></strong></p><p>Encryption is a procedure in which data is scrambled in such a way such that only the intended persons can retrieve and understand the information. It requires the use of a cryptographic key: a set of mathematical values that both the sender and the recipient of an encrypted message agree on.</p><p>Encryption is a systematic procedure and only the intended recipient with the proper decryption key can turn the encrypted data to plain text. The keys are complex enough that a third party is highly unlikely to decrypt or break the ciphertext by guessing the key. Data can be encrypted “<em>at rest</em>” when it is stored, or “<em>in transit</em>” while it is being transmitted somewhere else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1uqQ6Jvf71LrujEbwsfXGQ.png" /><figcaption>Symmetric Encryption</figcaption></figure><p>The two main kinds of encryption are:</p><ol><li>Symmetric Encryption</li><li>Asymmetric Encryption (Public Key Encryption)</li></ol><p>In symmetric encryption, there is only one key, and all communicating parties use the same (secret) key for both encryption and decryption. In asymmetric there are two keys: one key is used for encryption, and a different key is used for decryption. The decryption key (private key) is kept private, while the encryption key (public key) is shared publicly, for anyone to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJpp3OTvUe4iheUPSsY6eA.png" /><figcaption><em>Asymmetric Encryption (Public Key Encryption)</em></figcaption></figure><p>Commonly used symmetric encryption algorithms include:</p><ul><li>AES</li><li>3-DES</li><li>SNOW</li></ul><p>Commonly used asymmetric encryption algorithms include:</p><ul><li>RSA</li><li>Elliptic curve cryptography</li></ul><p><strong><em>Encoding</em></strong></p><p>Encoding is a procedure where data is transformed from one format to another so that it can be transferred in a more convenient way. The algorithm that is used to encode the data is used to decode it as well. Examples: ASCII, Unicode, URL Encoding, Base64</p><p><strong><em>Obfuscation</em></strong></p><p>The purpose of obfuscation is to make something harder to understand, usually for the purposes of making it more difficult to attack or to copy. One common use is the the obfuscation of source code so that it’s harder to replicate a given product if it is reverse engineered. It, like encoding, can often be reversed by using the same technique that obfuscated it. Other times it is simply a manual process that takes time to work through. Another key thing to realize about obfuscation is that there is a limitation to how obscure the code can become, depending on the content being obscured.</p><pre><strong>Original code:</strong></pre><pre>var myStr=&quot;document.write(&#39;My Code&#39;);<br>eval(myStr);<br></pre><pre><strong>Obfuscated code:</strong></pre><pre>var yq=&quot;de&#39;)&quot;;<br>var sq=&quot;doc&quot;; <br>var sm=&quot;ument&quot;;<br>var kw=&quot;(&#39;My Co&quot;;</pre><pre>var myStr= sq + sm + &quot;.write&quot; + kw + yq;<br>eval(mystr);</pre><p><strong><em>References</em></strong></p><ol><li><a href="https://www.ibm.com/blogs/cloud-computing/2018/01/16/drive-compliance-cloud/"><em>IBM Blogs, 3 key ideas to help drive compliance in the cloud</em></a></li><li><a href="https://www.f5.com/labs/articles/education/what-is-the-cia-triad"><em>F5 Labs Education Articles, What is the CIA Triad?</em></a></li><li><a href="https://www.fortinet.com/resources/cyberglossary/cia-triad"><em>Fortinet Resources,What is the CIA Triad and Why is it important?</em></a></li><li><a href="https://www.redhat.com/sysadmin/hashing-checksums"><em>Red Hat Articles, An introduction to hashing and checksums in Linux</em></a></li><li><a href="https://blog.cloudflare.com/keeping-passwords-safe-by-staying-up-to-date/"><em>The Cloudflare Blog, Keeping passwords safe by staying up to date</em></a></li><li><a href="https://us.norton.com/internetsecurity-privacy-what-is-encryption.html"><em>Norton Security Center, What is encryption and how does it protect your data?</em></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7271e994cb5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Linux Boot Process]]></title>
            <link>https://medium.com/@ibshafique/the-linux-boot-process-180fb07af452?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/180fb07af452</guid>
            <category><![CDATA[linux-kernel]]></category>
            <category><![CDATA[system]]></category>
            <category><![CDATA[linux-boot-process]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Sat, 08 Jan 2022 16:35:57 GMT</pubDate>
            <atom:updated>2022-01-08T16:35:57.478Z</atom:updated>
            <content:encoded><![CDATA[<h4>From the time the power button is pushed, till the Welcome Screen is displayed</h4><p>To an average computer user, the process of powering on the computer seems very mundane. Simply push the power button, wait a few seconds and the Welcome Screen is displayed. But for system admins and hardcore Linux enthusiasts, the booting of a Linux system is quite a complex one; a labyrinth between thousands of lines of codes and a couple of dozens of files making sure that the system starts smoothly. The aim of this article is to depict these complex steps into a high-level overview for beginners and experts al-alike.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*sjr7OoJ3xS5VZxoZ6_YF6w.png" /><figcaption>Simplified Linux boot process</figcaption></figure><p><strong><em>Basic Input Output System (BIOS)</em></strong></p><p>The BIOS is a set of instructions that is written on very low level language. It is the first program installed in computers even before the OS. BIOS is stored in a non-volatile memory called <strong>Erasable Programmable Read-only Memory (EPROM)</strong> chip and the configuration settings of BIOS is stored in the <strong>Complementary Metal-Oxide Semiconductor (CMOS)</strong> flash memory.</p><p>The lifetime of a CMOS battery is around 10 years. When the battery drains out, CMOS is reset, losing all the custom settings and system clock. It’s a regular practice to remove the battery to recall CMOS settings if there is a configuration problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yw__PUMPPXm4HGJGRMKPwA.png" /><figcaption>Differences of BIOS and CMOS</figcaption></figure><p>When the computer is powered on, the CPU approaches the BIOS to check if all the basic hardware required to start the computer is ready. This checking is known as the <strong>Power of Self Test (POST)</strong>. POST process only happens when performing a so-called “<em>cold boot</em>” (turning on a powered off system); a “<em>warm boot</em>” (i.e. restarting the computer) leaves a special flag in the BIOS non-volatile memory that bypasses this task of checking.</p><p>The POST checks are performed majorly on:</p><ul><li>Hardware elements like processor, storage devices and memory.</li><li>Basic System Devices like keyboard, and other peripheral devices.</li><li>CPU Registers</li><li>DMA (Direct Memory Access)</li><li>Timer</li><li>Interrupt controller</li></ul><p>When POST is successfully finalized, bootstrapping is enabled. Bootstrapping starts the initialization of the OS. The process of booting from disk works by loading its first sector to memory known as <strong>Master Boot Record (MBR)</strong> and trying to execute it. If it fails, it tries the next device until it runs out; if no device able to boot is found, it gives the user an error and stops. The first boot sector it finds that contains a valid boot record is loaded into RAM and control is then transferred to the code that was loaded from the boot sector.</p><p><strong><em>Master Boot Record (MBR)</em></strong></p><p><em>Master Boot Record (MBR) </em>or the primary bootloader is the first sector of the <strong>Hard Disk Drive (HDD)</strong>. Its physical location is in the cylinder 0, head 0, sector 1. It stores the partition table and bootloader information. The MBR is only 512 bytes in size and contains machine code instructions for booting the machine, called a boot loader, along with the partition table. The first 446 bytes are the primary boot loader, which contains both executable code and error message text. The next 64 bytes are the partition table, which contains a record for each of 4 partitions (16 Bytes each). The MBR ends with 2 bytes that are defined as the magic number (0xAA55). The magic number serves as a validation check of the MBR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/0*MJoduGW4F8tb1eRI" /><figcaption>Anatomy of Master Boot Record, <a href="https://developer.ibm.com/articles/l-linuxboot/">original source</a></figcaption></figure><pre><strong>To view the contents of the MBR:</strong></pre><pre><em>sudo dd if=/dev/nvme0n1 of=mbr.bin bs=512 count=1</em></pre><pre><em>od -xa mbr.bin</em></pre><p>The <em>dd</em> command reads the first 512 bytes from /dev/nvme0n1and writes them to the <em>mbr.bin</em> file. The <em>od</em> command prints the binary file in hex and ASCII formats.</p><p>The job of <em>MBR</em> is to find and load the secondary boot loader. It does this by looking through the partition table for an active partition. When it finds an active partition, it scans the remaining partitions in the table to ensure that they’re all inactive. When this is verified, the active partition’s boot record is read from the device into RAM and executed.</p><p><strong><em>GRand Unified Bootloader (GRUB)</em></strong></p><p>The secondary bootloader is called the kernel loader. The task of this is to load the Linux kernel and optional initial RAM disk. The first- and second-stage boot loaders combined are called GRand Unified Bootloader (GRUB). GRUB includes knowledge of Linux file systems. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. It does this by making the two-stage boot loader into a three-stage boot loader. Stage 1 (MBR) boots a stage 1.5 boot loader that understands the particular file system containing the Linux kernel image.</p><p>GRUB cannot fit in the 446 bytes of the MBR. To locate and load the kernel, GRUB needs to support dozens of file systems and features such as encryption, software RAID and LVM.</p><p>GRUB loads itself into memory in the following stages:</p><p><strong>The Stage 1</strong> or primary boot loader is read into memory by the BIOS from the MBR. The primary boot loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the Stage 1.5 or Stage 2 boot loader.</p><p><strong>The Stage 1.5</strong> boot loader is read into memory by the Stage 1 boot loader, if necessary. Some hardware requires an intermediate step to get to the Stage 2 boot loader. This is sometimes true when the /boot/ partition is above the 1024 cylinder head of the hard drive or when using <strong>Logical Block Addressing (LBA)</strong> mode. The Stage 1.5 boot loader is found either on the /boot/ partition or on a small part of the MBR and the /boot/ partition.</p><p><strong>The Stage 2</strong> or secondary boot loader is read into memory. It displays a list of available kernels (defined in /etc/grub.conf, with soft links from /etc/grub/menu.lst and /etc/grub.conf). This interface allows the user to select which kernel or operating system to boot, pass arguments to the kernel, or look at system parameters.</p><pre><strong>How To Change The GRUB Background Image</strong></pre><pre>To change the background image of GRUB, the configuration file is opened at /etc/default/grub.cfg and the following is appended:</pre><pre><em>echo “GRUB_BACKGROUND=&lt;path-to-the-image&gt;” &gt;&gt; /etc/default/grub.cfg</em></pre><pre>To update the new configuration,the following is used:</pre><pre><em>sudo update-grub</em></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BMl8zObUlEcU32uB" /><figcaption>A modified GRUB menu</figcaption></figure><p>The secondary boot loader reads the operating system or kernel as well as the contents of /boot/sysroot/ into memory. Once GRUB determines which operating system or kernel to start, it loads it into memory and transfers control of the machine to that operating system.</p><p><strong><em>Kernel</em></strong></p><p>All of the kernels are in a self-extracting, compressed format to save space. The kernels are located in the /boot directory, along with an initial RAM disk image, and device maps of the hard drives.</p><p>After the selected kernel is loaded into memory and begins executing, it must first extract itself from the compressed version of the file before it can perform any useful work. Once the kernel has extracted itself, it loads systemd, which is the replacement for the old SysV init program, and turns control over to it.</p><p>This is the end of the boot process. At this point, the Linux kernel and systemd are running but unable to perform any productive tasks for the end user because nothing else is running.</p><p><strong><em>Init</em></strong></p><p>After the kernel is booted and initialized, the kernel starts the first user-space application. This is the first program invoked that is compiled with the standard C library. Prior to this point in the process, no standard C applications have been executed.</p><p>In a desktop Linux system, the first application started is commonly /sbin/init. But it need not be. Rarely do embedded systems require the extensive initialization provided by <em>init</em> (as configured through /etc/inittab). In many cases, you can invoke a simple shell script that starts the necessary embedded applications.</p><p>Some of most important tasks performed by init are as following:</p><ul><li>Check the root file system and remount it in read/write mode. Up to this point, root file system is mounted in read-only mode.</li><li>Check and mount additional file systems.</li><li>Initialize network cards. Some processes are triggered by the network card initialization, such <em>ntpdate</em> (used to synchronize local time with a network time server).</li><li>Start daemons. Some daemons support the system processes, such as <em>crond</em> and <em>syslogd</em>. Some allow remote access, such as <em>sshd</em> and <em>telnetd</em>. And some represent actual network services such as <em>named</em> and <em>httpd</em>.</li><li>Sets <em>getty</em> on physical or virtual terminals. This allows the user connected to a terminal to login and use the shell.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iUqw78Q0YK0jE6MKxk_8sA.png" /><figcaption><em>Comparison of SystemV runlevels with systemd targets and some target aliases</em></figcaption></figure><p>After the <em>sysinit.target</em> is fulfilled, systemd next starts the <em>basic.target</em>, starting all of the units required to fulfill it. The basic target provides some additional functionality by starting units that re required for the next target. These include setting up things like paths to various executable directories, communication sockets, and timers.</p><p>When one of these targets is reached, then startup has completed. If the <em>multi-user.target</em> is the default, then a text mode login is displayd on the console. If <em>graphical.target</em> is the default, then a graphical login is diplayed; the specific GUI login screen will depend on the default display manager that is used.</p><p><strong><em>References:</em></strong></p><ol><li><a href="https://cloudchef.medium.com/linux-boot-process-part-1-e8fea015dd66"><em>Linux Boot Process — Part 1</em></a></li><li><a href="https://cloudchef.medium.com/linux-boot-process-part-2-bd7514913495"><em>Linux Boot Process — Part 2</em></a></li><li><a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/reference_guide/pt-system-reference"><em>Red Hat Product Documentation, System Reference</em></a></li><li><a href="https://developer.ibm.com/articles/l-linuxboot/"><em>IBM Articles, Inside the Linux Boot Process</em></a></li><li><a href="https://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-rg-en-4/s1-grub-whatis.html"><em>MIT Articles RHEL 4 Reference Guide Chapter 2: The GRUB Boot Loader</em></a></li><li><a href="https://www.oreilly.com/library/view/unix-and-linux/9780134278308/"><em>UNIX and Linux System Administration Handbook, 5th Edition</em></a></li></ol><p><strong><em>The Scary TLDR:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*qdntCfi8fNxT-x0S.png" /><figcaption>The Linux Boot Process, <a href="https://cloudchef.medium.com/linux-boot-process-part-2-bd7514913495">original source</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=180fb07af452" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Swap Memory]]></title>
            <link>https://medium.com/@ibshafique/linux-swap-memory-really-worth-it-245fabb87f10?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/245fabb87f10</guid>
            <category><![CDATA[linux-kernel]]></category>
            <category><![CDATA[computer-memories]]></category>
            <category><![CDATA[swap-memory]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[paging-library]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 11:06:27 GMT</pubDate>
            <atom:updated>2021-12-29T08:37:33.999Z</atom:updated>
            <content:encoded><![CDATA[<h4>Really Worth It?</h4><p>Usually computers have two types of memories; Random Access Memory (RAM) which is a volatile memory. The second type uses magnetic Hard Disk Drives (HDDs) or Solid State Drives (SSDs) which are non-volatile to create a logical memory space known as the swap space.</p><p>Volatile memory cannot retain data. Whenever the system is switched off or rebooted, all of the contents of the memory is wiped off! On the contrary, data persists for a longer period of time on non-volatile memory. The computer cannot directly access any data from HDDs or SSDs. The application data from them should be copied first to the RAM before the CPU can access it.</p><p>Sometimes, memory intensive workloads such as in memory database like SAP HANA, in memory analytics tools, new generation games, web browsers etc. can take up a lot of memory and create a choke-point for the system which hinders it performance. The primary function of swap memory is to substitute disk space for RAM memory when real RAM fills up and more space is needed. The kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. This process of copying pages from the RAM to the physical storage drive is known as swapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RIcHLHZuxQrIPo6l" /><figcaption>A command line tool such as htop can be used to monitor memory usage</figcaption></figure><p>Swapping also comes along with some downside. The most notable is that being a space in the storage drive, it is a few thousand times slower than the RAM! Memory speeds can be measured in nanoseconds, while storage are measured in milliseconds. As more swapping occurs, the system gradually becomes slower. <strong><em>Thrashing</em></strong> can occur when total virtual memory, both RAM and swap space, become nearly full. The system spends so much time paging blocks of memory between swap space and RAM and back that little time is left for real work.</p><p><strong><em>Types of Swap Memories</em></strong></p><p>There are two types of swap memories in Linux systems. Swap partition and swap files. As the names suggest, one of them is a standard Linux partition, the other is a file. Both of them work in a much similar manner with a very minor differences in most regular use cases. System now a days can utilize both, but there is a growing trend of using the swap file system as it is more reliable and easier to use. Many of the reasons why swap partitions were preferred in the past seem to have changed over the years, and a swap file makes for a simpler setup. Obviously there are still cases in which a swap partition would be better than a swap file, but they tend to be more specialized cases.</p><p><strong><em>Right Size of Swap Memory</em></strong></p><p>The right size of swap memory is a debate worthy topic. There is no fixed thumb rule for this. Generally in the good old days, when systems had very little RAM such as 128MB swap was very necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*pos0GlYtVXCDUVDWjAQYhA.png" /><figcaption>Ideal Swap Memory Size for Computers</figcaption></figure><p>The table above shows the ideal swap memory size for computers now-a-days. Even though, this opinion might vary from person to person. This table has been compiled after going through a lot of documentations of industry leading minds.</p><p><strong><em>Is Swap Memory Really Worth It?</em></strong></p><p>This again is a matter of debate. Since most of the modern day systems have quite a large amount of RAM, swap memory’s role is becoming arguable. With the RAMs becoming so efficient and the CPUs becoming so much faster and the emergence of newer technologies such as zRAM and sRAM, this topic is getting quite complex. The author however, personally has a 16GB swap space activated ;)…</p><p>Two very interested write-ups on this topic can be found in:</p><p><a href="https://chrisdown.name/2018/01/02/in-defence-of-swap.html"><em>1. In defence of swap: common misconceptions</em></a></p><p><a href="http://All about Linux swap space"><em>2. All about Linux swap space</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=245fabb87f10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installation of Ubuntu Linux With Full Encrypted Disk & Custom Partition Tables]]></title>
            <link>https://medium.com/@ibshafique/installation-of-ubuntu-with-full-encrypted-disk-custom-partition-tables-57f68929efba?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/57f68929efba</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[swap-memory]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[disk-encryption]]></category>
            <category><![CDATA[linux-partition]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Tue, 07 Dec 2021 17:08:49 GMT</pubDate>
            <atom:updated>2021-12-29T08:37:55.475Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is Full Disk Encryption (FDE)?</strong></p><p>Full-disk encryption (FDE) is encryption at the hardware level. FDE works by automatically converting data on a hard drive into a form that cannot be understood by anyone who doesn’t have the key to “undo” the conversion. Without the proper authentication key, even if the hard drive is removed and placed in another machine, the data remains inaccessible. FDE can be installed on a computing device at the time of manufacturing or it can be added later on by installing a special software driver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MOBiBEE8JUiV9WVP" /><figcaption>Photo by <a href="https://unsplash.com/@hongqi?utm_source=medium&amp;utm_medium=referral">Bruce Hong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Why is FDE required?</strong></p><p>FDE is particularly very useful for portable devices such as laptops. With FDE a person can guarantee that their data cannot be accessed by anyone even if they have access to the device physically. Some compliance policies such as HIPAA and PCI require users to implement FDE in their computers which add a layer of security.</p><p><strong>Pros and Cons of FDE:</strong></p><p>Pros:</p><ol><li>Simplest method of deploying encryption.</li><li>Transparent to applications, databases, and users.</li><li>High-performance, hardware-based encryption.</li></ol><p>Cons:</p><ol><li>No data protection in transit. Means sharing data will not be encrypted.</li><li>It causes an insignificant performance penalty.</li><li>If you forget your passphrase you are doomed! (if you don’t back up or add multiple keys).</li><li>Password management is tricky. Users should generate a strong passphrase and cannot change it frequently as the whole disk would encrypt again with the new key generated by the new passphrase.</li></ol><p><strong>What is Linux Unified Key Setup (LUKs)?</strong></p><p>Linux Unified Key Setup (LUKs) is the standard for Linux hard disk encryption. LUKs stores all information necessary to encrypt the partition header, enabling the user to access their data seamlessly.</p><p><strong>Installing Ubuntu With Full Disk Encrption</strong></p><p>Ubuntu can be installed very easily with FDE using the installation wizard within the LiveOS environment. However, there is a drawback in this method. The three partitions are created automatically according to the disk size. This article will demonstrate how to manipulate the partition according to the user’s wish and also custom resize the swap memory.</p><p>The process of making a live bootable disk is skipped as this is very and is extensively documented in the internet. <a href="https://itsfoss.com/create-live-usb-of-ubuntu-in-windows/">Here is an article which can be of help if one still needs to get a quick review of it.</a> Follow up to the part where the live disk is prepared and then booted from.</p><p>This article will demonstrate the procedure by making a Virtual Machine with a disk of size 80.0GB. The following shows the partition table of this 80.0GB disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*nVQR_89hE8SUwFI5Tz5H7w.png" /><figcaption>Partition table for the Virtual Machine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*mkRXapLt7qcVMpfYdzJVyQ.png" /><figcaption>Install Ubuntu is selected when prompted with the menu</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*CRk2_pZUvGqK-kaKqWFrUw.png" /><figcaption>The desired keyboard layout is selected</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*EH27mNYZWleChZI6YMGqsQ.png" /><figcaption>Minimal Installation is selected for simplicity of demonstration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*DIENi0Y3F4K0amspibPuAA.png" /><figcaption>Something else is selected for custom partitions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nOe8MSjnOscV3-Y9aAH-fg.png" /><figcaption>New Partition Table is selected and then Continue</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*wVse9nSJpQRLe9czL134vQ.png" /><figcaption>free space is highlighted and then a new partition is added</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*dwZqptubVjqWUHFVqDS3EA.png" /><figcaption>Partition size, type and mount point is set as shown</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*8jaTHehODapEOWTogSif6g.png" /><figcaption>another new partition is added from the free space</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*hVGAmeiJ3PM7wah9kc4Nsw.png" /><figcaption>Partition size, type and mount point is set as shown</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*KzD9_akOCyhSAivqUdh7Xg.png" /><figcaption>encrypted partition is added from the free space</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*BYCGQTnKjsRSSTnpwMBLAA.png" /><figcaption>Security key is provided as users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*W3Zm3w_ANom1Va_BoJ7wIg.png" /><figcaption>The encrypted partition is highlighted and mounted to /</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*Rqv64CIfHWG0cB0jCO8o1g.png" /></figure><p>Then the installation wizard will guide through the rest of the installation which is intuitive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*wzZ1LmZ4AqqcalZW0iHxaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*0zCTXgzyxWIDMMYciD0c4g.png" /><figcaption>FDE security key is asked at startup</figcaption></figure><p>After a successful login, a quick update and upgrade is carried out by following command in the terminal:</p><p><em>sudo apt update; sudo apt upgrade -y</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*WZv2a4r8_3srF118VVv7Nw.png" /><figcaption>The installation is complete as per requirement</figcaption></figure><p><strong>Resizing the Swap Memory</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*BdNppj0M_DNLtrwaW6KluA.png" /><figcaption>The default swap partition is 2.0GB which will be resized</figcaption></figure><p>Disable all swap memory files or partions with:</p><blockquote>sudo swapoff -a</blockquote><p>Creating a swapfile of size 16.0GB:</p><blockquote>sudo dd if=/dev/zero of=/swapfile bs=1024M count=16 status=progress</blockquote><p>Changing the permission of the /swapfile file:</p><blockquote>sudo chmod 600 /swapfile</blockquote><p>Setting up the file /swapfile as a swap file:</p><blockquote>sudo mkswap /swapfile</blockquote><p>Mounting the swap file onto the system:</p><blockquote>sudo swapon /swapfile</blockquote><p>To view that the swap has been mounted properly:</p><blockquote>sudo swapon --show<br>top -b | head -n 10</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*TA0TFdK4nMb8Jyed4VRK4Q.png" /><figcaption>The swap partition has been resized to 16.0GB</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57f68929efba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Essential Smart Phone Applications For Your Amateur Radio Operations]]></title>
            <link>https://medium.com/@ibshafique/10-essential-smart-phone-applications-for-your-amateur-radio-operations-cbb723f34030?source=rss-a7dd0dd25d4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbb723f34030</guid>
            <category><![CDATA[ham-radio]]></category>
            <category><![CDATA[smartphones]]></category>
            <category><![CDATA[amateur-radio]]></category>
            <dc:creator><![CDATA[Md. Ishraque Bin Shafique]]></dc:creator>
            <pubDate>Tue, 08 Sep 2020 08:16:43 GMT</pubDate>
            <atom:updated>2020-09-08T09:20:12.802Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*OB-_vQRX7M47RlkFrVWt_g.jpeg" /><figcaption>My Favourite Smartphone Apps For Amateur Radio Operation</figcaption></figure><p>The inception of Amateur Radio can be looked back to the late 19th century. The Amateur Radio practice that we see in the modern days have evolved a lot from its earlier days. This is mainly due to the advancements in digital electronics and digital signal processing. Our radios are getting smaller and more intelligent day by day. Amateur Radio has branched out from its old path of walk and we see integration of computers, single board computers such as Raspberry Pi and BeagleBone and mobile computing devices such as smart phones and tablets.</p><p>Smart phones now a days plays a very important role in our daily lives. It also has a major role in Amateur Radio operation due to its portability, low power consumption, Since I am an Android user, I am going to focus on Android applications in this write-up.</p><blockquote><strong>GPS Status &amp; Toolbox</strong></blockquote><blockquote><strong>what3words</strong></blockquote><blockquote><strong>Ham QTH Locator</strong></blockquote><blockquote><strong>ISS Detector</strong></blockquote><blockquote><strong>Morse Code</strong></blockquote><blockquote><strong>SSTV Encoder</strong></blockquote><blockquote><strong>Robot36 - SSTV Image Decoder</strong></blockquote><blockquote><strong>Echolink</strong></blockquote><blockquote><strong>Hamsphere</strong></blockquote><blockquote><strong>RF Analyzer</strong></blockquote><p><em>GPS Status &amp; Toolbox</em></p><p>This is an app that I have been using for almost half a decade now. The app nicely displays all the sensory data from the mobile into a nice UI which includes compass, GPS co-ordinates, speed, bearing, gyro and accelerometer data etc.</p><p><a href="https://play.google.com/store/apps/details?id=com.eclipsim.gpsstatus2&amp;hl=en">GPS Status &amp; Toolbox - Apps on Google Play</a></p><p><em>what3words</em></p><p>I found what3words very interesting. This app uses a rather modern approach to define one’s location using the GPS. No matter where you are in the Planet, you can easily define your location to your friends and family using only three words. For example as I write this article sipping through a mug of coffee, my GPS co-ordinates are 23°45&#39;22.4&quot;N, 90°22&#39;29.3&quot;E. This surely is long and inconvenient to share with your friends over a voice call. However, using the what3words app, you can easily define these co-ordinates simply with just three words!</p><p>23°45&#39;22.4&quot;N,90°22&#39;29.3&quot;E turns to “delusions.remove.tucked”</p><p><a href="https://play.google.com/store/search?q=what3words&amp;c=apps&amp;hl=en">what3words - Android Apps on Google Play</a></p><p><em>Ham QTH Locator</em></p><p>Ham QTH Locator is another easy to use app to determine your position in GPS co-ordinates as well as Maidenhead Squares. The app can also be used to set a target QTH which you can use to determine the bearing to rotate your directional antenna towards the destination.</p><p><a href="https://play.google.com/store/apps/details?id=b4a.wwlocator&amp;hl=en">Ham QTH Locator - Apps on Google Play</a></p><p><em>ISS Detector</em></p><p>On the first week of September, Amateur Radio on the International Space Station (ARISS) implemented the voice repeater system in International Space Station (ISS). Since then, Amateur Operators all over the World are busy satellite DX’ing. ISS Detector will automatically determine the next few ISS overhead passes according to your geographic location and remind you of the incidents. This is an essential app to have if you want to make contacts with Amateur Operators onboard ISS too.</p><p><a href="https://play.google.com/store/apps/details?id=com.runar.issdetector&amp;hl=en">ISS Detector: See the Space Station and satellites - Apps on Google Play</a></p><p><em>Morse Code</em></p><p>For newbies into CW, Morse Code app is very helpful. It can convert text to morse and vice versa. There is also an option included to change the transmission either into sound or light (using the camera flash).</p><p><a href="https://play.google.com/store/apps/details?id=morsecode.ort.com.morse&amp;hl=en">Morse Code - Apps on Google Play</a></p><p><em>SSTV Encoder</em></p><p>The easiest way that you can think of to send a SSTV transmission to Amatuer Operators any where is using the SSTV Encoder app. Connect the phone with the microphone of your radio using an audio cable. Then start the app, take a photo or upload an image from your smartphone gallery, select the mode and hit the play button!</p><p><em>NB. Please remember to press the PPT; orelse you will not transmit in to the air!</em></p><p><a href="https://play.google.com/store/apps/details?id=om.sstvencoder&amp;hl=en">SSTV Encoder - Apps on Google Play</a></p><p><em>Robot36-SSTV Image Decoder</em></p><p>This app is a decoder of received SSTV transmissions. Keep you phone connected to your radio’s speaker output with an audio cable, the application will automatically decode the transmission and convert it to an image. So simple!</p><p><a href="https://play.google.com/store/apps/details?id=xdsopl.robot36&amp;hl=en">Robot36 - SSTV Image Decoder - Apps on Google Play</a></p><p><em>Echolink</em></p><p>Echolink is one of the earliest adaptation of Internet of Things (IoT) in Amateur Radio Operations. This system connects a radio to the internet so that Amateur Operators all over the World can talk to one another even if one party do not have any radio. Just using a smartphone, you can connect to radios in different corners of the world.</p><p><a href="https://play.google.com/store/apps/details?id=org.echolink.android&amp;hl=en">EchoLink - Apps on Google Play</a></p><p><em>Hamsphere</em></p><p>Hamsphere is all about virtual radio communication. I would recommend anyone who is just starting or interested to learn Amateur Radio Operations should join Hamsphere and practice with people all over the World. I have made contacts (QSO) with veteran HAMS who are in this field for more than 50 years!</p><p><a href="https://play.google.com/store/apps/details?id=com.hamsphere.android.hs4hf&amp;hl=en">HamSphere 4.0 Mobile - Apps on Google Play</a></p><p><em>RF Analyzer</em></p><p>Want a portable SDR scanner that you can carry in your pockets? Connect your SDR to your smartphone with an USB-OTG cable and you are ready to go! Listen to your favourite FM channels, weather stations or your local repeaters.</p><p><a href="https://play.google.com/store/apps/details?id=com.mantz_it.rfanalyzer&amp;hl=en">RF Analyzer - Apps on Google Play</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbb723f34030" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>