<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="https://trevorsmale.github.io/techblog/xml/base.min.xml"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Notes on Tech Blog</title><link>https://trevorsmale.github.io/techblog/tags/notes/</link><description>Recent content in Notes on Tech Blog</description><generator>Hugo 0.128.0</generator><language>en-us</language><lastBuildDate>Tue, 15 Oct 2024 00:00:00 +0000</lastBuildDate><atom:link rel="self" href="https://trevorsmale.github.io/techblog/tags/notes/feed.xml" type="application/rss+xml"/><item><title>ProLUG SEC Unit 10 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc10/</link><pubDate>Tue, 17 Jun 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc10/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc10/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>This is the final Unit and close to the Linux Security Course. Though we did not have labs for this Unit, we did spend a lot of time reflecting.&lt;/p>
&lt;h2 id="closing-thoughts">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc10/#closing-thoughts">Closing Thoughts&lt;/a>
&lt;/h2>
&lt;p>I recently finished the first ProLUG Security Engineering Course, designed and delivered by Scott Champine, also known as Het Tanis, from ProLUG. It ran for about 10 weeks and clocked in at roughly 100 hours of focused effort—but honestly, I probably put in more than that once you count the spontaneous study sessions and the many side discussions that came up. A small group of us showed up consistently and really dug into the material, connecting ideas and bouncing thoughts off each other.&lt;/p>
&lt;p>The course itself was free and not tied to any official institution, but it was taught by a seasoned industry professional who also teaches at the post-secondary level. Scott clearly cares about the subject and about helping others understand it. That came through in how he delivered the material, and it brought out a real sense of commitment in us too.&lt;/p>
&lt;p>On top of just taking the course, I also helped shape it for future learners by starting a version-controlled course book. We had a small group that met weekly to go over edits and review pull requests. A few people even joined just to learn Git so they could contribute, which added to the sense of shared effort and made the experience even better.&lt;/p>
&lt;p>One of the things that helped me stay on track was having a study group. There’s a lot of sharp, motivated people in the ProLUG community, and quite a few of them kept up a steady pace through both the course and the book. The regular check-ins and shared discussions made a big difference.&lt;/p>
&lt;p>The course itself covered a wide range of topics and gave me a stronger sense of how enterprise security is put together, maintained, and kept resilient. Security isn’t just about ticking boxes—it touches every part of a system. Especially with Linux, where multiple users and external inputs are constantly in play, it doesn’t take much for something to go sideways if you’re not paying attention.&lt;/p>
&lt;p>We worked through the process of hardening Linux systems using STIGs—basically long, detailed lists of potential vulnerabilities and how to guard against them. It’s not fast work, but it really forces you to think about each configuration choice.&lt;/p>
&lt;p>Patching was another major topic, and not in the usual “just update it” way. We talked about how every change introduces risk, and how important it is to approach patching as part of a controlled, planned process. That includes things like internal repositories, known-good system images, and minimizing surprise behavior from updates.&lt;/p>
&lt;p>We also got hands-on with locking down systems: managing ingress and egress, shutting off unnecessary ports, setting up bastion hosts, and building out logging and alerting. We even worked on ways to trap misbehaving users or bots inside chroot jails. One of the others in the group even automated that process with a Bash script for their final project.&lt;/p>
&lt;p>We had deep conversations about monitoring too—things like how to design alerts that people can actually respond to, without burning out from constant noise. We looked at log filtering, storage, and what makes a log useful rather than just more clutter.&lt;/p>
&lt;p>We also talked about automation and how it can sometimes get away from you. It’s easy for parts of a system to drift out of spec if you’re not careful, especially with orchestration tools. So we looked at how to use infrastructure-as-code and version control to make changes traceable and systems more predictable.&lt;/p>
&lt;p>Toward the end of the course, we focused on trust, keys, and certificates. We got practical—generating and managing key pairs, breaking them, fixing them, and eventually building up to TLS certificates. These exercises helped drive home how trust is managed inside systems, especially in setups that lean toward zero trust.&lt;/p>
&lt;p>Before this course, I already had a decent background in cybersecurity—some labs, a few certifications—but this gave me something more solid. I now feel like I understand what it means to build security into a system, rather than just bolt it on. I’m more confident setting up and maintaining a hardened Linux environment, and more thoughtful about how to track and manage change over time.&lt;/p>
&lt;p>That said, I don’t think I’ve “arrived.” If anything, this course just made me more aware of how much I still have to learn. I’ve moved into that space where I know what I don’t know, and that’s a valuable place to be. It’ll take years to keep digging through it all, but now I’ve got a better starting point—and the confidence to figure things out when new challenges come up.&lt;/p>
&lt;p>All in all, this course gave me a deeper appreciation for operational security, and it left me with some solid tools I’ll continue to use. Like with the Admin course before it, I really valued the people I got to work with. I expect we’ll keep exploring these topics together for a long time. And, like always, you make a few good friends along the way.&lt;/p>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc10/#discussion-post-1">Discussion Post 1&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How many new topics or concepts do you have to go read about now?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answers&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;code>TLS&lt;/code> Transport Layer Security: Prior to the course, I was aware of the terminology and had a 30,000 Foot conceptual view. During this course, I was able to zoom in an take a look at the transport and the layers. However, given the shear scale and complexity of the topic. I will have to read through the &lt;code>1.1&lt;/code>, &lt;code>1.2&lt;/code> and &lt;code>1.3&lt;/code> Specifications. One of my favorite IT Authors Michael W. Lucas has a book for sale on the topic. &lt;a href="https://www.tiltedwindmillpress.com/product/tls/">https://www.tiltedwindmillpress.com/product/tls/&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>ZT&lt;/code> Zero Trust: I get from a high level view as well. I learned that Zero Trust is a popular buzz-word or a form of jargon for most. Actually drilling down and understanding the many forms and configurations of a &lt;code>ZT&lt;/code> network is an immense undertaking. On the side I had done some additional reading about it, for example, I read through some of &lt;a href="https://www.cisa.gov/sites/default/files/2023-04/CISA_Zero_Trust_Maturity_Model_Version_2_508c.pdf">https://www.cisa.gov/sites/default/files/2023-04/CISA_Zero_Trust_Maturity_Model_Version_2_508c.pdf&lt;/a>
and plan to dig deeper into the subject.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Tokenization&lt;/code> &amp;amp; &lt;code>Data Masking&lt;/code> are two interesting topics. If anyone can recommend materials, I am interested. So far I have just found Wikipedia for the explanations.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>SSO&lt;/code> Single Sign On: I found this book: &lt;a href="https://fw2s.com/wp-content/uploads/2017/09/definitive-guide-to-single-sign-on.pdf">https://fw2s.com/wp-content/uploads/2017/09/definitive-guide-to-single-sign-on.pdf&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>DMARC&lt;/code> Domain-based Message Authentication Reporting &amp;amp; Conformance: I do have the book &lt;code>Run your own mail server&lt;/code> by Michael W. Lucas. I am assuming he covers the topic to some degree.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>SPF&lt;/code> Sender Policy Framework: Which should be covered by the aforementioned book as well.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>CVSS&lt;/code> Common Vulnerability Scoring System: I found this paper on the matter, it is a technical specification. &lt;a href="https://www.first.org/cvss/v3-1/cvss-v31-specification_r1.pdf">https://www.first.org/cvss/v3-1/cvss-v31-specification_r1.pdf&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>TSDB's&lt;/code> Time Series Databases: I have heard the concept from this course and in game development. I think the concept is easy to grasp. But I would like to investigate further.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What was completely new to you?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;code>STIGS&lt;/code> for sure. Just prior to starting the course, I was given a glimpse of the Stig&amp;rsquo;ing process. In the course we were tasked with getting the StigViewer working, downloading specific STIG&amp;rsquo;s and Implementing hardening while answering prompts about what specifically we were doing. It really helped to have finished the admin course prior to this as it made the objectives more clear to me.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Bastions Hosts&lt;/code> Prior to using the one implemented on Scott&amp;rsquo; own server, I had not seen this. Drilling into the concept and creating a Bastion in the lab was a nice intro.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is something you heard before, but need to spend more time with?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>I had heard the Acronyms for many of the concepts prior to this course. In my answer to &lt;code>Question #1&lt;/code>, I had already detailed what I will need to dig into after the course is complete.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc10/#discussion-post-2">Discussion Post 2&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Scenario&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Think about how the course objectives apply to the things you’ve worked on.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How would you answer if I asked you for a quick rundown of how you would
secure a Linux system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>First, I’d check open ports using &lt;code>ss -ntulp&lt;/code> to see what services are listening and close anything unnecessary.&lt;/li>
&lt;li>Next, I’d check how many user accounts exist by running &lt;code>cat /etc/passwd | wc -l&lt;/code>, and optionally review users with high UIDs to see who has real login access.&lt;/li>
&lt;li>I’d confirm that root login over SSH is disabled by checking &lt;code>/etc/ssh/sshd_config&lt;/code> and setting &lt;code>PermitRootLogin no&lt;/code>.&lt;/li>
&lt;li>Then I’d check for any accounts with empty passwords using &lt;code>awk -F: '($2 == &amp;quot;&amp;quot;) { print $1 }' /etc/shadow&lt;/code>.&lt;/li>
&lt;li>I’d list which users have sudo access by checking the &lt;code>sudo group&lt;/code> or reviewing &lt;code>/etc/sudoers&lt;/code>.&lt;/li>
&lt;li>I would review running services with &lt;code>systemctl list-units --type=service&lt;/code> and disable anything that isn’t needed.&lt;/li>
&lt;li>Then I’d make sure a firewall is enabled and configured, using &lt;code>firewalld&lt;/code>, &lt;code>ufw&lt;/code>, or &lt;code>iptables&lt;/code>, depending on the system.&lt;/li>
&lt;li>I’d update all packages using the system’s package manager like dnf, apt, or yum to ensure known vulnerabilities are patched.&lt;/li>
&lt;li>I’d also check file permissions on sensitive files like &lt;code>/etc/shadow&lt;/code> and &lt;code>/home/* directories&lt;/code>.&lt;/li>
&lt;li>If SSH is exposed, I’d install and configure &lt;code>fail2ban&lt;/code> to protect against brute-force login attempts.&lt;/li>
&lt;li>I’d regularly check system logs like /var/log/auth.log or use &lt;code>journalctl&lt;/code> to spot anything suspicious.&lt;/li>
&lt;li>Lastly, I’d run a tool like Ansible Lock-Down to audit and find common misconfigurations.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How would you answer if I asked you why you are a good fit as a security
engineer in my company?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Though I am not a seasoned Security Engineer, I possess a solid understanding of Linux, system hardening, and monitoring techniques, along with a strong foundation in high-level concepts related to ensuring security, reliability, and confidentiality in systems and networks. I am a diligent learner and a prolific documenter, always striving to deepen my knowledge and contribute meaningfully to operational resilience and security best practices.&lt;/p>
&lt;p>&lt;code>Frame&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Think about what security concepts you think bear the most weight as you
put these course objectives onto your resume.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Which would you include?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>I would perhaps list generalities&lt;/p>
&lt;ul>
&lt;li>Linux System Security Auditing&lt;/li>
&lt;li>Linux System Hardening&lt;/li>
&lt;li>Linux System Monitoring&lt;/li>
&lt;li>Linux System Access Control&lt;/li>
&lt;li>Encryption &amp;amp; Certificate Management&lt;/li>
&lt;li>Infrastructure Security Governance Compliance&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Which don’t you feel comfortable including?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Network Security&lt;/li>
&lt;li>Transport Layer Security&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc10/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG SEC Unit 9 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc9/</link><pubDate>Sat, 31 May 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc9/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc9/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>In this Unit we look at how Certificates and Keys go beyond Asymmetric encryption with Public / Private. We look at how multiple checks and multiple layers of trust must be used in this mad mad world. &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc9/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>How do these topics align with what you already know about system security?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Well I had felt like I had a clear picture of &lt;code>Symmetric&lt;/code> and &lt;code>Asymmetric&lt;/code> encryption modalities. Furthermore, I had a strong prior understanding of &lt;code>x.509&lt;/code> and &lt;code>SSH&lt;/code> where Asymmetric encryption is used. Moreover, the procedure of generating Private and subsequent public keys. However, the verbosity and complexity of the required reading has me scratching my head and looking at more sophisticated modality of key generation and exchange eg. &lt;code>TLS 1.2, 1.3&lt;/code>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Were any of the terms or concepts new to you?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>&lt;code>key-transport and/or key-agreement protocols&lt;/code> - a method of establishing a shared secret key between two or more parties
where one party creates the key and securely delivers it to the others.&lt;/p>
&lt;p>&lt;code>Challenge Values&lt;/code> - dynamic, randomly generated numbers or strings used to initiate authentication.&lt;/p>
&lt;p>&lt;code>nonce&lt;/code> - a unique, random or pseudo-random number used to ensure the security and integrity of data transmitted over a network.
Watch short video about CA and Chain of Trust
Distributed Trust Model
Review the TLS Overview section, pages 4-7 of
&lt;a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf">https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf&lt;/a>
and answer the following questions.
What are the three subprotocols of TLS?
How does TLS apply
Confidentiality
Integrity
Authentication
Anti-replay&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What are the three subprotocols of TLS?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>&lt;code>The handshake&lt;/code> used to negotiate the session parameters.&lt;/p>
&lt;p>&lt;code>Change cipher spec&lt;/code> used in TLS 1.0, 1.1, and 1.2 to change the cryptographic parameters of a session.&lt;/p>
&lt;p>&lt;code>Alert protocols&lt;/code> used to notify the other party of an error condition.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>How does TLS apply to:
Confidentiality
Integrity
Authentication
Anti-replay&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>&lt;code>Confidentiality&lt;/code>&lt;/p>
&lt;p>Confidentiality is provided for a communication session by the negotiated encryption algorithm
for the cipher suite and the encryption keys derived from the master secret and random values.&lt;/p>
&lt;p>&lt;code>Integrity&lt;/code>&lt;/p>
&lt;p>TLS uses a cipher suite of algorithms and functions, including key establishment, digital signature, confidentiality, and integrity algorithms. In TLS 1.3, the master secret is derived by iteratively invoking an extract-then-expand function with previously derived secrets, used by the negotiated security services to protect the data exchanged between the client and the serve. In TLS 1.3, only AEAD symmetric algorithms are used for confidentiality and integrity.&lt;/p>
&lt;p>&lt;code>Authentication&lt;/code>&lt;/p>
&lt;p>Server authentication is performed by the client using the server’s public-key certificate, which
the server presents during the handshake.&lt;/p>
&lt;p>&lt;code>Anti-Replay&lt;/code>&lt;/p>
&lt;p>in TLS 1.3 The integrity-protected envelope of the message contains a monotonically increasing sequence number. Once the message integrity is verified, the sequence number of the current message is compared with the sequence number of the previous message.&lt;/p>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc9/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>TLS&lt;/code> (Transport Layer Security) A protocol that encrypts data in transit to ensure privacy and integrity.&lt;/li>
&lt;li>&lt;code>Symmetric Keys&lt;/code> A cryptographic method where the same key is used for both encryption and decryption.&lt;/li>
&lt;li>&lt;code>Asymmetric Keys&lt;/code> A method using a public/private key pair where one key encrypts and the other decrypts.&lt;/li>
&lt;li>&lt;code>Non-Repudiation&lt;/code> A guarantee that a sender cannot deny the authenticity of their message or signature.&lt;/li>
&lt;li>&lt;code>Anti-Replay&lt;/code> A mechanism that prevents attackers from reusing valid data packets to mimic legitimate transactions.&lt;/li>
&lt;li>&lt;code>Plaintext&lt;/code> Data in a readable and unencrypted format.&lt;/li>
&lt;li>&lt;code>Cyphertext&lt;/code> Data that has been encrypted and is unreadable without the correct decryption key.&lt;/li>
&lt;li>&lt;code>Fingerprints&lt;/code> Short unique representations (hashes) of public keys used to verify their authenticity.&lt;/li>
&lt;li>&lt;code>Passphrase (in key generation)&lt;/code> A user-supplied string that encrypts private keys to protect them from unauthorized access.&lt;/li>
&lt;/ul>
&lt;h3 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc9/#lab-">Lab 🧪&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Assignment&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Complete the lab: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/211-setting-up-rsyslog-with-tls">https://killercoda.com/het-tanis/course/Linux-Labs/211-setting-up-rsyslog-with-tls&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>We generated a 90 day TLS web client certificate. I saved a snippet of the options below.&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">Activation/Expiration time.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">The certificate will expire in &lt;span class="o">(&lt;/span>days&lt;span class="o">)&lt;/span>: &lt;span class="m">90&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Extensions.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Does the certificate belong to an authority? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Path length constraint &lt;span class="o">(&lt;/span>decimal, -1 &lt;span class="k">for&lt;/span> no constraint&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Is this a TLS web client certificate? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> IPsec IKE operations? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Is this a TLS web server certificate? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Enter a dnsName of the subject of the certificate:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Enter a URI of the subject of the certificate:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Enter the IP address of the subject of the certificate:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> signing &lt;span class="o">(&lt;/span>DHE ciphersuites&lt;span class="o">)&lt;/span>? &lt;span class="o">(&lt;/span>Y/n&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> encryption &lt;span class="o">(&lt;/span>RSA ciphersuites&lt;span class="o">)&lt;/span>? &lt;span class="o">(&lt;/span>Y/n&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> data encryption? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used to sign OCSP requests? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used to sign code? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> &lt;span class="nb">time&lt;/span> stamping? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> email protection? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used to sign other certificates? &lt;span class="o">(&lt;/span>Y/n&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used to sign CRLs? &lt;span class="o">(&lt;/span>y/N&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Will the certificate be used &lt;span class="k">for&lt;/span> signing &lt;span class="o">(&lt;/span>DHE ciphersuites&lt;span class="o">)&lt;/span>? &lt;span class="o">(&lt;/span>Y/n&lt;span class="o">)&lt;/span>: y
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Enter the URI of the CRL distribution point:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">X.509 Certificate Information:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Version: &lt;span class="m">3&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Serial Number &lt;span class="o">(&lt;/span>hex&lt;span class="o">)&lt;/span>: 32a1646105dcb6229eba87ad4c08a99a2bb92a99
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Validity:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Not Before: Mon Jun &lt;span class="m">02&lt;/span> 03:46:43 UTC &lt;span class="m">2025&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Not After: Sun Aug &lt;span class="m">31&lt;/span> 03:46:48 UTC &lt;span class="m">2025&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Subject: &lt;span class="nv">O&lt;/span>&lt;span class="o">=&lt;/span>prolug
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Subject Public Key Algorithm: RSA
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Algorithm Security Level: High &lt;span class="o">(&lt;/span>&lt;span class="m">3072&lt;/span> bits&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Modulus &lt;span class="o">(&lt;/span>bits 3072&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">00:e8:c7:f5:6e:7c:23:e3:7e:e7:d0:c5:c4:cf:c0:98
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">23:5f:1e:f6:5f:5d:87:c6:c8:18:13:cb:5e:1b:1a:88
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">03:98:4d:55:5d:4d:14:cc:78:8d:83:e3:c5:65:16:8c
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">41:a8:9f:32:ab:f4:47:3f:84:b2:b8:0d:7c:b3:a6:e7
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">21:59:13:d2:45:40:60:d6:2c:eb:5a:f3:00:0c:e7:36
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">06:0f:ca:51:04:92:06:91:80:f0:04:52:d2:66:e3:33
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">11:7b:8e:f7:e3:22:19:83:c8:dc:c8:f9:18:c7:51:4f
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">38:6a:d8:07:bf:12:02:f4:5e:0d:52:2e:cc:0b:4e:d9
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">e0:b2:07:9a:cd:39:99:a7:28:42:e4:67:b0:ff:04:2d
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">f9:13:8c:0f:19:b5:13:ee:59:a3:e7:e8:f7:a1:e9:92
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">2e:ce:49:23:3c:0a:b4:29:ca:5d:74:6e:9e:09:ea:fd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">72:6a:89:6e:5f:29:d6:0a:44:98:1e:2c:39:66:44:11
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">4f:47:c5:64:a3:0c:84:2b:fd:32:2e:a9:ce:e7:be:b4
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">7c:3b:e6:b9:23:98:82:ac:86:20:07:4e:59:84:4d:0c
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">02:38:76:87:ef:f8:17:05:5b:93:79:25:73:fc:18:f5
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">4e:1d:ff:84:45:10:7d:46:51:69:ae:73:6d:e9:1e:fd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ff:55:5a:78:4d:f6:cd:44:af:22:0f:b0:18:fb:82:b9
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">f6:aa:3d:2a:08:00:62:d1:9b:28:50:94:39:98:f5:de
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">f9:cf:3f:d8:ae:72:68:69:f1:46:97:8f:d5:a6:9a:3e
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">4c:57:37:5f:69:0e:2f:4e:b6:6e:65:a5:2c:f0:5b:c6
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">c2:ff:43:b7:4e:b7:56:3f:2b:d8:5d:b9:73:15:ca:81
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">f1:c3:78:2f:8d:4f:fd:e8:2d:6f:2f:2d:f6:b9:e1:a0
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">11:f2:56:18:02:5b:8e:07:da:19:43:c1:70:bc:7b:8b
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">82:2b:02:e2:71:6e:30:9b:18:8d:ed:1f:29:59:86:9d
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="m">81&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Exponent &lt;span class="o">(&lt;/span>bits 24&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">01:00:01
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Extensions:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Basic Constraints &lt;span class="o">(&lt;/span>critical&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Certificate Authority &lt;span class="o">(&lt;/span>CA&lt;span class="o">)&lt;/span>: TRUE
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Key Purpose &lt;span class="o">(&lt;/span>not critical&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">TLS WWW Client.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">TLS WWW Server.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Ipsec IKE.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">OCSP signing.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Code signing.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Time stamping.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Email protection.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Key Usage &lt;span class="o">(&lt;/span>critical&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Digital signature.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Key encipherment.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Data encipherment.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Certificate signing.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">CRL signing.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Subject Key Identifier &lt;span class="o">(&lt;/span>not critical&lt;span class="o">)&lt;/span>:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">213b20bf44b3446fb14f6cf72b8c2c03a09e292e
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Other Information:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Public Key ID:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sha1:213b20bf44b3446fb14f6cf72b8c2c03a09e292e
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sha256:7f76aada143491a8ba0721509a3e49f9e72321ed880f7ee64b8e01172989b3d2
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Public Key PIN:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">pin-sha256:f3aq2hQ0kai6ByFQmj5J+ecjIe2ID37mS44BFymJs9I&lt;span class="o">=&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>&lt;code>Reading&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Review Solving the Bottom Turtle&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Does the diagram on page 44 make sense to you for what you did with a certificate authority in this lab?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes it does, we had only setup a portion of this chain of trust, yet it got the idea across of whom we are referring to and how we build a certificate from that referral.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Assignment&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Complete the lab: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/212-public-private-keys-with-ssh">https://killercoda.com/het-tanis/course/Linux-Labs/212-public-private-keys-with-ssh&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the significance of the permission settings that you saw on the generated public and private key pairs?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Only the owner has Read/Write permission to the Private key, whereas the public key &amp;ndash; meant to be shared, is Readable by Group and Others.&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc9/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 8 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u9intro.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Solving the Bottom Turtle &lt;a href="https://spiffe.io/pdf/Solving-the-bottom-turtle-SPIFFE-SPIRE-Book.pdf">Web Book&lt;/a> Spiffe.io,2020.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 7 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc7/</link><pubDate>Sun, 11 May 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc7/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Monitoring systems and alerting when issues arise are critical responsibilities for system operators. Effective observability ensures that system health, performance, and security can be continuously assessed.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Intro to the scenario&lt;/p>
&lt;p>Read about telemetry, logs, and traces&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How does the usage guidance of that blog align with your understanding of these three items?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Though the concepts involved in telemetry are really quite simple, they took me some time to internalize and fully understand.
I can&amp;rsquo;t say it paralleled my own understanding as my understanding was very limited. Prior to the lectures, if I were to hear the word telemetry, I would think of non GPS tracking techniques or some sort of secret tracking by Palantir.&lt;/p>
&lt;p>My simplified outline of these 3 things:&lt;/p>
&lt;ul>
&lt;li>A metric represents a point in time measurement of a particular source&lt;/li>
&lt;li>Logs are discrete and event triggered occurrences.&lt;/li>
&lt;li>Traces follow a program’s flow and data progression.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What other useful blogs or AI write-ups were you able to find?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes Grafana has a good writeup on the subject.&lt;/li>
&lt;li>&lt;a href="https://grafana.com/docs/tempo/latest/introduction/telemetry/">https://grafana.com/docs/tempo/latest/introduction/telemetry/&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the usefulness of this in securing your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Securing a System is useful in many ways.&lt;/li>
&lt;li>Prevents unwanted access.&lt;/li>
&lt;li>Potentially mitigates Data Exfiltration.&lt;/li>
&lt;li>Potentially mitigates unwanted Data Infiltration.&lt;/li>
&lt;li>Prevents miss-use by users.&lt;/li>
&lt;li>Can simply mitigate the overload of available resources.&lt;/li>
&lt;li>Not only does the attack surface shrink when a system is properly secured, but the monitoring tasks reduce.&lt;/li>
&lt;li>Secure systems are more predictable systems.&lt;/li>
&lt;/ul>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Intro to the scenario&lt;/p>
&lt;p>When we think of our systems, sometimes an airgapped system is simple to think about because everything is closed in. The idea of alerting or reporting is the opposite. We are trying to get the correct, timely, and important information out of the system when and where it is needed.&lt;/p>
&lt;p>Read the summary at the top&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the litmus test for a page? (Sending something out of the system?)&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The page must be pertaining to an imminent, actionable situation that must be addressed quickly.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is over-monitoring v. under-monitoring. Do you agree with the assessment of the paper? Why or why not, in your experience?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Over-monitoring can be compared to hyper-vigilance. Over time it works against you as fatigue or indifference sets in. Furthermore over-monitoring includes the transporting, receiving and dissemination of too much information, causing cognitive overload, leading to poor decision making. Furthermore, the additional information being broadcast leaves a system more susceptible/vulnerable from a security stand-point.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Under monitoring would be lack of contextual reporting, responsiveness and diligence needed in order to keep a system from going down.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>From reading this article, it seems to me that one must turn monitoring into a spectrum of detail. Hypercritical indicators like uptime, load, capacity should be reported daily with a pre-determined baseline. Estimations can be made from this allowing for prediction. While major changes &amp;ndash;those outside the predicted norm, could trigger alerts. Paging should be reserved for the utmost critical issues.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is cause-based v. symptom-based and where do they belong? Do you agree?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Cause based is the analysis/investigation of the root cause of a certain outcome. In the context of systems operating and security, it is finding the vulnerability, infiltration/exfilration point or cause of failure like hitting memory/cpu/disc space limitations.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Symptom based analysis would be to observe the effects of an unknown origins ie. systems going down, data loss etc&amp;hellip;
Bringing the system back up, or restoring data from backups does nothing to address the root cause, it only remediates the effects.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>Telemetry&lt;/code> Automated collection of system metrics and status data.&lt;/li>
&lt;li>&lt;code>Tracing&lt;/code> Tracks the path and performance of requests across services.&lt;/li>
&lt;li>&lt;code>Span&lt;/code> A single unit of work in a trace, with start and end timestamps.&lt;/li>
&lt;li>&lt;code>Label&lt;/code> Key-value pair used to add metadata to traces or metrics.&lt;/li>
&lt;li>&lt;code>Time Series Database (TSDB)&lt;/code> A database optimized for storing data indexed by time.&lt;/li>
&lt;li>&lt;code>Queue&lt;/code> A data structure or service for holding and processing messages in order.&lt;/li>
&lt;li>&lt;code>UCL/LCL&lt;/code> Statistical limits used to detect anomalies in metrics over time.&lt;/li>
&lt;li>&lt;code>Aggregation&lt;/code> Combining multiple data points into a summarized form.&lt;/li>
&lt;li>&lt;code>SLO&lt;/code> Service Level Objective, a target performance metric.&lt;/li>
&lt;li>&lt;code>SLA&lt;/code> Service Level Agreement, a contractually agreed service standard.&lt;/li>
&lt;li>&lt;code>SLI&lt;/code> Service Level Indicator, a specific measurement of system performance.&lt;/li>
&lt;li>&lt;code>Push&lt;/code> Data sent actively from source to receiver.&lt;/li>
&lt;li>&lt;code>Pull&lt;/code> Data requested by the receiver from the source.&lt;/li>
&lt;li>&lt;code>Alerting rules&lt;/code> Conditions set to trigger alerts based on system metrics.&lt;/li>
&lt;li>&lt;code>Alertmanager&lt;/code> Tool for handling, deduplicating, and routing alerts.&lt;/li>
&lt;li>&lt;code>Alert template&lt;/code> Format used to display or notify alert information.&lt;/li>
&lt;li>&lt;code>Routing&lt;/code> Directing alerts to specific teams or destinations.&lt;/li>
&lt;li>&lt;code>Throttling&lt;/code> Limiting the number or rate of alerts to reduce noise.&lt;/li>
&lt;li>&lt;code>Monitoring for defensive operations&lt;/code> Watching systems for signs of attack or failure.&lt;/li>
&lt;li>&lt;code>SIEM&lt;/code> Centralized platform for analyzing security and event logs.&lt;/li>
&lt;li>&lt;code>IDS&lt;/code> Tool that detects suspicious or unauthorized activity.&lt;/li>
&lt;li>&lt;code>IPS&lt;/code> Tool that blocks or prevents detected threats in real time.&lt;/li>
&lt;/ul>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#lab-">Lab 🧪&lt;/a>
&lt;/h2>
&lt;h2 id="fail2ban-setup-and-testing">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#fail2ban-setup-and-testing">Fail2Ban Setup and Testing&lt;/a>
&lt;/h2>
&lt;h3 id="install-fail2ban">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#install-fail2ban">Install Fail2Ban&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Install Fail2Ban:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">apt install -y fail2ban&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;h3 id="verify-installation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#verify-installation">Verify Installation&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Check the version of Fail2Ban:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">fail2ban-client --version&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;h3 id="configure-sshd-jail">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#configure-sshd-jail">Configure SSHD Jail&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Edit the jail configuration file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">vi /etc/fail2ban/jail.conf&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Uncomment &lt;code>[sshd]&lt;/code> and add the following under that section:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="k">[sshd]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">enabled&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">true&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">maxretry&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">5&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">findtime&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">10&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">bantime&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">4h&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Review the rest of the file and &lt;strong>ensure there is no duplicate &lt;code>[sshd]&lt;/code> section&lt;/strong>. Comment it out or remove it if found.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="explore-other-jails">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#explore-other-jails">Explore Other Jails&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Review configuration sections for Apache and NGINX to see other available jails.&lt;/li>
&lt;/ul>
&lt;h3 id="restart-and-verify-fail2ban">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#restart-and-verify-fail2ban">Restart and Verify Fail2Ban&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Restart the service:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">systemctl restart fail2ban&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Check status:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">systemctl status fail2ban --no-pager&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;h3 id="test-the-ssh-ban">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#test-the-ssh-ban">Test the SSH Ban&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>SSH into &lt;code>node01&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ssh node01&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Run a loop to simulate failed login attempts:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="k">for&lt;/span> i in &lt;span class="o">{&lt;/span>1..6&lt;span class="o">}&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="k">do&lt;/span> ssh invaliduser@controlplane&lt;span class="p">;&lt;/span> &lt;span class="k">done&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Press &lt;code>Enter&lt;/code> on each password prompt until Fail2Ban triggers.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Use &lt;code>Ctrl + C&lt;/code> to exit the loop when connection attempts are blocked.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="check-ban-status">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#check-ban-status">Check Ban Status&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Return to &lt;code>controlplane&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>View the logs:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">tail -20 /var/log/fail2ban.log&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Check banned IPs:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">fail2ban-client get sshd banned&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Do you see the expected IP address in the ban list?&lt;/li>
&lt;li>Why do you think that is?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes I was able to see it.&lt;/li>
&lt;/ul>
&lt;h3 id="unban-the-ip">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#unban-the-ip">Unban the IP&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Replace &lt;code>&amp;lt;IP&amp;gt;&lt;/code> with the actual banned IP:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">fail2ban-client &lt;span class="nb">set&lt;/span> sshd unbanip &amp;lt;IP&amp;gt;&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;h3 id="confirm-unban">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#confirm-unban">Confirm Unban&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>SSH into &lt;code>node01&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ssh node01&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;li>
&lt;p>Try to reconnect to &lt;code>controlplane&lt;/code> using the correct user:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ssh root@controlplane&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Did the connection succeed?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, I was able to reconnect&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc7/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 7 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u7intro.html">Web Book&lt;/a> Source, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Observability Chapter &lt;a href="https://microsoft.github.io/code-with-engineering-playbook/observability/log-vs-metric-vs-trace/">Web Book&lt;/a> Source, 2025.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Telemetry &lt;a href="https://grafana.com/docs/tempo/latest/introduction/telemetry/">Web Book&lt;/a> Grafana, 2025.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>My Philosophy on Alerting &lt;a href="https://docs.google.com/document/d/199PqyG3UsyXlwieHaqbGiWVa8eMWi8zzAn0YfcApr8Q/edit?tab=t.0">Google Doc&lt;/a> Rob Ewaschuk, 2014.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 8 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc8/</link><pubDate>Sun, 11 May 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc8/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Configuration drift is the silent enemy of consistent, secure infrastructure.
When systems slowly deviate from their intended state, whether that be through manual changes, failed updates, or misconfigured automation, security risks increase and reliability suffers.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Read about configuration management&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/p>
&lt;p>&lt;code>Questions&lt;/code>&lt;/p>
&lt;p>What overlap of terms and concepts do you see from this week’s meeting?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Lifecycle management and Change Control (Change Management).&lt;/li>
&lt;li>Change Management is a system for ensuring process and product integrity.&lt;/li>
&lt;li>Despite these controls, variation from the norm (configuration drift) is inevitable.&lt;/li>
&lt;li>So we must invoke/involve controls in order to catch variation/drift.&lt;/li>
&lt;li>In the case of systems, it is bot Misconfigured Systems and Misconfigured Users to induce variation/drift.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What are some of the standards and guidelines organizations involved with configuration management?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Originally developed by the U.S. Department of Defense to ensure quality, reliability, and integrity in the manufacturing supply chain, configuration management principles were later adopted and expanded upon by standards bodies such as ANSI, ISO, and IEEE. These concepts have since evolved through industry-specific frameworks, including:&lt;/p>
&lt;/li>
&lt;li>
&lt;p>ITIL&lt;/p>
&lt;/li>
&lt;li>
&lt;p>ISO/IEC&lt;/p>
&lt;/li>
&lt;li>
&lt;p>NIST&lt;/p>
&lt;/li>
&lt;li>
&lt;p>IEEE&lt;/p>
&lt;/li>
&lt;li>
&lt;p>CERN&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Do you recognize them from other IT activities?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>For sure.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Baselining&lt;/code> Gathering telemetry from a system at its base config&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Standards&lt;/code> Developing a standard for configuration or procedure to ensure consistent and predictable output&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Controls&lt;/code> Controlling versions, changes, configurations&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Automation&lt;/code> Automatic and Repeatable tasks&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Variation&lt;/code> Departure from the standard&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>Remediation&lt;/code> Reconciliation, Correction, Rebasing&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Review the SRE guide to treating configurations as code. Focus down on the “Practical Advice” section &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the best practices that you can use in your configuration management adherence?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Don&amp;rsquo;t Check in Secrets&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Make it Hermetic&lt;/p>
&lt;ul>
&lt;li>Apply the Rigor of Code&lt;/li>
&lt;li>Golden Image&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Make it Reproducible&lt;/p>
&lt;ul>
&lt;li>Try to Implement a Software Bill of Materials (SBOM)&lt;/li>
&lt;li>Patching (If warranted) records.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Make it Verifiable&lt;/p>
&lt;ul>
&lt;li>Binary Provenance&lt;/li>
&lt;li>Use Signed Code&lt;/li>
&lt;li>Verify Artifacts, Not Just People&lt;/li>
&lt;li>Verifiable Build Architectures&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the security threats and how can you mitigate them?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Supply Chain Attacks&lt;/li>
&lt;li>Exposure of secrets&lt;/li>
&lt;li>Non-hermeticity and Drift&lt;/li>
&lt;li>Over-priveleging through automation&lt;/li>
&lt;li>Inadequate Auditing and Change Control&lt;/li>
&lt;li>Insecure Testing Environments&lt;/li>
&lt;li>Artifact Poisoning&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Why might it be good to know this as you design a CMDB or CI/CD pipeline?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The Pipeline is a major target. If something were to be malicious injected, the problem could propagate to all target platforms/devices.&lt;/li>
&lt;li>CMDB is a Source of Truth. A misconfiguration, bad record or malicious activity could invalidate hermeticity.&lt;/li>
&lt;li>Secrets and Credentials flow through the Pipeline, a whole can of worms.&lt;/li>
&lt;/ul>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>System Lifecycle&lt;/code> The full span of a system&amp;rsquo;s life: design, build, operate, maintain, and retire.&lt;/li>
&lt;li>&lt;code>Configuration Drift&lt;/code> The divergence of a system’s current state from its intended or documented configuration.&lt;/li>
&lt;li>&lt;code>Change management activities&lt;/code> Processes that control changes to systems to reduce errors and downtime.&lt;/li>
&lt;li>&lt;code>CMDB&lt;/code> (Configuration Management Database) A database tracking system components and their relationships.&lt;/li>
&lt;li>&lt;code>CI&lt;/code> (Configuration Item) Any component in the CMDB (e.g., server, software, network) being tracked and managed.&lt;/li>
&lt;li>&lt;code>Baseline&lt;/code> A known good configuration state used for comparison and control.&lt;/li>
&lt;li>&lt;code>Build book&lt;/code> A documented set of steps to initially install and configure a system.&lt;/li>
&lt;li>&lt;code>Run book&lt;/code> A manual or automated guide for maintaining or operating a system post-deployment.&lt;/li>
&lt;li>&lt;code>Hashing&lt;/code> The process of generating a fixed-size value from data to verify integrity.&lt;/li>
&lt;li>&lt;code>md5sum&lt;/code> Tool that calculates a 128-bit MD5 hash for checking file integrity.&lt;/li>
&lt;li>&lt;code>sha&amp;lt;x&amp;gt;sum&lt;/code> Tools (e.g., &lt;code>sha256sum&lt;/code>) that generate SHA-family hashes for stronger integrity checks.&lt;/li>
&lt;li>&lt;code>IaC&lt;/code> (Infrastructure as Code) Managing infrastructure using versioned code instead of manual processes.&lt;/li>
&lt;li>&lt;code>Orchestration&lt;/code> Coordinating automated tasks across multiple systems or services.&lt;/li>
&lt;li>&lt;code>Automation&lt;/code> Replacing manual tasks with scripts or tools to increase speed and consistency.&lt;/li>
&lt;li>&lt;code>AIDE&lt;/code> (Advanced Intrusion Detection Environment) A file integrity checker that detects unauthorized changes.&lt;/li>
&lt;/ul>
&lt;h3 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#lab-">Lab 🧪&lt;/a>
&lt;/h3>
&lt;h4 id="stig-viewer--change-management">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#stig-viewer--change-management">STIG Viewer – Change Management&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How many STIGs relate to &amp;ldquo;change management&amp;rdquo; in RHEL 9?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>9 STIGs contain the phrase.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does a &amp;ldquo;robust change management process&amp;rdquo; imply?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Change control, peer review, versioning, testing, and approval are mandatory before config updates.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can one STIG enforce this?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No, it&amp;rsquo;s an org-wide practice beyond simple config toggles.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is applied?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Technical preventative—mostly file ownership/permissions.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Are they all the same?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, the control type is consistent across them.&lt;/li>
&lt;/ul>
&lt;h4 id="monitoring-configuration-drift-with-aide">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#monitoring-configuration-drift-with-aide">Monitoring Configuration Drift with AIDE&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is &lt;code>/etc/aide/aide.conf.d/&lt;/code>?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Contains rule files defining paths to hash and monitor.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How many files are there?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>213 files.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does &lt;code>aide -v&lt;/code> show?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Version 0.18.6&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is AIDE?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>File integrity checker using stored hashes in a database.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does &lt;code>/etc/cron.daily/dailyaidecheck&lt;/code> do?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Runs &lt;code>dailyaidecheck&lt;/code> via &lt;code>capsh&lt;/code> if available, otherwise with &lt;code>bash&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does &lt;code>capsh&lt;/code> do?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Launches processes with limited capabilities—safer than full root.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does &lt;code>aide -i&lt;/code> do?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Initializes the DB. It took ~4m14s. User time was ~3m30s.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Why track timing?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>For planning and resource estimation during mass deployments.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What’s in the output?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Hashes (MD5, SHA, etc.) and &lt;code>/var/lib/aide/aide.db.new&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What should you study?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>RMD160, TIGER, CRC32, HAVAL, WHIRLPOOL, GOST.&lt;/li>
&lt;/ul>
&lt;h4 id="aide-test-run">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#aide-test-run">AIDE Test Run&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What’s the test procedure?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Create &lt;code>/root/prolug/test*&lt;/code>, run aide check.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Were files detected?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, under &amp;ldquo;Added entries.&amp;rdquo;&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Runtime?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>~6m38s, user ~5m54s, sys ~8s.&lt;/li>
&lt;/ul>
&lt;h4 id="remediating-drift-with-ansible">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#remediating-drift-with-ansible">Remediating Drift with Ansible&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What does the web env lab do?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Deploys 3 virtual hosts (dev, test, qa) on ports 808{0,1,2}.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How do you test?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>curl node01:808{0,1,2}&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What happened to 8081?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>It failed initially—intentional drift.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Does re-running the playbook fix it?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, restores state without manual steps.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Will that always work?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, unless networking/firewall issues prevent access.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can this cause issues?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes, if configs were changed manually after deployment.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Root cause: tech or ops?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Operational—teams must coordinate changes.&lt;/li>
&lt;/ul>
&lt;h4 id="challenge-custom-reporting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#challenge-custom-reporting">Challenge: Custom Reporting&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How would you verify stamp compliance?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Use Ansible facts and add deployment date as a custom variable.&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc8/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 8 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u8intro.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Configuration Management &lt;a href="https://en.wikipedia.org/wiki/Configuration_management">Wiki&lt;/a> Wikipedia, 2025.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Building Secure and Reliable Systems &lt;a href="https://google.github.io/building-secure-and-reliable-systems/raw/ch14.html#treat_configuration_as_code">Web Book&lt;/a> Google, 2025.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 6 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc6/</link><pubDate>Sun, 04 May 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc6/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Monitoring and parsing logs is essential to operational intelligence. Computers typically produce &lt;strong>immense&lt;/strong> amounts of data—far more than a human can interpret in real time. To extract meaning from this data, we must intelligently filter event logs into clear, comprehensible, and actionable items.&lt;/p>
&lt;p>Achieving this is easier said than done. This unit offers general advice on the art of making complex information comprehensible. &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Review chapter 15 of the SRE book:&lt;br>
&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/p>
&lt;p>There are 14 references at the end of the chapter. Follow them for more information. One of them by Julia Evans &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>should be reviewed for question “c”.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are some concepts that are new to you?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Core dumps, Memory dumps, or Stack traces.&lt;/p>
&lt;p>I have heard the terms before and understand the concepts to a basic degree. I decided to do a bit of further reading to understand each of the dumps and traces so here is a gist.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>A core dump&lt;/strong> is a snapshot of the processes state at the time of downing.&lt;/li>
&lt;li>&lt;strong>A Memory dump&lt;/strong> is a snapshot of the Random Access Memory (RAM) at the time of downing.&lt;/li>
&lt;li>&lt;strong>A Stack trace&lt;/strong> is the process of tracing function calls through the stack from end (error) to beginning (Call). The way I personally conceptualize this is through comparison to root cause analysis, something I am familiar with.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Host intrusion detection systems (HIDS)&lt;/strong> or &lt;strong>Host Agents&lt;/strong>&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>A few ideas from the book&lt;sup id="fnref1:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>
&amp;ldquo;Modern (sometimes referred to as “next-gen”) host agents use innovative techniques aimed at detecting increasingly sophisticated threats. Some agents blend system and user behavior modeling, machine learning, and threat intelligence to identify previously unknown attacks.&amp;rdquo;&lt;/p>
&lt;p>&amp;ldquo;Host agents always impact performance, and are often a source of friction between end users and IT teams. Generally speaking, the more data an agent can gather, the greater its performance impact may be because of deeper platform integration and more on-host processing.&amp;rdquo;&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>There are 5 conclusions drawn, do you agree with them? Would you add or remove anything from the list?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>To begin with, here are the conclusions drawn:&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>&amp;ldquo;Debugging is an essential activity whereby systematic techniques—not guesswork—achieve results.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;Security investigations are different from debugging. They involve different people, tactics, and risks.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;Centralized logging is useful for debugging purposes, critical for investigations, and often useful for business analysis.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;Iterate by looking at some recent investigations and asking yourself what information would have helped you debug an issue or investigate a concern.&amp;rdquo;&lt;/li>
&lt;li>&amp;ldquo;Design for safety. You need logs. Debuggers need access to systems and stored data. However, as the amount of data you store increases, both logs and debugging endpoints can become targets for adversaries.&amp;rdquo;&lt;/li>
&lt;/ol>
&lt;p>Firstly, I would like to preface this answer with a disclaimer. I lack the competency to critisize and/or disect O&amp;rsquo;Relly&amp;rsquo;s book. With that out of the way. I am going to target the first point.&lt;/p>
&lt;p>My only criticism here is that the point is very broad in scope as compared to the more granular and topics specific to this book/chapter.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>In Julia Evan’s debugging blog, which shows that debugging is just another form of troubleshooting, what useful things do you learn about the relationship between these topics?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Both debugging and troubleshooting involve:&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Proceduralization&lt;/strong>: If a clear procedure doesn’t exist, begin documenting and formalizing the process into a repeatable method.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Humility&lt;/strong>: Acknowledge that you might be the cause of the problem. This is especially important in development.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Methodical Experimentation&lt;/strong>: Form a hypothesis, then devise a controlled method to test it—use unit tests in development, or targeted scripts and commands when debugging.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>One Step at a Time&lt;/strong>: Tackle problems incrementally—“eat the elephant one bite at a time.”&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Strong Foundations&lt;/strong>: Write debuggable code and build robust systems. A good foundation makes issues easier to isolate.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>More Is Better&lt;/strong>: Verbose error messages provide more clues—enable detailed output when possible.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Are there any techniques you already do that this helps solidify for you?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Yes, I try to create excellent documentation with respect for my future self or others I may need to share it with. This involves numbered procedural steps with inputs and outputs, if that is the nature of the work. Otherwise, I write in a general manner that is legible to others.&lt;/p>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Read Monitoring Distributed Systems &lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What interesting or new things do you learn in this reading? What may you want to know more about?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Interesting Concept:&lt;/li>
&lt;/ul>
&lt;p>One of the general themes I gathered from this article is &lt;em>low cognitive overhead&lt;/em>. It’s a concept I’m very familiar with from accessibility-focused design. Too much information overwhelms our ability to observe, absorb, and decide effectively.&lt;/p>
&lt;p>For example, public signage must be simple, legible, and self-descriptive through clear graphic composition—guiding the eye where to look first and in which direction to proceed. This closely parallels the need for simplicity in monitoring and alerting systems. When such systems become overly complex, they can lead to misinterpretation, miscommunication, and fatigue due to information overload.&lt;/p>
&lt;p>Information must be derived and presented in a way that is easily consumable, where errors are unmistakable—without exhausting the viewer.&lt;/p>
&lt;p>New concepts&lt;/p>
&lt;ul>
&lt;li>White box monitoring systems vs. Black box monitoring systems.&lt;/li>
&lt;li>Conducting ad hoc retrospective analysis (ie. Debugging)&lt;/li>
&lt;li>(4 Golden signals) Latency, Traffic, Saturation, Errors
&lt;ul>
&lt;li>This one in particular relates strongly to the &lt;code>USE&lt;/code> acronym I had recently picked up from Het, &lt;code>Utilization, Saturation, Errors&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the “4 golden signals”?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ol>
&lt;li>Latency&lt;/li>
&lt;li>Traffic&lt;/li>
&lt;li>Saturation&lt;/li>
&lt;li>Errors&lt;/li>
&lt;/ol>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>After reading these, why is immutability so important to logging?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Tamper Resistance&lt;/strong>: Immutable logs cannot be altered or deleted without detection, which helps prevent covering up malicious activity or mistakes.&lt;/li>
&lt;li>&lt;strong>Auditability&lt;/strong>: Logs serve as historical records. If they can be changed, audits and investigations lose their value.&lt;/li>
&lt;li>&lt;strong>Debugging Integrity&lt;/strong>: Developers and operators rely on logs to trace errors. Mutable logs can introduce false positives or hide root causes.&lt;/li>
&lt;li>&lt;strong>Regulatory Compliance&lt;/strong>: Standards like HIPAA, PCI-DSS, and GDPR often require tamper-evident or immutable log storage.&lt;/li>
&lt;li>&lt;strong>Forensic Value&lt;/strong>: In incident response, immutable logs serve as trustworthy evidence for timelines and breach analysis.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What do you think the other required items are for logging to be effective?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>In order to be effective, log must be:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Trustworthy&lt;/strong>: Logs should be &lt;strong>immutable&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Time-stamped&lt;/strong>: Every entry needs a synced timestamp.&lt;/li>
&lt;li>&lt;strong>Clear levels&lt;/strong>: Use &lt;code>INFO&lt;/code>, &lt;code>ERROR&lt;/code>, &lt;code>DEBUG&lt;/code>, etc., to show importance.&lt;/li>
&lt;li>&lt;strong>Structured&lt;/strong>: Format logs so machines and humans can read them.&lt;/li>
&lt;li>&lt;strong>Context-rich&lt;/strong>: Include request IDs, user info, IPs—anything that helps trace the story.&lt;/li>
&lt;li>&lt;strong>Centralized&lt;/strong>: Gather logs in one place for easy searching and alerting.&lt;/li>
&lt;li>&lt;strong>Searchable&lt;/strong>: You should be able to find issues fast with good queries.&lt;/li>
&lt;li>&lt;strong>Safe&lt;/strong>: Control who can see logs—some contain sensitive info.&lt;/li>
&lt;li>&lt;strong>Durable&lt;/strong>: Logs shouldn’t disappear in a crash—use backups and redundancy.&lt;/li>
&lt;li>&lt;strong>Noise-controlled&lt;/strong>: Avoid flooding—rotate logs and cap log rates.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>Application&lt;/code> Logs from software applications showing events or errors.&lt;/li>
&lt;li>&lt;code>Host&lt;/code> Logs from the operating system, like kernel or authentication events.&lt;/li>
&lt;li>&lt;code>Network&lt;/code> Logs capturing traffic, connections, and protocol activity.&lt;/li>
&lt;li>&lt;code>DB&lt;/code> Logs from databases showing queries, errors, and access.&lt;/li>
&lt;li>&lt;code>Immutable&lt;/code> Logs that cannot be changed once written.&lt;/li>
&lt;li>&lt;code>RFC 3164 BSD Syslog&lt;/code> Older syslog format with simple priority and message structure.&lt;/li>
&lt;li>&lt;code>RFC 5424 IETF Syslog&lt;/code> Modern syslog format with structured data and better timestamps.&lt;/li>
&lt;li>&lt;code>Systemd Journal&lt;/code> Binary log format used by systemd with metadata support.&lt;/li>
&lt;li>&lt;code>Log rotation&lt;/code> Archiving or deleting old logs to manage disk space.&lt;/li>
&lt;li>&lt;code>Rsyslog&lt;/code> Advanced syslog daemon for filtering, formatting, and remote logging.&lt;/li>
&lt;li>&lt;code>Log aggregation&lt;/code> Collecting logs from multiple sources for analysis.&lt;/li>
&lt;li>&lt;code>ELK&lt;/code> Stack using Elasticsearch, Logstash, and Kibana to manage logs.&lt;/li>
&lt;li>&lt;code>Splunk&lt;/code> Tool for searching and analyzing machine-generated logs.&lt;/li>
&lt;li>&lt;code>Graylog&lt;/code> Open-source platform for central log collection and analysis.&lt;/li>
&lt;li>&lt;code>Loki&lt;/code> Log system that indexes by labels, optimized for Grafana.&lt;/li>
&lt;li>&lt;code>SIEM&lt;/code> Tools that collect and analyze security data for threat detection.&lt;/li>
&lt;/ul>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#lab-">Lab 🧪&lt;/a>
&lt;/h2>
&lt;h3 id="rsyslog">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#rsyslog">RSYSLOG&lt;/a>
&lt;/h3>
&lt;p>Reliable System and Kernel Logging System&lt;/p>
&lt;p>Basic Steps:&lt;/p>
&lt;ol>
&lt;li>Ensure Rsyslog is installed and running on both the control-plane and target node.&lt;/li>
&lt;li>Configure sending of logs over UDP Port.&lt;/li>
&lt;li>Editing Rsyslog config to split out logs.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Why do we split out the logs in this lab? Why don’t we just aggregate them to one place?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>We are aggregating the logs.&lt;/li>
&lt;li>So that we can tell where the logs are coming from.&lt;/li>
&lt;li>Each node is getting its own directory in `/var/log.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What do we split them out by?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>We split them b y hostname.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How does that template configuration work?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>It will log to a specific directory named after the target hostname in &lt;code>/var/log&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Are we securing this communication in any way, or do we still need to configure that?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No we are not securing this communication, yes it needs further configuring.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Lab&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Complete the lab here: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs">https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Does the lab work correctly, and do you understand the data flow?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Yes&lt;/p>
&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>Promtail (collects)&lt;/li>
&lt;li>Loki (stores)&lt;/li>
&lt;li>Grafana (visualizes)&lt;/li>
&lt;/ol>
&lt;p>&lt;code>loki-write.py&lt;/code>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can you see it in your Grafana?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes Scott is too awesome!&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can you modify the file loki-write.py to say something related to your name?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>msg = &amp;lsquo;On server {host} detected error - Treasure Wuz Here&amp;rsquo;.format(host=host)&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can you modify that to see the actual entires?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Lab&lt;/code>&lt;/p>
&lt;p>Complete the killercoda lab found here: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/108-kafka-to-loki-logging">https://killercoda.com/het-tanis/course/Linux-Labs/108-kafka-to-loki-logging&lt;/a>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Did you get it all to work?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Does the flow make sense in the context of this diagram?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes&lt;/li>
&lt;li>Uses &lt;code>kcat&lt;/code> to write out to Kafka&lt;/li>
&lt;li>Using promtail to receive the messages from kafka&lt;/li>
&lt;li>Promtail pushes to loki&lt;/li>
&lt;li>Displayed by grafana&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Can you find any configurations or blogs that describe why you might want to use this architecture or how it has been used in the industry?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Kafka interconnects log &lt;code>Producers&lt;/code> and log &lt;code>Ingesters&lt;/code>. Kafka can ingest logs from all types of sources and analyze in real time.&lt;/li>
&lt;li>Apache Kafka, according to Apache, is the most popular open-source stream-processing software.&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc6/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 6 Worksheet &lt;a href="https://professionallinuxusersgroup.github.io/psc/u6ws.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Building Secure and Reliable Systems &lt;a href="https://google.github.io/building-secure-and-reliable-systems/raw/ch15.html#collect_appropriate_and_useful_logs">Web Book&lt;/a> Google, 2025.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>How to Debug &lt;a href="https://jvns.ca/blog/2019/06/23/a-few-debugging-resources/">Blog&lt;/a> Julia Evans, 2019.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>SRE Handbook &lt;a href="https://sre.google/sre-book/monitoring-distributed-systems/">Web Book&lt;/a> Google, 2025.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>Powered by Kafka &lt;a href="https://kafka.apache.org/powered-by/">Website&lt;/a> Apache, 2025.&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 5 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc5/</link><pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc5/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Repositories and Patching is the general theme of this unit. We dive into creating internally audited repositories for safe enterprise operation. This configuration allows for greater security scrutiny and compatibility testing before schedule patching takes place. For example, a company would like to skip every other version of a package in order to reduce update cadence, giving more time for assessment, correction and troubleshooting of internal software. Much like any enterprise decision regarding cost and effort and analysis must take place. &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Review the rocky documentation on Software management in Linux.&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What do you already understand about the process?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>I had gained a decent understanding of the package management systems of both RHEL and DEBIAN based distros through both studying for the LPIC 1 and completing the ELAC course through this group. From this I had learned about versioning and dependency management including modules. The differences between RPM, YUM, and DNF and how these evolutions of package management came into being.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What new things did you learn or pick up?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;ul>
&lt;li>I did not understand the depth to which RPM packages tracked package data.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>I did not know that headers could be edited in the package in order to add custom labeling.&lt;/li>
&lt;li>I had basic awareness and high level understanding of internal package management. Prior to our lecture, I had not seen an internal package server/relay be setup/configured.&lt;/li>
&lt;li>I did not know much about EPEL beyond having to call it in the CLI for additional packages outside of DNF.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the DNF plugins? What is the use of the versionlock plugin?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>DNF plugins are external modules that extend the functionality of DNF. I have some experience activating the &lt;code>COPR&lt;/code> repo using DNF plugins. Furthermore, &lt;code>versionlock&lt;/code> is a specific plugin that allows for an admin/engineer/dev to lock a particular package to a specified version so that it is not mistakenly changed/overwritten. This is typically done in software development in my experience, with software development many dependencies might be needed. Breaking updates were common place, so most modern software projects contain a &lt;code>lock&lt;/code> file that indicates what specific dependency version must be used in order to build or interpret the project.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is an EPEL? Why do you need to consider this when using one?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>EPEL&lt;/code> stands for Extra Packages for Enterprise Linux. These packages exist outside of the core enterprise offering and are therefore potentially issue causing. Unlike core packages, these extra packages could introduce possible incompatibility issues, resulting in rejection by endorsed support specialists.&lt;/li>
&lt;/ul>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Do a google search for “patching enterprise Linux”&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What blogs (or AI) do you find that enumerates a list of steps or checklists to consider?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>I used to sources that I had found to be concise
&lt;ul>
&lt;li>RedHat Documentation&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/li>
&lt;li>Chat*ippity&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>After looking at that, how does patching a fleet of systems in the enterprise differ from pushing “update now” on your local desktop?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Patching a fleet of systems involves the systematic updating of installed software to fix security vulnerabilities, improve stability, and introduce minor enhancements. The process is governed by organizational policies to ensure uptime and compliance.&lt;/li>
&lt;/ul>
&lt;p>Because changes affect many systems simultaneously, patching acts as an amplifier of problems if not handled carefully. Therefore, enterprise patching must be strategic, managed, and auditable.&lt;/p>
&lt;p>In contrast, running updates on a personal system is typically an automated, low-risk operation, with little concern for version conflicts or trust in the source. Additionally, modern filesystems like ZFS and Btrfs provide the ability to quickly roll back changes if something fails.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What seems to be the major considerations? What seems to be the major roadblocks?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Major Considerations&lt;/p>
&lt;ul>
&lt;li>Uptime and Service Continuity&lt;/li>
&lt;li>Security and Compliance&lt;/li>
&lt;li>Testing and Validation&lt;/li>
&lt;li>Dependency Management&lt;/li>
&lt;li>Rollback and Recovery Planning&lt;/li>
&lt;li>Orchestration and Scalability&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Major Roadblocks&lt;/p>
&lt;ul>
&lt;li>Legacy Systems&lt;/li>
&lt;li>Change Resistance&lt;/li>
&lt;li>Incomplete Asset Inventory&lt;/li>
&lt;li>Tight Maintenance Windows&lt;/li>
&lt;li>Patch Quality and vendor Bugs&lt;/li>
&lt;li>Complex Dependencies and Integration Points&lt;/li>
&lt;li>Resource Constraints&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>Patching&lt;/code> The process of applying updates to fix bugs, improve security, or enhance performance.&lt;/li>
&lt;li>&lt;code>Repos&lt;/code> (Repositories) Remote or local collections of software packages used by package managers.&lt;/li>
&lt;li>&lt;code>Software&lt;/code> Applications or tools installed on a system to perform specific functions.&lt;/li>
&lt;li>&lt;code>EPEL&lt;/code> (Extra Packages for Enterprise Linux) A Fedora project providing additional packages for RHEL-based systems.&lt;/li>
&lt;li>&lt;code>BaseOS&lt;/code> The core operating system components in RHEL/Rocky, including the kernel and essential services.&lt;/li>
&lt;li>&lt;code>AppStream&lt;/code> A modular repository in RHEL/Rocky that provides applications and tools in versioned streams.&lt;/li>
&lt;li>&lt;code>httpd&lt;/code> The Apache HTTP Server package available via repos for web serving.&lt;/li>
&lt;li>&lt;code>patching&lt;/code> A type of update package that modifies existing software without replacing the whole binary.&lt;/li>
&lt;li>&lt;code>GPG Key&lt;/code> Used to verify the integrity and authenticity of packages in a repo.&lt;/li>
&lt;li>&lt;code>DNF/YUM&lt;/code> Package managers in RHEL-based systems used to install, update, and manage software packages.&lt;/li>
&lt;/ul>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#lab-">Lab 🧪&lt;/a>
&lt;/h2>
&lt;h3 id="apache-stigs-review">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#apache-stigs-review">Apache STIGs Review&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>Look at the 4 STIGs for “tls”&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>What file is fixed for all of them to be remediated?&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Install httpd on your Rocky server&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">systemctl stop wwclient
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf install -y httpd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">systemctl start httpd&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;ol start="2">
&lt;li>Check STIG V-214234&lt;/li>
&lt;/ol>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the problem?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Event logging can fail.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This can be fixed by implementing failure alerts.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is being implemented?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This type of control would be a &lt;code>Detective Control&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set properly on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No, this is not setup by default, it must be implemented after installation.&lt;/li>
&lt;/ul>
&lt;p>Check STIG V-214248&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the problem?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>By default, sensitive information including security controls may be available to all users because privelaged user access controls have not been implemented.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Develop roles for privelaged users and define access policies.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is being implemented?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This is a preventative type control.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set properly on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No, not by default. Of course super user has special priveledges. However, beyond that there are no other tiers of access.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How do you think SELINUX will help implement this control in an enforcing state? Or
will it not affect it?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>SELINUX allows for strong group creation and control. So it would help batch users and apply granular control mechanisms.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="building-repos">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#building-repos">Building repos&lt;/a>
&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Start out by removing all your active repos&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd&lt;/span> /etc/yum.repos.d
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mkdir old_archive
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mv *.repo old_archive
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf repolist&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Mount the local repository and make a local repo&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mount -o loop /lab_work/repos_and_patching/Rocky-9.5-x86_64-dvd.iso /mnt
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">df -h &lt;span class="c1">#should see the mount point&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ls -l /mnt
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">touch /etc/yum.repos.d/rocky9.repo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vi /etc/yum.repos.d/rocky9.repo&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;pre tabindex="0">&lt;code class="language-rocky9.repo" data-lang="rocky9.repo">[BaseOS]
name=BaseOS Packages Rocky Linux 9
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream Packages Rocky Linux 9
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
#Save with esc :wq or “shift + ZZ”&lt;/code>&lt;/pre>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Do the paths you’re using here make sense to you based off what you saw
with the ls -l? Why or why not?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">chmod &lt;span class="m">644&lt;/span> /etc/yum.repos.d/rocky9.repo
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf clean all
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Test the local repository&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf repolist
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;AppStream&amp;#34;&lt;/span> list available
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Approximately how many are available?
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;AppStream&amp;#34;&lt;/span> list available &lt;span class="p">|&lt;/span> nl
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;AppStream&amp;#34;&lt;/span> list available &lt;span class="p">|&lt;/span> nl &lt;span class="p">|&lt;/span> head
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;BaseOS&amp;#34;&lt;/span> list available
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Approximately how many are available?
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;BaseOS&amp;#34;&lt;/span> list available &lt;span class="p">|&lt;/span> nl
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;BaseOS&amp;#34;&lt;/span> list available &lt;span class="p">|&lt;/span> nl &lt;span class="p">|&lt;/span> head
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Try to install something&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;BaseOS AppStream&amp;#34;&lt;/span> install gimp
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hit “n”&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How many packages does it want to install?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>How can you tell they’re from different repos?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Share out the local repository for your internal systems (tested on just this one system)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">rpm -qa &lt;span class="p">|&lt;/span> grep -i httpd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">systemctl status httpd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ss -ntulp &lt;span class="p">|&lt;/span> grep &lt;span class="m">80&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">lsof -i :80
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd&lt;/span> /etc/httpd/conf.d
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vi repos.conf&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;pre tabindex="0">&lt;code class="language-repos.conf" data-lang="repos.conf">&amp;lt;Directory &amp;#34;/mnt&amp;#34;&amp;gt;
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
&amp;lt;/Directory&amp;gt;
Alias /repo /mnt
&amp;lt;Location /repo&amp;gt;
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
&amp;lt;/Location&amp;gt;&lt;/code>&lt;/pre>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">systemctl restart httpd
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vi /etc/yum.repos.d/rocky9.repo&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;pre tabindex="0">&lt;code class="language-rocky9.repo" data-lang="rocky9.repo">###USE YOUR HAMMER MACHINE IN BASEURL###
[BaseOS]
name=BaseOS Packages Rocky Linux 9
metadata_expire=-1
gpgcheck=1
enabled=1
#baseurl=file:///mnt/BaseOS/
baseurl=http://hammer25/repo/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream Packages Rocky Linux 9
metadata_expire=-1
gpgcheck=1
enabled=1
#baseurl=file:///mnt/AppStream/
baseurl=http://hammer25/repo/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release&lt;/code>&lt;/pre>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Do the paths you’ve modified at baseurl make sense to you? If not, what do you need to better understand?&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">dnf clean all
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf repolist
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Try to install something&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">dnf --disablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;*&amp;#34;&lt;/span> --enablerepo&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;BaseOS AppStream&amp;#34;&lt;/span> install gimp&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="digging-deeper">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#digging-deeper">Digging Deeper&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>You’ve set up a local repository and you’ve shared that repo out to other systems that might want to
connect. Why might you need this if you’re going to fully air-gap systems? Is it still necessary even if
your enterprise patching solution is well designed? Why or why not?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>We need a unified checkpoint that ensures secure conformity of a package before patching air-gapped systems. Air-gapped systems are not eternally disconnected, they can be connected to other systems in a highly controlled manner.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can you add the Mellanox ISO that is included in the /lab_work/repos_and_patching section to be a
repository that your systems can access? If you have trouble, troubleshoot and ask the group for
help.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes you can, it must be given a special header and be registered aka. Packaged into the local repo in order for other package management systems to see it.&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc5/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 5 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u5ws.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Rocky Documentation: Software Management &lt;a href="https://docs.rockylinux.org/books/admin_guide/13-softwares/">Web Book&lt;/a> Rocky Docs, 2025.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Google Search Engine &lt;a href="https://www.google.com">Web&lt;/a> Search Engine, 2025.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>Epel Documentation &lt;a href="https://www.redhat.com/en/blog/whats-epel-and-how-do-i-use-it/">Web Docs&lt;/a> IBM, 2025.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 4 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc4/</link><pubDate>Mon, 21 Apr 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc4/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Bastions and airgaps are strategies for controlling how systems connect—or don&amp;rsquo;t connect—to the outside world.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://aws.amazon.com/search/?searchQuery=air+gapped#facet_type=blogs&amp;amp;page=1">https://aws.amazon.com/search/?searchQuery=air+gapped#facet_type=blogs&amp;amp;page=1&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://aws.amazon.com/blogs/security/tag/bastion-host/">https://aws.amazon.com/blogs/security/tag/bastion-host/&lt;/a>&lt;/p>
&lt;ul>
&lt;li>Or find some on your own about air-gapped systems.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What seems to be the theme of air-gapped systems?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Air gapped systems are highly controlled and isolated systems. The degree of isolation directly correlates to the level of operational burden as modern productive systems are typically highly connected to either LANs and/or WANs.&lt;/p>
&lt;ul>
&lt;li>Blocking/Limiting/Bottlenecking Network Traffic&lt;/li>
&lt;li>Limiting Services to Bare Essentials&lt;/li>
&lt;li>Mitigating Data Egress&lt;/li>
&lt;li>Quardening off un-expected behavior&lt;/li>
&lt;li>Logging use events&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What seems to be their purpose?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>To limit attack surface, mitigate malicious access and/or data infiltration/exfiltraion&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>If you use google, or an AI, what are some of the common themes that come up when asked about air-gapped or bastion systems?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Common Themes in Air-Gapped Systems&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Data Transfer Procedures&lt;/li>
&lt;li>Patch Management &amp;amp; Updates&lt;/li>
&lt;li>Logging and Auditing&lt;/li>
&lt;li>Threat Models&lt;/li>
&lt;li>Authentication &amp;amp; Access&lt;/li>
&lt;li>Compliance &amp;amp; Certification&lt;/li>
&lt;li>Operational Burden&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Common Themes in Bastion Hosts&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Network Segmentation&lt;/li>
&lt;li>Hardened OS Configuration&lt;/li>
&lt;li>Jump Host Architecture&lt;/li>
&lt;li>Access Control &amp;amp; MFA&lt;/li>
&lt;li>Monitoring and Alerting&lt;/li>
&lt;li>Change Management&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Shared Themes&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Both require strict access control&lt;/li>
&lt;li>Emphasis on tamper resistance and detection&lt;/li>
&lt;li>Tradeoffs between security vs. usability&lt;/li>
&lt;li>Often part of zero-trust or defense-in-depth architectures&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Do a Google or AI search of topics around jailing a user or processes in Linux.&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>&lt;strong>User Jailing Techniques&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>chroot&lt;/li>
&lt;li>Namespaces&lt;/li>
&lt;li>Control groups (cgroups)&lt;/li>
&lt;li>Seccomp&lt;/li>
&lt;li>AppArmor / SELinux&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Container and Jail Environments&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>LXC&lt;/li>
&lt;li>Docker / Podman&lt;/li>
&lt;li>Firejail&lt;/li>
&lt;li>Bubblewrap (bwrap) Flatpak unpriveledged namespaces&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Use Cases&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Jailed SSH users: Using chroot in sshd_config to restrict access.&lt;/li>
&lt;li>systemd-nspawn: Lightweight containers for sandboxed environments.&lt;/li>
&lt;li>Flatpak / Snap: Sandboxed app delivery systems for desktop applications.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Related Tools &amp;amp; Commands&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>chroot, unshare, setfacl, auditd&lt;/li>
&lt;li>firejail, bwrap, systemd-nspawn&lt;/li>
&lt;li>docker, podman, lxc-start&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Can you enumerate the methods of jailing users?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Yes there are 5 possible avenues that I know of.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Can you think of when you’ve been jailed as a Linux user? If not, can you think of the useful ways to use a jail?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>No I have not experienced being jailed as a user. However, if I could think of some use-cases, perhaps one would be as a honeypot for observability. Another usecase I think could work would be to trap crawlers/bots.&lt;/p>
&lt;hr>
&lt;h2 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#definitions">Definitions&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>&lt;code>Air-gapped&lt;/code> Air gapped means physically isolated from unsecured networks.&lt;/li>
&lt;li>&lt;code>Bastion&lt;/code> A bastion is a secure gateway between a trusted and untrusted network.&lt;/li>
&lt;li>&lt;code>Jailed process&lt;/code> A jailed process is restricted to a limited portion of the filesystem.&lt;/li>
&lt;li>&lt;code>Isolation&lt;/code> Isolation separates processes or systems to limit access and interaction.&lt;/li>
&lt;li>&lt;code>Ingress&lt;/code> The intake of data into a system.&lt;/li>
&lt;li>&lt;code>Egress&lt;/code> In the context of systems, having the ability.&lt;/li>
&lt;li>&lt;code>Exfiltration&lt;/code> When a bad actor ro program is able to extracted data from a system.&lt;/li>
&lt;li>&lt;code>Cgroups&lt;/code> Cgroups limit and monitor resource usage of Linux processes.&lt;/li>
&lt;li>&lt;code>Namespaces&lt;/code> isolate system resources for process groups.&lt;/li>
&lt;li>&lt;code>Mount&lt;/code> restricts filesystem views per process group.&lt;/li>
&lt;li>&lt;code>PID&lt;/code> isolates process ID numbers between groups.&lt;/li>
&lt;li>&lt;code>IPC&lt;/code> isolates inter-process communication resources.&lt;/li>
&lt;li>&lt;code>UTS&lt;/code> allows separate host and domain names.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#lab-">Lab 🧪🥼&lt;/a>
&lt;/h2>
&lt;p>process of chroot jail build&lt;/p>
&lt;ul>
&lt;li>
&lt;ol>
&lt;li>Create a chroot in /var&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mkdir /var/chroot&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;ul>
&lt;li>
&lt;ol start="2">
&lt;li>Copy in core Binaries from the system into &lt;code>chroot&lt;/code> bin,lib64,dev,etc,home,usr/bin,lib/x86_64-linux-gnu&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What seems to be the theme of air-gapped systems?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Disconnected them from regular operational activities.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What seems to be their purpose?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Reduce or eliminate the possibility of infiltration and exfiltrion.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>hat are some of the common themes that come up when asked about air-gapped or bastion systems?&lt;/p>
&lt;p>&lt;code>Air Gapped&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Isolation&lt;/li>
&lt;li>Threat Mitigation&lt;/li>
&lt;li>Data Transfer Control&lt;/li>
&lt;li>Threat Mitigation&lt;/li>
&lt;li>Update Challenges&lt;/li>
&lt;li>Insider Threats&lt;/li>
&lt;li>Bridging Attacks&lt;/li>
&lt;li>Regulatory Compliance&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Bastion Hosts&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Single Point of Entry&lt;/li>
&lt;li>Heavily Monitored&lt;/li>
&lt;li>Hardened Configuration&lt;/li>
&lt;li>Authentication Hub&lt;/li>
&lt;li>Session Recording&lt;/li>
&lt;li>Access Segregation&lt;/li>
&lt;li>Zero Trust Integration&lt;/li>
&lt;li>Threat Containment&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc4/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 4 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u4ws.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 3 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc3/</link><pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc3/</guid><description>&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Understanding and implementing network standards and compliance measures can make security controls of critical importance very effective.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>There are 16 Stigs that involve PAM for RHEL 9&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the mechanisms and how do they affect PAM functionality?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;h4 id="hardening-defaults">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#hardening-defaults">Hardening Defaults&lt;/a>
&lt;/h4>
&lt;p>STIGs replace permissive PAM modules with stricter ones. 2 Categories/Areas are covered in regards to Stig&amp;rsquo;ing PAMs&lt;/p>
&lt;ol>
&lt;li>Lockout Policies that effect login frequency and failure.&lt;/li>
&lt;li>Password Strength Enforcement that effects password complexity and re-use.&lt;/li>
&lt;/ol>
&lt;h4 id="review-etcpamdsshd-on-a-linux-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#review-etcpamdsshd-on-a-linux-system">Review /etc/pam.d/sshd on a Linux system.&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is happening in that file relative to these functionalities?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This file specifies the PAM module control flags that sshd uses during authentication.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the common PAM modules?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>pam_sepermit.so, pam_nologin.so, apassword-auth and postlogin.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Look for a blog post or article about PAM that discusses real world application. ost it here and give us a quick synopsis.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>&lt;a href="https://www.redhat.com/en/blog/pluggable-authentication-modules-pam?utm_source=chatgpt.com">https://www.redhat.com/en/blog/pluggable-authentication-modules-pam?utm_source=chatgpt.com&lt;/a>&lt;/p>
&lt;p>&lt;code>Synopsis:&lt;/code>&lt;/p>
&lt;p>PAM are a modular and flexible framework for integrating authentication methods into applications. By seperating / abstracting authentication mechanisms from application code, PAM allows admins to manage authentication policies centrally. PAM also allows from customized authentication processes (Security through obscurity)&lt;/p>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Intro to the scenario&lt;/p>
&lt;p>Read about active directory (or LDAP) configurations of Linux via sssd&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> 👍&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Why do we not want to just use local authentication in Linux? Or really any system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Local authentication presents several problems. Firstly, there is no federated access, so there is fragmentation of systems. Secondly, scalability is an issue as each local system manages that local system&amp;rsquo;s users, requiring individual account provisioning and password management. Thirdly, it complicates auditing and compliance, since there is no centralized logging or consistent policy enforcement. Additionally, stale or orphaned accounts can accumulate unnoticed, increasing security risks. Finally, it prevents the implementation of modern security practices such as single sign-on (SSO), multi-factor authentication (MFA), and role-based access control across a distributed environment.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>There are 4 SSSD STIGS.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Response&lt;/code>&lt;/p>
&lt;h4 id="vuln-id-258122">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#vuln-id-258122">Vuln ID 258122&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>Enforce Smart Card Authentication&lt;/strong> – Require certificate-based smart card login to implement multi-factor authentication and enhance access security.&lt;/p>
&lt;h4 id="vuln-id-248131">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#vuln-id-248131">Vuln ID 248131&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>Validate Certificate Chains&lt;/strong> – Ensure that certificates used for PKI-based authentication are properly validated by building a complete certification path to a trusted root.&lt;/p>
&lt;h4 id="vuln-id-258132">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#vuln-id-258132">Vuln ID 258132&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>Associate Certificates with User Accounts&lt;/strong> – Confirm that every authentication certificate is explicitly mapped to a valid user account to maintain identity integrity.&lt;/p>
&lt;h4 id="vuln-id-258133">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#vuln-id-258133">Vuln ID 258133&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>Restrict Credential Caching Duration&lt;/strong> – Limit the validity period of cached authentication credentials to a maximum of 24 hours to reduce risk in the event of compromise.&lt;/p>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>PAM&lt;/code> Pluggable Authentication Modules provide a flexible mechanism for authenticating users on Unix-like systems.&lt;/li>
&lt;li>&lt;code>AD&lt;/code> Active Directory is Microsoft&amp;rsquo;s centralized directory service for authentication, authorization, and resource management.&lt;/li>
&lt;li>&lt;code>LDAP&lt;/code> Lightweight Directory Access Protocol is an open, vendor-neutral protocol for accessing and maintaining distributed directory information services.&lt;/li>
&lt;li>&lt;code>sssd&lt;/code> System Security Services Daemon provides access to remote identity and authentication providers like LDAP or Kerberos.&lt;/li>
&lt;li>&lt;code>oddjob&lt;/code> A D-Bus service used to perform privileged tasks on behalf of unprivileged users, often for domain enrollment or home directory creation.&lt;/li>
&lt;li>&lt;code>krb5&lt;/code> Kerberos 5 is a network authentication protocol that uses tickets for securely proving identity over untrusted networks.&lt;/li>
&lt;li>&lt;code>realm/realmd&lt;/code> A tool that simplifies joining and managing a system in a domain like Active Directory or IPA using standard services.&lt;/li>
&lt;li>&lt;code>wheel&lt;/code> (system group in RHEL):** A special administrative group whose members are allowed to execute privileged commands using &lt;code>sudo&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="lab">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#lab">Lab&lt;/a>
&lt;/h2>
&lt;h4 id="examine-stig-v-257986">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#examine-stig-v-257986">Examine STIG V-257986&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the problem?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>RHEL 9 needs PAM enabled for SSHD&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Enabling &lt;code>UsePAM&lt;/code> in /etc/ssh/sshd/config&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is being implemented?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>A Technical Preventative control&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set properly on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes it is&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">grep -i pam /etc/ssh/sshd_config&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Can you remediate this finding?&lt;/li>
&lt;/ul>
&lt;h4 id="check-and-remediate-stig-v-258055">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#check-and-remediate-stig-v-258055">Check and remediate STIG V-258055&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Questions&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the problem?&lt;/li>
&lt;li>What is the fix?&lt;/li>
&lt;li>What type of control is being implemented?&lt;/li>
&lt;li>Are there any major implications to think about with this change on your system? Why or why not?&lt;/li>
&lt;li>Is it set properly on your system?&lt;/li>
&lt;li>How would you go about remediating this on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answers&lt;/code>&lt;/p>
&lt;ul>
&lt;li>After 3 Unsuccessful root login attempts the root is locked.&lt;/li>
&lt;li>Enable faillock in authselect + &lt;code>even_deny_root&lt;/code>&lt;/li>
&lt;li>Technical preventative&lt;/li>
&lt;li>Yes, Anyone can be locked out including root&lt;/li>
&lt;li>No, it is commented out by default &lt;code>for good reason&lt;/code>&lt;/li>
&lt;li>I would not enable &lt;code>even_deny_root&lt;/code>&lt;/li>
&lt;/ul>
&lt;h4 id="check-and-remediate-stig-v-258098">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#check-and-remediate-stig-v-258098">Check and remediate STIG V-258098&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Questions&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the problem?&lt;/li>
&lt;li>What is the fix?&lt;/li>
&lt;li>What type of control is being implemented?&lt;/li>
&lt;li>Is it set properly on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answers&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Password complexity module &lt;code>pwquality&lt;/code> must be enabled in &lt;code>system-auth&lt;/code>&lt;/li>
&lt;li>Check `/etc/pam.d/system-auth and see if the line exists or not&lt;/li>
&lt;li>Technical preventative control&lt;/li>
&lt;li>Yes it is properly implemented&lt;/li>
&lt;/ul>
&lt;h4 id="filter-stigs-by-password-complexity">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#filter-stigs-by-password-complexity">Filter STIGS by “password complexity”&lt;/a>
&lt;/h4>
&lt;p>&lt;code>Questions&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How many are there?&lt;/li>
&lt;li>What are the password complexity rules?&lt;/li>
&lt;li>Are there any you haven’t seen before?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answers&lt;/code>&lt;/p>
&lt;ul>
&lt;li>14 STIGS related to Password complexity&lt;/li>
&lt;li>The somewhat standard 4 char class (One Upper, One Lower, One Special) and 15 Char total minimum. Max repeated char class is 4 and Max repeat char 3.&lt;/li>
&lt;li>Yes the Max repeat stuff.&lt;/li>
&lt;/ul>
&lt;h4 id="openldap-setup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#openldap-setup">OpenLDAP Setup&lt;/a>
&lt;/h4>
&lt;p>You will likely not build an LDAP server in a real world environment. We are doing it for understanding and ability to complete the lab. In a normal corporate environment this is likely Active Directory.&lt;/p>
&lt;p>To simplify some of the typing in this lab, there is a file located at /lab_work/identity_and_access_management.tar.gz that you can pull down to your system with the correct .ldif files.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># cp /lab_work/identity_and_access_management.tar.gz .&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># tar -xzvf identity_and_access_management.tar &lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="1-stop-the-warewulf-client">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#1-stop-the-warewulf-client">1. Stop the warewulf client&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl stop wwclient&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="2-edit-your-etchosts-file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#2-edit-your-etchosts-file">2. Edit your /etc/hosts file&lt;/a>
&lt;/h5>
&lt;p>Look for and edit the line that has your current server&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi /etc/hosts&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Entry for hammer1 for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">192.168.200.151 hammer1 hammer1-default ldap.prolug.lan ldap&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="3-setup-dnf-repo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#3-setup-dnf-repo">3. Setup dnf repo&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># dnf config-manager --set-enabled plus&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># dnf repolist&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># dnf -y install openldap-servers openldap-clients openldap&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="4-start-slapd-systemctl">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#4-start-slapd-systemctl">4. Start slapd systemctl&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl start slapd&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ss -ntulp | grep slapd&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="5-allow-ldap-through-the-firewall">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#5-allow-ldap-through-the-firewall">5. Allow ldap through the firewall&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># firewall-cmd --add-service={ldap,ldaps} --permanent&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># firewall-cmd --reload&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># firewall-cmd --list-all&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="6-generate-a-password-our-example-uses-testpassword-this-will-return-a-salted-ssha-password-save-this-password-and-stalted-hash-for-later-input">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#6-generate-a-password-our-example-uses-testpassword-this-will-return-a-salted-ssha-password-save-this-password-and-stalted-hash-for-later-input">6. Generate a password (Our example uses testpassword) This will return a salted SSHA password. Save this password and stalted hash for later input&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># slappasswd&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>New password: Re-enter new password: {SSHA}wpRvODvIC/EPYf2GqHUlQMDdsFIW5yig&lt;/code>&lt;/p>
&lt;h5 id="7-change-the-password">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#7-change-the-password">7. Change the password&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi changerootpass.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={0}config,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">replace&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcRootPW&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcRootPW&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="l">SSHA}vKobSZO1HDGxp2OElzli/xfAzY4jSDMZ&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapadd -Y EXTERNAL -H ldapi:/// -f changerootpass.ldif &lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>SASL/EXTERNAL authentication started&lt;/code>
&lt;code>SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth&lt;/code>&lt;br>
&lt;code>SASL SSF: 0&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={0}config,cn=config&amp;quot;&lt;/code>&lt;/p>
&lt;h5 id="8-generate-basic-schemas">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#8-generate-basic-schemas">8. Generate basic schemas&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="9-set-up-the-domain-use-the-password-you-generated-earlier">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#9-set-up-the-domain-use-the-password-you-generated-earlier">9. Set up the domain (USE THE PASSWORD YOU GENERATED EARLIER)&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi setdomain.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={1}monitor,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">replace&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcAccess&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcAccess&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="m">0&lt;/span>}&lt;span class="l">to * by dn.base=&amp;#34;gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">read by dn.base=&amp;#34;cn=Manager,dc=prolug,dc=lan&amp;#34; read by * none&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={2}mdb,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">replace&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcSuffix&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcSuffix&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={2}mdb,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">replace&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcRootDN&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcRootDN&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">cn=Manager,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={2}mdb,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">add&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcRootPW&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcRootPW&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="l">SSHA}s4x6uAxcAPZN/4e3pGnU7UEIiADY0/Ob&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcDatabase={2}mdb,cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">add&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcAccess&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcAccess&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="m">0&lt;/span>}&lt;span class="l">to attrs=userPassword,shadowLastChange by&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">dn=&amp;#34;cn=Manager,dc=prolug,dc=lan&amp;#34; write by anonymous auth by self write by * none&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcAccess&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="m">1&lt;/span>}&lt;span class="l">to dn.base=&amp;#34;&amp;#34; by * read&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcAccess&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="m">2&lt;/span>}&lt;span class="l">to * by dn=&amp;#34;cn=Manager,dc=prolug,dc=lan&amp;#34; write by * read&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="10-run-it">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#10-run-it">10. Run it&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapmodify -Y EXTERNAL -H ldapi:/// -f setdomain.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>SASL/EXTERNAL authentication started&lt;/code>&lt;br>
&lt;code>SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth&lt;/code>&lt;br>
&lt;code>SASL SSF: 0&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={1}monitor,cn=config&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={2}mdb,cn=config&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={2}mdb,cn=config&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={2}mdb,cn=config&lt;/code>&lt;br>
&lt;code>modifying entry &amp;quot;olcDatabase={2}mdb,cn=config&lt;/code>&lt;/p>
&lt;!-- raw HTML omitted -->
&lt;h5 id="11-search-and-verify-the-domain-is-working">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#11-search-and-verify-the-domain-is-working">11. Search and verify the domain is working.&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapsearch -H ldap:// -x -s base -b &amp;#34;&amp;#34; -LLL &amp;#34;namingContexts&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>dn:&lt;/code>
&lt;code>namingContexts: dc=prolug,dc=lan&lt;/code>&lt;/p>
&lt;h5 id="12-add-the-base-group-and-organization">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#12-add-the-base-group-and-organization">12. Add the base group and organization.&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi addou.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">top&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">dcObject&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectclass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">organization&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">o&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">My prolug Organisation&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dc&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">prolug&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">cn=Manager,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">organizationalRole&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">cn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Manager&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">OpenLDAP Manager&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">ou=People,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">organizationalUnit&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">ou&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">People&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">ou=Group,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">organizationalUnit&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">ou&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Group&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapadd -x -D cn=Manager,dc=prolug,dc=lan -W -f addou.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="13-verifying">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#13-verifying">13. Verifying&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapsearch -H ldap:// -x -s base -b &amp;#34;&amp;#34; -LLL &amp;#34;+&amp;#34; &lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapsearch -x -b &amp;#34;dc=prolug,dc=lan&amp;#34; ou&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="14-add-a-user">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#14-add-a-user">14. Add a user&lt;/a>
&lt;/h5>
&lt;p>Generate a password (use testuser1234)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># slappasswd &lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi adduser.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">uid=testuser,ou=People,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">inetOrgPerson&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">posixAccount&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">shadowAccount&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">cn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">testuser&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">sn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">temp&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">userPassword&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>{&lt;span class="l">SSHA}yb6e0ICSdlZaMef3zizvysEzXRGozQOK&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">loginShell&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">/bin/bash&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">uidNumber&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">15000&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">gidNumber&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">15000&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">homeDirectory&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">/home/testuser&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">shadowLastChange&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">shadowMax&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">shadowWarning&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">0&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">cn=testuser,ou=Group,dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">objectClass&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">posixGroup&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">cn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">testuser&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">gidNumber&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="m">15000&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">memberUid&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">testuser&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapadd -x -D cn=Manager,dc=prolug,dc=lan -W -f adduser.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="16-verify-that-your-user-is-in-the-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#16-verify-that-your-user-is-in-the-system">16. Verify that your user is in the system.&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapsearch -x -b &amp;#34;ou=People,dc=prolug,dc=lan&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="17-secure-the-system-with-tls-accept-all-defaults">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#17-secure-the-system-with-tls-accept-all-defaults">17. Secure the system with TLS (accept all defaults)&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/ldapserver.key -out /etc/pki/tls/ldapserver.crt&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># chown ldap:ldap /etc/pki/tls/{ldapserver.crt,ldapserver.key}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ls -l /etc/pki/tls/ldap*&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>-rw-r--r--. 1 ldap ldap 1224 Apr 12 18:23 /etc/pki/tls/ldapserver.crt &lt;/code>
&lt;code>-rw-------. 1 ldap ldap 1704 Apr 12 18:22 /etc/pki/tls/ldapserver.key&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi tls.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">dn&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">cn=config&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">changetype&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">modify&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">add&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcTLSCACertificateFile&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcTLSCACertificateFile&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">/etc/pki/tls/ldapserver.crt&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">add&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcTLSCertificateKeyFile&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcTLSCertificateKeyFile&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">/etc/pki/tls/ldapserver.key&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">add&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">olcTLSCertificateFile&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">olcTLSCertificateFile&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">/etc/pki/tls/ldapserver.crt&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># ldapadd -Y EXTERNAL -H ldapi:/// -f tls.ldif&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="18-fix-the-etcopenldapldapconf-to-allow-for-certs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#18-fix-the-etcopenldapldapconf-to-allow-for-certs">18. Fix the /etc/openldap/ldap.conf to allow for certs&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi /etc/openldap/ldap.conf&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># LDAP Defaults&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># See ldap.conf(5) for details&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># This file should be world readable but not world writable.&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#BASE dc=example,dc=com&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#URI ldap://ldap.example.com ldap://ldap-master.example.com:666&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#SIZELIMIT 12&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#TIMELIMIT 15&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#DEREF never&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># When no CA certificates are specified the Shared System Certificates&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># are in use. In order to have these available along with the ones specified # by TLS_CACERTDIR one has to include them explicitly:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">TLS_CACERT /etc/pki/tls/ldapserver.crt
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">TLS_REQCERT never
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># System-wide Crypto Policies provide up to date cipher suite which should&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># be used unless one needs a finer grinded selection of ciphers. Hence, the&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># PROFILE=SYSTEM value represents the default behavior which is in place&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># when no explicit setting is used. (see openssl-ciphers(1) for more info)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">#TLS_CIPHER_SUITE PROFILE=SYSTEM&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Turning this off breaks GSSAPI used with krb5 when rdns = false&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">SASL_NOCANON on&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl restart slapd&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="sssd-configuration-and-realmd-join-to-ldap">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#sssd-configuration-and-realmd-join-to-ldap">SSSD Configuration and Realmd join to LDAP&lt;/a>
&lt;/h4>
&lt;p>SSSD can connect a server to a trusted LDAP system and authenticate users for access to
local resources. You will likely do this during your career and it is a valuable skill to work with.&lt;/p>
&lt;h5 id="1-install-sssd-configure-and-validate-that-the-user-is-seen-by-the-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#1-install-sssd-configure-and-validate-that-the-user-is-seen-by-the-system">1. Install sssd, configure, and validate that the user is seen by the system&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># dnf install openldap-clients sssd sssd-ldap oddjob-mkhomedir authselect&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># authselect select sssd with-mkhomedir --force&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl enable --now oddjobd.service&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl status oddjobd.service&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h5 id="2-uncomment-and-fix-the-lines-in-etcopenldapldapconf">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#2-uncomment-and-fix-the-lines-in-etcopenldapldapconf">2. Uncomment and fix the lines in /etc/openldap/ldap.conf&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi /etc/openldap/ldap.conf&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>BASE dc=prolug,dc=lan&lt;/code>
&lt;code>URI ldap://ldap.ldap.lan/&lt;/code>&lt;/p>
&lt;h5 id="3-edit-the-sssdconf-file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#3-edit-the-sssdconf-file">3. Edit the sssd.conf file&lt;/a>
&lt;/h5>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># vi /etc/sssd/sssd.conf&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="p">[&lt;/span>&lt;span class="l">domain/default]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">id_provider = ldap&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">autofs_provider = ldap&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">auth_provider = ldap&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">chpass_provider = ldap&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">ldap_uri = ldap://ldap.prolug.lan/&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">ldap_search_base = dc=prolug,dc=lan&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c">#ldap_id_use_start_tls = True&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c">#ldap_tls_cacertdir = /etc/openldap/certs&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">cache_credentials = True&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c">#ldap_tls_reqcert = allow&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="l">sssd]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">services = nss, pam, autofs&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">domains = default&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="l">nss]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">homedir_substring = /home&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># chmod 0600 /etc/sssd/sssd.conf&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl start sssd&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># systemctl status sssd&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="4-validate-that-the-user-can-be-seen">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#4-validate-that-the-user-can-be-seen">4. Validate that the user can be seen&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="o">[&lt;/span>root@hammer1 ~&lt;span class="o">]&lt;/span>&lt;span class="c1"># id testuser&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Output:&lt;/p>
&lt;p>&lt;code>uid=15000(testuser) gid=15000 groups=15000&lt;/code>&lt;/p>
&lt;h4 id="please-reboot-the-the-lab-machine-when-done">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#please-reboot-the-the-lab-machine-when-done">Please reboot the the lab machine when done.&lt;/a>
&lt;/h4>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc3/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Professional Linux User Group Security Engineering Unit 3 &lt;a href="https://professionallinuxusersgroup.github.io/psc/u3ws.html">Web Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Stigs that involve PAM for RHEL 9 [Webstie](&lt;a href="https://docs.rockylinux.org/guides/security/pam/">https://docs.rockylinux.org/guides/security/pam/&lt;/a> Source, 2025.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>configurations of Linux via sssd &lt;a href="https://docs.rockylinux.org/guides/security/authentication/active_directory_authentication">Website&lt;/a> Source, 2025.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 2 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc2/</link><pubDate>Sat, 05 Apr 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc2/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>This week covers more implementation of Secure Technical Implementation Guidelines and we look at LDAP (Light Directory Access Protocol) Installation and Setup.
This unit also introduces foundational knowledge on analyzing, configuring, and hardening networking components using tools and frameworks like STIGs, OpenSCAP, and DNS configurations.&lt;/p>
&lt;hr>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Preface&lt;/code>&lt;/p>
&lt;p>There are 401 stigs for RHEL 9. If you filter in your stig viewer for sysctl there are 33 (mostly network focused), ssh - 39, and network - 58. Now there are some overlaps between those, but review them and answer these questions&lt;/p>
&lt;p>&lt;code>Question&lt;/code> 1. As systems engineers why are we focused on protecting the network portion of our
server builds?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Most attacks come through the network&lt;/li>
&lt;li>Misconfigured services can expose critical ports.&lt;/li>
&lt;li>Data in transit is vulnerable without proper encryption and access control.&lt;/li>
&lt;li>External exposure often increases the attack surface for things like brute-force attempts, malware injection, or unauthorized access.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code> 2. Why is it important to understand all the possible ingress points to our servers that
exist?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Ingress points = potential paths of attack. Unexpected ingress can be exploited.&lt;/li>
&lt;li>Zero-trust environments rely on strict control and observability of ingress.&lt;/li>
&lt;li>Compliance and auditing require accurate records of what’s accessible.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code> 3. Why is it so important to understand the behaviors of processes that are
connecting on those ingress points?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Security posture depends on visibility&lt;/li>
&lt;li>Attackers scan for overlooked vulnerabilities&lt;/li>
&lt;li>Automation tools (e.g., Ansible, Terraform) can introduce new ingress points unknowingly during updates.&lt;/li>
&lt;li>Incident response is much faster and more effective when engineers understand the network surface.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Intro to the scenario[^3]&lt;/p>
&lt;p>Read this: &lt;a href="https://ciq.com/blog/demystifying-and-">https://ciq.com/blog/demystifying-and-&lt;/a>
troubleshooting-name-resolution-in-rocky-linux/ or similar blogs on DNS and host file
configurations.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the significance of the nsswitch.conf file?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>The /etc/nsswitch.conf file controls the order in which name resolution methods are use&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are security problems associated with DNS and common exploits? (May have
to look into some more blogs or posts for this)&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>Core issues with DNS:&lt;/p>
&lt;p>Traditional DNS can be spoofed due to a lack of built in verification.,
Queries and Responses are sent in plaintext making confidentiality an issue.,
No way to validate the source of the DNS data.,
Centralized, single point of failure.,&lt;/p>
&lt;p>Common Exploits:&lt;/p>
&lt;p>Spoofing (False record injection),
Flooding (Overwhelming the resolver),
Tunneling (Query based Exfiltration),
Hijacking (Modifying domain registration data),
Typosquatting (Registering similar domains) New phrase for me&lt;/p>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>sysctl&lt;/code> Linux interface to modify kernel parameters at runtime for system performance and security.&lt;/li>
&lt;li>&lt;code>nsswitch.conf&lt;/code> Configuration file controlling the order of name service lookups (e.g., DNS, files, LDAP).&lt;/li>
&lt;li>&lt;code>DNS: Domain Name System&lt;/code> translates human-readable domain names into IP addresses.&lt;/li>
&lt;li>&lt;code>Openscap&lt;/code> Open-source framework for automated vulnerability scanning, compliance checking, and security auditing.&lt;/li>
&lt;li>&lt;code>CIS Benchmarks&lt;/code> Prescriptive security configuration guidelines provided by the Center for Internet Security.&lt;/li>
&lt;li>&lt;code>ss/netstat&lt;/code> Command-line tools to display network sockets, connections, and statistics on Unix-like systems.&lt;/li>
&lt;li>&lt;code>tcpdump&lt;/code> Command-line packet analyzer for capturing and inspecting network traffic in real-time.&lt;/li>
&lt;li>&lt;code>ngrep&lt;/code> Network packet analyzer like grep, allowing pattern matching on network traffic payloads.&lt;/li>
&lt;/ul>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#lab-">Lab 🧪&lt;/a>
&lt;/h2>
&lt;h3 id="ip-forwarding">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#ip-forwarding">IP Forwarding&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Does this system appear to be set to forward? Why or why not?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No. All relevant &lt;code>net.ipv4.conf.*.forwarding&lt;/code> and &lt;code>net.ipv4.ip_forward&lt;/code> values are set to &lt;code>0&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h3 id="martians">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#martians">Martians&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are martians and is this system allowing them?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Martians are packets with invalid or bogus source/destination addresses. This system is not logging them (&lt;code>log_martians = 0&lt;/code>), but whether they&amp;rsquo;re allowed depends on other rules. Logging is disabled.&lt;/li>
&lt;/ul>
&lt;h3 id="kernel-panic-behavior">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#kernel-panic-behavior">Kernel Panic Behavior&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How does this system handle kernel panics?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>kernel.panic = 0&lt;/code> means the system won’t auto-reboot on panic. &lt;code>panic_on_oops = 1&lt;/code> indicates it will panic on kernel oops errors. Other panic triggers are mostly disabled.&lt;/li>
&lt;/ul>
&lt;h3 id="fips-mode">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#fips-mode">FIPS Mode&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is FIPS mode enabled?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No. &lt;code>crypto.fips_enabled = 0&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What should be read about to better understand FIPS?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO&lt;/li>
&lt;/ul>
&lt;h2 id="kernel-command-line">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#kernel-command-line">Kernel Command Line&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the active boot parameters from &lt;code>/proc/cmdline&lt;/code>?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO (values include initrd paths, UUIDs, FIPS status not explicitly shown).&lt;/li>
&lt;/ul>
&lt;h3 id="security-settings--stigs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#security-settings--stigs">Security Settings &amp;amp; STIGs&lt;/a>
&lt;/h3>
&lt;h5 id="v-257957--tcp-syncookies">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#v-257957--tcp-syncookies">V-257957 – TCP Syncookies&lt;/a>
&lt;/h5>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is the system using TCP syncookies?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Yes. &lt;code>net.ipv4.tcp_syncookies = 1&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How to make this setting persistent?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Add &lt;code>net.ipv4.tcp_syncookies = 1&lt;/code> to a file in &lt;code>/etc/sysctl.d/&lt;/code>, then run &lt;code>sysctl --system&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h5 id="v-257958--icmp-redirects">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#v-257958--icmp-redirects">V-257958 – ICMP Redirects&lt;/a>
&lt;/h5>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is the system accepting ICMP redirect messages?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No. &lt;code>net.ipv4.conf.all.accept_redirects = 0&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How to harden this?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Add &lt;code>net.ipv4.conf.all.accept_redirects = 0&lt;/code> to &lt;code>/etc/sysctl.d/&lt;/code>, then reload settings with &lt;code>sysctl --system&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Did you fully understand all parameter meanings?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>No. Some were clarified using ChatGPT.&lt;/li>
&lt;/ul>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc2/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG SEC Intro 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc0/</link><pubDate>Sun, 23 Mar 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc0/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc0/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>I&amp;rsquo;ve just started a new &lt;strong>Security Engineering&lt;/strong> course created by Scott Champine through ProLUG. As a graduate of his &lt;strong>Linux Administration&lt;/strong> course and an active contributor to the &lt;strong>Professional Linux User Group&lt;/strong>, I felt compelled to make time for this new course—I&amp;rsquo;ve learned a great deal from his teachings in the past.&lt;/p>
&lt;h2 id="the-course">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc0/#the-course">The Course&lt;/a>
&lt;/h2>
&lt;p>This is a deep dive into &lt;strong>Enterprise Operational Security&lt;/strong>. That includes topics like &lt;strong>compliance&lt;/strong>, &lt;strong>threat management&lt;/strong>, and &lt;strong>system integrity&lt;/strong>. I&amp;rsquo;m also helping coordinate and develop a &lt;strong>web-book&lt;/strong> to accompany the course.&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;p>While I already hold several cybersecurity certifications that cover conceptual frameworks and best practices, this course goes much deeper with &lt;strong>hands-on labs&lt;/strong>. We harden systems with &lt;strong>STIGs&lt;/strong>,&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> monitor and detect activity on live systems, and troubleshoot compliance issues.&lt;/p>
&lt;p>The course spans &lt;strong>10 weeks&lt;/strong>, with an estimated &lt;strong>100 hours&lt;/strong> of work to complete the weekly projects and the capstone.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc0/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG PSC Repo: &lt;a href="https://github.com/ProfessionalLinuxUsersGroup/psc">https://github.com/ProfessionalLinuxUsersGroup/psc&lt;/a>
ProLUG PSC Book: &lt;a href="https://professionallinuxusersgroup.github.io/psc/">https://professionallinuxusersgroup.github.io/psc/&lt;/a>
ProLUG Book of Labs: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;hr>
&lt;h3 id="footnotes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc0/#footnotes">Footnotes&lt;/a>
&lt;/h3>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>ProLUG Security Engineering Course Web-Book &lt;a href="https://professionallinuxusersgroup.github.io/psc/intro.html">Web-Book&lt;/a> ProLUG, 2025.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Secure Technical Implementation Guidelines DoD Cyber Exchange &lt;a href="https://public.cyber.mil/stigs/">Website&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG SEC Unit 1 🔒</title><link>https://trevorsmale.github.io/techblog/post/psc1/</link><pubDate>Sun, 23 Mar 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/psc1/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>I&amp;rsquo;ve just started a new &lt;strong>Security Engineering&lt;/strong> course created by Scott Champine through ProLUG. As a graduate of his &lt;strong>Linux Administration&lt;/strong> course and an active contributor to the &lt;strong>Professional Linux User Group&lt;/strong>, I felt compelled to make time for this new course—I&amp;rsquo;ve learned a great deal from his teachings in the past.&lt;/p>
&lt;hr>
&lt;h2 id="worksheet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#worksheet">Worksheet&lt;/a>
&lt;/h2>
&lt;h3 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#discussion-post-1">&lt;code>Discussion Post 1&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is Security?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>In regards to Cyber Security, Integrating protective measures throughout the system lifecycle to ensure the system maintains its mission/operational effectiveness, even in the presence of adversarial threats.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Describe the CIA Triad.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>The &lt;strong>CIA Triad&lt;/strong> is a core model in systems security engineering.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Confidentiality&lt;/strong> – Preventing unauthorized disclosure of system data or resources, often enforced through access control, encryption, and information flow policies.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Integrity&lt;/strong> – Ensuring that system data and operations are not altered in an unauthorized or undetected way, including protection against both accidental and intentional modification.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Availability&lt;/strong> – Ensuring reliable access to system services and resources when required, even under attack or component failure.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the relationship between Authority, Will, and Force as they relate to security?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;p>In systems security engineering:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Authority&lt;/strong> is derived from policy and design requirements—what the system &lt;em>must&lt;/em> enforce according to mission objectives, laws, or standards.&lt;/li>
&lt;li>&lt;strong>Will&lt;/strong> represents the commitment of system stakeholders to implement and maintain security measures.&lt;/li>
&lt;li>&lt;strong>Force&lt;/strong> is the application of engineered mechanisms—technical, administrative, or procedural—that ensure security objectives are realized in practice.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What are the types of controls and how do they relate to the above question?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>In systems security engineering, &lt;strong>controls&lt;/strong> are safeguards built into the system to achieve security objectives. They align with &lt;strong>Authority, Will, and Force&lt;/strong> as follows:&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>&lt;strong>Administrative Controls&lt;/strong> – Derived from organizational policy (Authority) and guide design, personnel roles, and security governance.&lt;/li>
&lt;li>&lt;strong>Technical Controls&lt;/strong> – Engineered into the system as part of architecture and software/hardware features (Force), e.g., encryption, access enforcement, secure boot.&lt;/li>
&lt;li>&lt;strong>Operational Controls&lt;/strong> – Rely on human procedures and configurations to maintain secure operations (Will and Force), such as patch management and monitoring.&lt;/li>
&lt;li>&lt;strong>Physical Controls&lt;/strong> – Provide physical protection to system components (Force), e.g., secure facilities or tamper-evident hardware.&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#discussion-post-2">&lt;code>Discussion Post 2&lt;/code>&lt;/a>
&lt;/h3>
&lt;p>Intro to the scenario[^3]&lt;/p>
&lt;p>Find a STIG or compliance requirement that you do not agree is necessary for a server or service build.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What is the STIG or compliance requirement trying to do?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>
The compliance requirement encourages users to set up automated CVE patch updates from trusted providers within a 24-hour timeframe.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>What category and type of control is it?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>&lt;br>
This STIG is an administrative control. Since it is not built into the system by default, it must be applied and managed manually.&lt;/p>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;p>Defend why you think it is not necessary. (What type of defenses do you think you could present?&lt;/p>
&lt;p>&lt;code>Answer&lt;/code>
Initially, I found it difficult to identify a STIG procedural that I disagreed with. However, after extensive review, I selected this one. I believe automated patching is not ideal, especially for production systems. Patches can introduce unexpected behaviors in dependent systems. Additionally, relying on automation can foster complacency or a lack of awareness over time.&lt;/p>
&lt;h3 id="stig">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#stig">STIG&lt;/a>
&lt;/h3>
&lt;pre tabindex="0">&lt;code class="language-stig" data-lang="stig">
Apache Server 2.4 UNIX Server Security Technical Implementation Guide :: Version 3, Release: 2 Benchmark Date: 30 Jan 2025
Vul ID: V-214270 Rule ID: SV-214270r961683_rule STIG ID: AS24-U1-000930
Severity: CAT II Classification: Unclass Legacy IDs: V-92749; SV-102837
Group Title: SRG-APP-000456-WSR-000187
Rule Title: The Apache web server must install security-relevant software updates within the configured time period directed by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).
Discussion: Security flaws with software applications are discovered daily. Vendors are constantly updating and patching their products to address newly discovered security vulnerabilities. Organizations (including any contractor to the organization) are required to promptly install security-relevant software updates (e.g., patches, service packs, and hot fixes). Flaws discovered during security assessments, continuous monitoring, incident response activities, or information system error handling must also be addressed expeditiously.
The Apache web server will be configured to check for and install security-relevant software updates from an authoritative source within an identified time period from the availability of the update. By default, this time period will be every 24 hours.
Check Text: Determine the most recent patch level of the Apache Web Server 2.4 software, as posted on the Apache HTTP Server Project website. If the Apache installation is a proprietary installation supporting an application and is supported by a vendor, determine the most recent patch level of the vendor’s installation.
In a command line, type &amp;#34;httpd -v&amp;#34;.
If the version is more than one version behind the most recent patch level, this is a finding.&lt;/code>&lt;/pre>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;code>CIA Triad&lt;/code> Core principles of security — Confidentiality, Integrity, and Availability — guiding protection of information systems.&lt;/li>
&lt;li>&lt;code>Regulatory Compliance&lt;/code> Adhering to laws and regulations governing data privacy, security, and operational practices.&lt;/li>
&lt;li>&lt;code>HIPAA&lt;/code> U.S. healthcare regulation enforcing privacy and security of patient health information.&lt;/li>
&lt;li>&lt;code>Industry Standards&lt;/code> Best practices and technical guidelines agreed upon within specific industries to ensure consistency and security.&lt;/li>
&lt;li>&lt;code>PCI/DSS&lt;/code> Payment Card Industry Data Security Standard for protecting cardholder data during processing, storage, and transmission.&lt;/li>
&lt;li>&lt;code>Security Frameworks&lt;/code> Structured guidelines for managing cybersecurity risks and controls within organizations.&lt;/li>
&lt;li>&lt;code>CIS&lt;/code> Center for Internet Security provides globally recognized benchmarks and security controls.&lt;/li>
&lt;li>&lt;code>STIG&lt;/code> Security Technical Implementation Guide — DoD configuration standards for securing IT systems and software.&lt;/li>
&lt;/ul>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#lab-">Lab 🧪🥼&lt;/a>
&lt;/h2>
&lt;h1 id="mariadb-stig-remediation-lab--qa-format">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#mariadb-stig-remediation-lab--qa-format">MariaDB STIG Remediation Lab – Q&amp;amp;A Format&lt;/a>
&lt;/h1>
&lt;h2 id="signing-into-remote-host">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#signing-into-remote-host">Signing into Remote Host&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How do you connect to the remote host?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>ssh mchammer@prolug.asuscomm.com&lt;/code> with password &lt;code>SecLab12#$5&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="initial-setup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#initial-setup">Initial Setup&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What tools should be installed?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>tmux&lt;/code> and &lt;code>vim&lt;/code> via &lt;code>dnf install tmux vim -y&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Why use tmux?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>To persist sessions (e.g., for using &lt;code>nohup&lt;/code>).&lt;/li>
&lt;/ul>
&lt;h2 id="installing-and-verifying-mariadb">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#installing-and-verifying-mariadb">Installing and Verifying MariaDB&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How is MariaDB installed and started?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>&lt;code>dnf install mariadb-server&lt;/code>, then start and verify with:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">systemctl start mariadb
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">systemctl status mariadb
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ss -ntulp &lt;span class="p">|&lt;/span> grep &lt;span class="m">3306&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How do you enter the MariaDB shell?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Run &lt;code>mariadb&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="v-253666-listing-users--max-connections">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#v-253666-listing-users--max-connections">V-253666: Listing Users &amp;amp; Max Connections&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>How do you view users and max connections?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Run:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-sql" data-lang="sql">&lt;span class="line">&lt;span class="cl">&lt;span class="k">SELECT&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">DISTINCT&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">user&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">FROM&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">mysql&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="k">user&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">SELECT&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">user&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">max_user_connections&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">FROM&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">mysql&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="k">user&lt;/span>&lt;span class="p">;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;h2 id="v-253677-shutdown-on-audit-failure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#v-253677-shutdown-on-audit-failure">V-253677: Shutdown on Audit Failure&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the issue?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>MariaDB must shut down or alert on audit failures like lack of space.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Configure alerting when log space is low using the OS or DB logging tools.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is this?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Technical, detective control.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Not by default. Logging rollover may need to be configured manually.&lt;/li>
&lt;/ul>
&lt;h2 id="v-253678-fifo-audit-logging">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#v-253678-fifo-audit-logging">V-253678: FIFO Audit Logging&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the issue?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>MariaDB must overwrite oldest audit logs when storage is full (FIFO).&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Use syslog or configure log rotation/purging.
Example configuration:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="k">[mariadb]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">server_audit_output_type&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">&amp;#39;syslog&amp;#39;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is this?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Technical, detective control.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>TODO&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="v-253754-audit-on-security-object-change">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/psc1/#v-253754-audit-on-security-object-change">V-253754: Audit on Security Object Change&lt;/a>
&lt;/h2>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the issue?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Changes to roles, privileges, and security objects must be audited.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What is the fix?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Configure MariaDB Audit Plugin with the following:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-sql" data-lang="sql">&lt;span class="line">&lt;span class="cl">&lt;span class="k">DELETE&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">FROM&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">mysql&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">server_audit_filters&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">WHERE&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">filtername&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s1">&amp;#39;default&amp;#39;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">INSERT&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">INTO&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">mysql&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">server_audit_filters&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">filtername&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">rule&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">VALUES&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s1">&amp;#39;default&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">JSON_COMPACT&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="s1">&amp;#39;{
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="s1"> &amp;#34;connect_event&amp;#34;: [&amp;#34;CONNECT&amp;#34;, &amp;#34;DISCONNECT&amp;#34;],
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="s1"> &amp;#34;query_event&amp;#34;: [&amp;#34;ALL&amp;#34;]
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="s1"> }&amp;#39;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">));&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>What type of control is this?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Technical, detective control.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Question&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Is it set on your system?&lt;/li>
&lt;/ul>
&lt;p>&lt;code>Answer&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Not by default, but was configured on the remote server.&lt;/li>
&lt;/ul>
&lt;hr></description></item><item><title>My 2025 Learning Plan</title><link>https://trevorsmale.github.io/techblog/post/go25/</link><pubDate>Fri, 07 Feb 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/go25/</guid><description>&lt;h1 id="where-to-start">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/go25/#where-to-start">Where to start&lt;/a>
&lt;/h1>
&lt;p>I am a generally curious person who enjoys learning new things. However, the shear volume of information available can lead to feeling overwhelmed, distracted and aimless.
From years of experience being an auto-didact, I have honed my craft of self directed study. Now, I create a solid learning plan that keeps me on track and feeling a sense of achievement.
A learning plan is a personal roadmap that outlines what to learn, how to learn it and when to reach certain milestones. I start with goals and work my way backwards from there.&lt;/p>
&lt;h1 id="2025">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/go25/#2025">2025&lt;/a>
&lt;/h1>
&lt;p>If I am to state my purpose simply
Will be the year I:&lt;/p>
&lt;ul>
&lt;li>Get advanced with GO programming by writing several useful programs.&lt;/li>
&lt;li>Learn Kubernenets and prove that knowledge with a Certification&lt;/li>
&lt;li>Get comfy with Ansible&lt;/li>
&lt;li>Get JLPT N5 Certified in Japanese Language&lt;/li>
&lt;/ul>
&lt;h2 id="footnotes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/go25/#footnotes">Footnotes&lt;/a>
&lt;/h2></description></item><item><title>Embedded Rust? 🦀</title><link>https://trevorsmale.github.io/techblog/post/rsembedd1/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/rsembedd1/</guid><description>&lt;h1 id="yes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#yes">Yes&lt;/a>
&lt;/h1>
&lt;p>Firstly Rust on Embedded is a different beast as the standard library is not used and memory safety is not on by default. However, there are still some advantages over a popular language like C or C++. &lt;strong>HAL&lt;/strong> or Hardware Abstraction Layer separates the hardware from the code enabling more portable software that can compile to multiple architectures. Cargo improves development ergonomic by creating and managing the project and its dependancies. Thirdly, the build system is unified across platforms, so code will compile on Windows, Mac and Linux in the same way.
Rust on embedded systems is a different challenge, as it does not use the standard library, and memory safety is not enabled by default. However, it still offers several advantages over popular languages like C or C++.
One key benefit is the Hardware Abstraction Layer (HAL), which separates hardware-specific details from the code, enabling more portable software that can compile across multiple architectures. Additionally, Cargo enhances development ergonomics by simplifying project and dependency management.
Lastly, Rust’s unified build system ensures consistent behavior across platforms, allowing code to compile seamlessly on Windows, macOS, and Linux.&lt;/p>
&lt;h2 id="hal-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#hal-">HAL 🪢&lt;/a>
&lt;/h2>
&lt;p>Is really interesting, it is the concept of mapping hardware and storing the map for API access.
HAL leverages Peripheral Access Crates (PACs), which are auto-generated Rust crates representing the registers and bitfields of a microcontroller. PACs allow safe and direct access to hardware registers while ensuring Rust’s strict type-checking and ownership rules are followed. HAL sits on top of PACs, abstracting these low-level details.
Rust embedded HALs adhere to the embedded-hal traits—a collection of interfaces defining common operations like GPIO pin control, SPI/I2C communication, timers, and ADC usage. By implementing these traits, HAL provides a uniform way to interact with hardware, regardless of the underlying platform.
HAL abstracts device-specific features into a user-friendly API. For example:&lt;/p>
&lt;ul>
&lt;li>Configuring a GPIO pin involves selecting its mode (input, output, pull-up, etc.) without directly modifying hardware registers.&lt;/li>
&lt;li>Communication protocols like SPI or I2C are exposed through easy-to-use Rust methods (read, write, transfer, etc.).&lt;/li>
&lt;/ul>
&lt;h2 id="cargo-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#cargo-">Cargo 📦&lt;/a>
&lt;/h2>
&lt;p>Cargo handles dependencies seamlessly using Cargo.toml. Developers specify libraries (called “crates”) with version constraints, and Cargo fetches and builds them automatically.
Cargo:&lt;/p>
&lt;ul>
&lt;li>Ensures reproducible builds by generating a Cargo.lock file that locks dependency versions.&lt;/li>
&lt;li>Community-driven ecosystem (e.g., crates.io) simplifies finding and using high-quality, maintained libraries.&lt;/li>
&lt;/ul>
&lt;h3 id="managing-dependancies--with-cargotoml">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#managing-dependancies--with-cargotoml">Managing Dependancies ⚙️ with Cargo.toml&lt;/a>
&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-toml" data-lang="toml">&lt;span class="line">&lt;span class="cl">&lt;span class="p">[&lt;/span>&lt;span class="nx">dependencies&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nx">embedded-hal&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;0.2.6&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nx">stm32f4xx-hal&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;0.14&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="cross-compilation-support-is-integrated-via-targets-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#cross-compilation-support-is-integrated-via-targets-">Cross-compilation support is integrated via targets 🎯&lt;/a>
&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">cargo build --target thumbv7em-none-eabihf&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="enforced-project-structure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#enforced-project-structure-">Enforced project Structure 👮‍♂️&lt;/a>
&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">my_project/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">├── Cargo.toml &lt;span class="c1"># Dependencies &amp;amp; configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">└── src/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> └── main.rs &lt;span class="c1"># Application entry point&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h2 id="cross-platform--">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#cross-platform--">Cross Platform 💻 💼&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Tools like probe-rs allow seamless debugging and flashing of embedded devices on multiple platforms (Linux, macOS, Windows).&lt;/li>
&lt;li>The cargo ecosystem integrates testing, building, and dependency management across platforms without additional tools.&lt;/li>
&lt;/ul>
&lt;h2 id="experienced-embedded-devs-are-switching">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#experienced-embedded-devs-are-switching">Experienced Embedded Devs are switching&lt;/a>
&lt;/h2>
&lt;p>I was first made aware of Rust for embedded by experienced devs on Youtube who proclaimed their love of rust over C for professional projects. Channels like:
&lt;a href="https://www.youtube.com/@therustybits">https://www.youtube.com/@therustybits&lt;/a>
&lt;a href="https://www.youtube.com/@JaJakubYT">https://www.youtube.com/@JaJakubYT&lt;/a>
&lt;a href="https://www.youtube.com/@floodplainnl">https://www.youtube.com/@floodplainnl&lt;/a>
&lt;a href="https://www.youtube.com/@embedded-rust">https://www.youtube.com/@embedded-rust&lt;/a>&lt;/p>
&lt;p>are all claiming that they have switched over and are not looking back.&lt;/p>
&lt;h2 id="personal-development">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/rsembedd1/#personal-development">Personal Development&lt;/a>
&lt;/h2>
&lt;p>I’m writing this post as I plan to develop hardware projects using Rust for embedded systems. The combination of Rust and RISC-V microcontrollers is a particularly exciting intersection. In my sights are the ESP32-C3 and Raspberry Pi Pico 2, both of which I’m considering for upcoming projects. Instead of dealing with messy C, slow MicroPython, or the limitations of TinyGo, Rust allows me to create clean and performant projects—something I always strive for. Stay tuned for more updates!&lt;/p></description></item><item><title>ProLUG Talk: Kubernetes in the Enterprise</title><link>https://trevorsmale.github.io/techblog/post/k8sent/</link><pubDate>Sat, 11 Jan 2025 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/k8sent/</guid><description>&lt;h1 id="kubernetes-in-enterprise">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#kubernetes-in-enterprise">Kubernetes in Enterprise&lt;/a>
&lt;/h1>
&lt;p>As a dedicated member of the Professional Linux User Group, I gain valuable insights into essential industry tools, processes, and procedures from professional engineers who work hands-on with major infrastructure.&lt;/p>
&lt;p>This evening, Michael Pesa of Lambda Labs delivered an excellent talk on best practices with Kubernetes and GitOps, shedding light on the challenges faced by traditional orchestration approaches. What intrigued me most was the discussion on Talos OS and Chainguard, particularly their use of Software Bill of Materials (SBOM). The concept centers around stripping systems down to their bare essentials, which not only reduces vulnerabilities but also improves performance.&lt;/p>
&lt;p>Talos OS is particularly fascinating because it eliminates many traditional system components like SSH, systemd, glibc, package managers, or a shell. Essentially, Talos is just the Linux kernel with several Go binaries. This streamlined approach significantly reduces vulnerabilities and minimizes the attack surface. As Michael mentioned in his presentation, many vulnerabilities stem from privilege escalation, container escapes, and memory hacking. Talos mitigates most of these threats by enforcing API-driven controls instead of relying on a shell and by utilizing private key-based authentication throughout.&lt;/p>
&lt;p>I am excited to experiment with these tools in my homelab, where I aim to create a modern, declarative infrastructure with ephemerality at its core.&lt;/p>
&lt;hr>
&lt;h1 id="-notes-from-the-presentation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#-notes-from-the-presentation">📝 Notes from the Presentation:&lt;/a>
&lt;/h1>
&lt;h2 id="topic-covered">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#topic-covered">Topic Covered&lt;/a>
&lt;/h2>
&lt;h3 id="immutable-operating-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#immutable-operating-systems">Immutable operating systems&lt;/a>
&lt;/h3>
&lt;h3 id="minimalist-container-images">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#minimalist-container-images">Minimalist container images&lt;/a>
&lt;/h3>
&lt;h3 id="gitops-strategies">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#gitops-strategies">GitOps strategies&lt;/a>
&lt;/h3>
&lt;h3 id="reproducible-builds">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#reproducible-builds">Reproducible builds&lt;/a>
&lt;/h3>
&lt;h2 id="suse-microos-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#suse-microos-">SUSE MicroOS 🦎&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Purpose:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Designed as a container host OS.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Features:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Read-only root filesystem for enhanced security.&lt;/li>
&lt;li>Transactional updates managed via Btrfs snapshots.&lt;/li>
&lt;li>Cloud environment integration with cloud-init; uses ignition elsewhere.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Usage:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Ideal for minimal, secure containerized workloads.&lt;/li>
&lt;/ul>
&lt;h2 id="talos-linux-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#talos-linux-">Talos Linux 🦅&lt;/a>
&lt;/h2>
&lt;h3 id="overview">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#overview">Overview:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Minimalist design focusing on immutability.&lt;/li>
&lt;li>Linux kernel paired with five Go binaries.&lt;/li>
&lt;li>Lacks traditional components: no SSH, systemd, glibc, package manager, or shell.&lt;/li>
&lt;/ul>
&lt;h3 id="security">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#security">Security:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Secure by default with a micro TLS stack and key-based authentication.&lt;/li>
&lt;li>API-driven operations using YAML, akin to Kubernetes manifests.&lt;/li>
&lt;li>Uses its own PKI infrastructure, creating a small attack surface.&lt;/li>
&lt;/ul>
&lt;h3 id="tools">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#tools">Tools:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>talosctl CLI for management.&lt;/li>
&lt;li>Debugging occurs via ephemeral tools and remote APIs.&lt;/li>
&lt;/ul>
&lt;h3 id="considerations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#considerations">Considerations:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Best suited for Kubernetes clusters.&lt;/li>
&lt;li>For bare-metal installations, use Matchbox or a PXE boot system.&lt;/li>
&lt;/ul>
&lt;h3 id="alternatives">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#alternatives">Alternatives:&lt;/a>
&lt;/h3>
&lt;p>Flatcar and CoreOS are earlier container-focused OS derivatives.&lt;/p>
&lt;h2 id="minimal-container-images-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#minimal-container-images-">Minimal Container Images 👝&lt;/a>
&lt;/h2>
&lt;h3 id="philosophy">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#philosophy">Philosophy:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Containers are inherently immutable; minimal images reduce attack surfaces and improve performance.&lt;/li>
&lt;/ul>
&lt;h3 id="best-practices">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#best-practices">Best Practices:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Use the smallest possible image, minimizing unnecessary dependencies.&lt;/li>
&lt;li>Employ multi-stage builds for languages with heavy dependencies, separating build and runtime environments.&lt;/li>
&lt;li>For statically compiled languages like Go, containers can often be reduced to a single binary.&lt;/li>
&lt;/ul>
&lt;h3 id="security-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#security-1">Security:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Avoid including shells to reduce exploit vectors.&lt;/li>
&lt;li>Favor minimal base images like Alpine or tools like Google’s Distroless and Chainguard’s SBOM-integrated containers.&lt;/li>
&lt;/ul>
&lt;h2 id="supply-chain-security-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#supply-chain-security-">Supply Chain Security 🔗🔐&lt;/a>
&lt;/h2>
&lt;h3 id="sbom-software-bill-of-materials">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#sbom-software-bill-of-materials">SBOM (Software Bill of Materials):&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>A detailed list of libraries, packages, versions, and licenses within a container image.&lt;/li>
&lt;li>Machine-readable format for automated security checks.&lt;/li>
&lt;/ul>
&lt;h3 id="software-attestation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#software-attestation">Software Attestation:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Authenticated metadata about an artifact (e.g., a container image).&lt;/li>
&lt;li>Enables verification of the artifact’s integrity.&lt;/li>
&lt;/ul>
&lt;h3 id="chainguard">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#chainguard">Chainguard:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Offers streamlined, dependency-minimized packages.&lt;/li>
&lt;li>Main drawback: constant updates unless on a paid plan.&lt;/li>
&lt;/ul>
&lt;h2 id="challenges-in-immutable-environments-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#challenges-in-immutable-environments-">Challenges in Immutable Environments ♻️&lt;/a>
&lt;/h2>
&lt;h3 id="limitations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#limitations">Limitations:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Lack of SSH access and debugging tools on nodes and pods.&lt;/li>
&lt;li>Ephemeral, short-lived infrastructure and read-only filesystems.&lt;/li>
&lt;/ul>
&lt;h3 id="risks">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#risks">Risks:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>IaC misconfigurations can cause widespread outages.&lt;/li>
&lt;/ul>
&lt;h3 id="mitigation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#mitigation">Mitigation:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Implement proper GitOps workflows.&lt;/li>
&lt;li>Ensure consistency between development, staging, and production environments.&lt;/li>
&lt;/ul>
&lt;h2 id="observability-strategies-in-immutable-environments-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#observability-strategies-in-immutable-environments-">Observability Strategies in Immutable Environments 👀&lt;/a>
&lt;/h2>
&lt;h3 id="approaches">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#approaches">Approaches:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Centralized logging for better insights.&lt;/li>
&lt;li>Monitor clusters and services rather than individual pods or nodes.&lt;/li>
&lt;li>Use ephemeral debugging pods or sidecars with shared access.&lt;/li>
&lt;li>Declarative observability configurations (e.g., using Kubernetes CRDs).&lt;/li>
&lt;/ul>
&lt;h3 id="principle">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#principle">Principle:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Treat nodes and pods as “cattle, not pets” to maintain scalability and consistency.&lt;/li>
&lt;/ul>
&lt;h2 id="key-principles-of-gitops-and-declarative-infrastructure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#key-principles-of-gitops-and-declarative-infrastructure-">Key Principles of GitOps and Declarative Infrastructure 😰&lt;/a>
&lt;/h2>
&lt;h3 id="gitops-core-tenets">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#gitops-core-tenets">GitOps Core Tenets:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Git as the single source of truth.&lt;/li>
&lt;li>Automated reconciliation with tools like ArgoCD or Flux.&lt;/li>
&lt;li>Infrastructure changes are auditable and reversible.&lt;/li>
&lt;li>Prevents unauthorized and ad-hoc changes.&lt;/li>
&lt;/ul>
&lt;h3 id="homelab-use">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#homelab-use">Homelab Use:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Start with a Talos system in Docker/Podman for experimentation.&lt;/li>
&lt;/ul>
&lt;h2 id="gitops-challenges-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#gitops-challenges-">GitOps Challenges 😰&lt;/a>
&lt;/h2>
&lt;h3 id="common-issues">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#common-issues">Common Issues:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Subtle configuration drift across environments.&lt;/li>
&lt;li>Risk of manual changes not being committed back to Git.&lt;/li>
&lt;li>Managing rollouts from dev to staging to production.&lt;/li>
&lt;li>Scaling to hundreds of clusters.&lt;/li>
&lt;li>Variations in deployment strategies across teams.&lt;/li>
&lt;li>Securely managing secrets outside Git (e.g., Kubernetes Secrets, HashiCorp Vault).&lt;/li>
&lt;/ul>
&lt;h2 id="the-gitflow-workflow-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#the-gitflow-workflow-">The GitFlow Workflow 💨&lt;/a>
&lt;/h2>
&lt;h3 id="workflow-overview">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#workflow-overview">Workflow Overview:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Developers create long-lived feature branches.&lt;/li>
&lt;li>Separate primary branches for development, hotfixes, and releases.&lt;/li>
&lt;li>The trunk (dev) branch isn’t always stable or deployable.&lt;/li>
&lt;li>Multi-environment deployments often use separate release branches.&lt;/li>
&lt;/ul>
&lt;h3 id="complexity">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#complexity">Complexity:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Complex merging strategies, especially for hotfixes.&lt;/li>
&lt;li>Tools like ArgoCD or Flux can automate deployments.&lt;/li>
&lt;/ul>
&lt;h2 id="trunk-based-development-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#trunk-based-development-">Trunk-Based Development 🐘&lt;/a>
&lt;/h2>
&lt;h3 id="overview-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#overview-1">Overview:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Continuous integration with short-lived feature branches.&lt;/li>
&lt;li>Frequent commits directly to the main branch.&lt;/li>
&lt;li>Emphasizes small, incremental changes to reduce merge conflicts.&lt;/li>
&lt;/ul>
&lt;h3 id="advantages">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#advantages">Advantages:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Simplifies CI/CD pipelines.&lt;/li>
&lt;li>Encourages fast feedback and rapid delivery.&lt;/li>
&lt;/ul>
&lt;h3 id="tools-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#tools-1">Tools:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Works seamlessly with automated systems like Kubernetes or Terraform.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k8sent/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>Why K8S matters</title><link>https://trevorsmale.github.io/techblog/post/k3s/</link><pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/k3s/</guid><description>&lt;h1 id="kubernetes-is-important-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#kubernetes-is-important-">Kubernetes is Important 🌐🐳&lt;/a>
&lt;/h1>
&lt;p>Despite the jokes or criticisms you may have heard, Kubernetes matters a lot. Once I understood the &amp;ldquo;Why,&amp;rdquo; I became much more motivated to learn the &amp;ldquo;How.&amp;rdquo; This is how I got started with Kubernetes using my Proxmox Home-Lab and K3S.&lt;/p>
&lt;p>Firstly, I would like to illuminate the &amp;ldquo;Why,&amp;rdquo; as it’s an important philosophy to grasp before diving in. I firmly believe in understanding the &amp;ldquo;Why&amp;rdquo; before the &amp;ldquo;How.&amp;rdquo; 🧠&lt;/p>
&lt;h2 id="a-brief-history-of-infrastructure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#a-brief-history-of-infrastructure-">A Brief History of Infrastructure 🕰️&lt;/a>
&lt;/h2>
&lt;h3 id="the-evolution-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#the-evolution-">The Evolution 💾&lt;/a>
&lt;/h3>
&lt;p>Many moons ago 🌛, internet infrastructure relied on operating systems to run services. Unix and Linux were preferred because they are multi-user environments suitable for serving files to requesters. In fact, the first implementation of TCP was written on a UNIX system running on a NextSTEP computer. 🖥️ This model worked for decades: more users meant more machines. However, issues arose. Machines would go down, causing cascading effects. ⚠️ Misconfigurations wreaked havoc, and machines often ran inefficiently, either wasting resources or straining hardware. 🔧&lt;/p>
&lt;h3 id="in-comes-virtualization-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#in-comes-virtualization-">In Comes Virtualization 💻✨&lt;/a>
&lt;/h3>
&lt;p>Virtualization revolutionized infrastructure by allowing computers to be divided into independent virtual machines (VMs). A VM is a fully self-contained operating system. This innovation enabled more efficient utilization of hardware, increased flexibility, and reduced downtime caused by hardware failures. 🚀&lt;/p>
&lt;h3 id="containers-changed-the-game-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#containers-changed-the-game-">Containers Changed the Game 🐳📦&lt;/a>
&lt;/h3>
&lt;p>Containers brought another layer of efficiency and standardization. Unlike VMs, containers share the host operating system’s kernel but encapsulate applications and their dependencies. This reduces overhead and enables applications to run consistently across different environments. 🌍 Developers could now &amp;ldquo;build once, run anywhere,&amp;rdquo; making containers a key tool in modern infrastructure. 🛠️&lt;/p>
&lt;h3 id="orchestration-was-needed-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#orchestration-was-needed-">Orchestration Was Needed 🤖🎛️&lt;/a>
&lt;/h3>
&lt;p>As the use of containers exploded, managing them became increasingly complex. Deploying, scaling, monitoring, and maintaining hundreds or thousands of containers manually was impractical. This is where orchestration tools like Kubernetes stepped in, automating these tasks and ensuring applications are always running, balanced, and recoverable in case of failures. ✅&lt;/p>
&lt;h2 id="the-why-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#the-why-">The Why 🤔&lt;/a>
&lt;/h2>
&lt;p>Understanding the &amp;ldquo;Why&amp;rdquo; is key to appreciating Kubernetes&amp;rsquo; value. Here are some of the core reasons:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Monitoring&lt;/strong> 📊: Kubernetes provides tools and integrations to monitor your workloads, ensuring you can observe application health and performance in real time.&lt;/li>
&lt;li>&lt;strong>Logging&lt;/strong> 📝: Centralized logging in Kubernetes makes it easy to trace and debug issues across distributed systems.&lt;/li>
&lt;li>&lt;strong>Security&lt;/strong> 🔒: Kubernetes enhances security through role-based access control (RBAC), network policies, and automatic updates, reducing vulnerabilities in production systems.&lt;/li>
&lt;li>&lt;strong>Ephemerality&lt;/strong> 🌀: Kubernetes embraces the concept of ephemeral workloads, where containers can be replaced automatically if they fail, ensuring high availability.&lt;/li>
&lt;li>&lt;strong>Reproducibility&lt;/strong> 🔄: Kubernetes enables reproducible deployments by using declarative configurations, allowing you to deploy the same infrastructure consistently across environments.&lt;/li>
&lt;/ul>
&lt;p>By addressing these challenges, Kubernetes transforms the way infrastructure is managed and applications are deployed, making it a cornerstone of modern cloud-native computing. ☁️&lt;/p>
&lt;h3 id="during-week-10-of-the-prolug-course-1-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#during-week-10-of-the-prolug-course-1-">During Week 10 of the ProLUG Course &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> 🛠️📚&lt;/a>
&lt;/h3>
&lt;p>John Champine&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>, an OpenShift Engineer, delivered a compelling two-hour presentation on Kubernetes and OpenShift. His anecdotes and technical insights were especially engaging, offering both rich historical context drawn from his personal experience and intricate details about shared resource management. 🖥️⚙️&lt;/p>
&lt;h2 id="my-experience-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#my-experience-">My Experience 💻🔧&lt;/a>
&lt;/h2>
&lt;p>I heavily utilize Proxmox VE to build out simulated production environments where I can practice various administrative and engineering tasks. In my homelab, I installed K3S and Talos to create a typical dev/testing/production environment. 🌐 One particularly unique workflow I used involved building custom Podman containers—yes, Podman! 🐋&lt;/p>
&lt;p>It’s not widely known that &lt;code>podman play kube&lt;/code> &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> can create a manifest for use in Kubernetes pods. With this method, I could prototype and build out containers, functionally test them, and then publish them for declarative deployment. This approach felt incredibly slick to me, as bugs were ironed out during the process, and the final deployment was straightforward. ✅🛠️&lt;/p>
&lt;p>Most of my work was done with K3S&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>, a Rancher&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>-based distro designed for low-resource environments. However, I also experimented with Talos OS, setting up multiple virtual machines in a configuration resembling a multi-machine/node environment—with a sprinkle of jank to keep things interesting. 🤖✨&lt;/p>
&lt;p>This hands-on approach allowed me to deepen my understanding of Kubernetes while also refining workflows that integrate containerization and orchestration. 🚀&lt;/p>
&lt;h2 id="respect-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#respect-">Respect 🙌&lt;/a>
&lt;/h2>
&lt;p>From these experiences, I have developed a deep respect for Kubernetes. I see it as the operating system of the internet—an innovation that will inspire other similar systems. 🌐 While newer technologies like MicroVMs and hybrid container/VM architectures are emerging, I believe they can be easily incorporated into orchestration schemes like Kubernetes. 🤖🛠️&lt;/p>
&lt;p>Given this perspective, I think Kubernetes will remain relevant for a long time, much like Unix/Linux. 🐧 It simply makes sense given the strenuous demands of the modern internet and the ever-growing number of attacks and incidents. Such a resilient system enables greater efficiency, enhanced security, and improved situational awareness for everyone. 🔒🚀&lt;/p>
&lt;h2 id="footnotes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/k3s/#footnotes">Footnotes&lt;/a>
&lt;/h2>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>The above quote is excerpted from an earlier BlogPost &lt;a href="https://trevorsmale.github.io/techblog/post/pacu10/">Post&lt;/a> techblog, 2024.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>John Champine &lt;a href="https://www.linkedin.com/in/john-champine-2ba878114?trk=people-guest_people_search-card">Profile&lt;/a> LinkedIn, 2024.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Podman Export &lt;a href="https://docs.podman.io/en/v3.4.1/markdown/podman-play-kube.1.html">Docs&lt;/a> Podman Docs, 2019.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>K3S Website &lt;a href="https://k3s.io/">Site&lt;/a> Site, 2025.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>Rancher Website &lt;a href="https://www.rancher.com/">Site&lt;/a> Site, 2025.&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG Admin Course Unit 16 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu16/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu16/</guid><description>&lt;h1 id="incident-response">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#incident-response">Incident Response&lt;/a>
&lt;/h1>
&lt;p>Incident response is a structured approach to identifying, managing, and resolving unexpected events such as security breaches, system failures, or misconfigurations. It aims to minimize disruption, mitigate damage, and restore normal operations while implementing lessons learned to prevent future incidents.&lt;/p>
&lt;p>Responding to incidents is a stressful event because it can involve many stakeholders and little time. This week we exercised our skills by live debugging in front of our peers on a remote host. The problems all related to failure modes and misconfiguration and the exercise was rewarding in that I learned a lot as always, and built some confidence.&lt;/p>
&lt;hr>
&lt;h1 id="incident-response--troubleshooting-scenarios-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#incident-response--troubleshooting-scenarios-">Incident Response / Troubleshooting Scenarios 🧑‍💻&lt;/a>
&lt;/h1>
&lt;h2 id="scenario-1-web-server-not-running-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#scenario-1-web-server-not-running-">Scenario #1: Web Server Not Running 🕸️&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Objective&lt;/strong>: Ensure the web server is running and responding on port 80.&lt;br>
&lt;strong>Steps&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Verify web server service&lt;/strong>:
&lt;ul>
&lt;li>Run: &lt;code>systemctl enable --now httpd&lt;/code> (or similar command).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Check open ports&lt;/strong>:
&lt;ul>
&lt;li>Run: &lt;code>ss -ntulp&lt;/code>.&lt;/li>
&lt;li>Identify if the server is running on port 8087 instead of 80.&lt;/li>
&lt;li>Edit the configuration:
&lt;ul>
&lt;li>File: &lt;code>/etc/httpd/conf/httpd.conf&lt;/code>.&lt;/li>
&lt;li>Change &lt;code>Listen 8087&lt;/code> to &lt;code>Listen 80&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Restart the service: &lt;code>systemctl restart httpd&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Ensure external connectivity&lt;/strong>:
&lt;ul>
&lt;li>Check the firewall status: &lt;code>systemctl status firewalld&lt;/code>.&lt;/li>
&lt;li>Options:
&lt;ul>
&lt;li>Disable the firewall: &lt;code>systemctl stop firewalld&lt;/code>.&lt;/li>
&lt;li>Open port 80 if needed.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Final step&lt;/strong>:
&lt;ul>
&lt;li>REBOOT the lab machine.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="scenario-2-mount-point-space-not-working-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#scenario-2-mount-point-space-not-working-">Scenario #2: Mount Point /space Not Working 💾&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Objective&lt;/strong>: Set up a 9GB partition on the &lt;code>/space&lt;/code> mount point using LVM.&lt;br>
&lt;strong>Steps&lt;/strong>:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Verify &lt;code>/space&lt;/code> setup&lt;/strong>:
&lt;ul>
&lt;li>Confirm the partition is not properly set up.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Create LVM setup&lt;/strong>:
&lt;ul>
&lt;li>Identify disks: &lt;code>fdisk -l | grep -i xvd&lt;/code>.&lt;/li>
&lt;li>Create physical volumes: &lt;code>pvcreate /dev/xvd&amp;lt;disk&amp;gt;&lt;/code>.&lt;/li>
&lt;li>Create a volume group:
&lt;ul>
&lt;li>Run: &lt;code>vgcreate space /dev/xvd&amp;lt;disk1&amp;gt; /dev/xvd&amp;lt;disk2&amp;gt; /dev/xvd&amp;lt;disk3&amp;gt;&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Create a logical volume:
&lt;ul>
&lt;li>Run: &lt;code>lvcreate -n space -l +100%FREE space&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Format the logical volume&lt;/strong>:
&lt;ul>
&lt;li>Create a filesystem: &lt;code>mkfs.ext4 /dev/mapper/&amp;lt;logical_volume_name&amp;gt;&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Mount the filesystem&lt;/strong>:
&lt;ul>
&lt;li>Create the mount point: &lt;code>mkdir /space&lt;/code>.&lt;/li>
&lt;li>Add an entry in &lt;code>/etc/fstab&lt;/code>:
&lt;pre tabindex="0">&lt;code class="language-fstab" data-lang="fstab">/dev/mapper/&amp;lt;logical_volume_name&amp;gt; /space &amp;lt;ext4 or xfs&amp;gt; defaults 1 2&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>Mount the filesystem: &lt;code>mount -a&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Final step&lt;/strong>:
&lt;ul>
&lt;li>REBOOT the lab machine.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="scenario-3-system-not-updating-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#scenario-3-system-not-updating-">Scenario #3: System Not Updating 📦&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Objective&lt;/strong>: Fix the system to allow updates via &lt;code>dnf&lt;/code> and ensure kernel updates.&lt;br>
&lt;strong>Steps&lt;/strong>:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Fix DNF repository configuration&lt;/strong>:
&lt;ul>
&lt;li>Edit &lt;code>/etc/yum.repos.d/rocky.repo&lt;/code>:
&lt;ul>
&lt;li>Set &lt;code>enabled=1&lt;/code> for all necessary repositories.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Check &lt;code>/etc/yum.repos.d/rocky.repo.orig&lt;/code> for reference.&lt;/li>
&lt;li>Fix the EPEL repository the same way.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Verify kernel updates&lt;/strong>:
&lt;ul>
&lt;li>Edit &lt;code>/etc/yum.conf&lt;/code>:
&lt;ul>
&lt;li>Comment out the line: &lt;code>exclude=kernel*&lt;/code>.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Final step&lt;/strong>:
&lt;ul>
&lt;li>REBOOT the lab machine if necessary.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu16/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>Wrapping up ProLUC PAC</title><link>https://trevorsmale.github.io/techblog/post/pacurecap/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacurecap/</guid><description>&lt;h1 id="the-wrap-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#the-wrap-">The Wrap 📦&lt;/a>
&lt;/h1>
&lt;p>Yesterday, our close-knit group completed an intensive 16-week hands-on course in Enterprise Linux Administration, culminating in a live incident response session.&lt;/p>
&lt;p>Over the course of hundreds of hours, I pushed myself to go above and beyond in my studies and responsibilities. Along the way, I formed strong connections with like-minded peers, navigating the modern educational landscape of YouTube, Discord, and KillerCoda.&lt;/p>
&lt;p>I am truly grateful to have stumbled upon this seemingly random community and to have experienced the structured, effective teaching methods of Scott Champine (Het Tanis), an experienced and traditional educator.&lt;/p>
&lt;h2 id="discord-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#discord-">Discord 💬&lt;/a>
&lt;/h2>
&lt;p>To understand the environment, we must first understand the platform. Discord is a communication platform that combines text, voice, and video chat, designed to create communities where people can interact in real-time. What makes it unique is its seamless integration of customizable servers, topic-specific channels, and robust tools for both casual conversation and collaborative work.&lt;/p>
&lt;p>Working on discord harbored a comfortable sense of passive interaction. Unlike say Zoom, Skype or any other similar video communication platform, Discord allows for people to come and go as they please, have multiple presenters and open voice chat, replicating a real world meeting more closely.&lt;/p>
&lt;p>This allowed for impromptu discussions / presentation, greatly improving the learning experience.&lt;/p>
&lt;h2 id="study-group-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#study-group-">Study group 🏘️&lt;/a>
&lt;/h2>
&lt;p>Early in the course, I applied my leadership skills by organizing a formal schedule for our study group meetings. These sessions covered course assignments in detail while also exploring related topics through collaborative, interactive projects.&lt;/p>
&lt;p>The format was casual and engaging. I would share my screen to walk through scenarios while the group discussed the subject matter. Others also shared their screens, demonstrating tips and tricks in unison.&lt;/p>
&lt;p>One of the most effective tools I introduced was a shared note using Etherpad. Similar to Google Docs, Etherpad allows multiple people to edit a document simultaneously. However, it stands out by enabling access without requiring sign-in credentials, making it easy to share with anyone.&lt;/p>
&lt;p>These activities relied heavily on trust, as it would have been easy for someone to disrupt the sessions. My leadership skills were frequently tested by off-topic individuals or disruptive participants, but such issues were usually short-lived.&lt;/p>
&lt;h2 id="gains-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#gains-">Gains 💪🏻&lt;/a>
&lt;/h2>
&lt;p>Coming into the course, I already had a solid understanding of Linux, backed by a few years of experience. Additionally, I had completed RWXRob’s (Rob Muhlestein’s) Beginner Boost DevOps course a year prior.&lt;/p>
&lt;p>What set this course apart was its group-learning dynamic. During Rob’s course, I worked alone, building projects and debugging through hard-fought, self-directed methods like reading documentation, brute-forcing solutions, and referencing forums. In contrast, group work brought added motivation, inspiration, and a collaborative approach to problem-solving. It helped eliminate mundane, off-topic roadblocks, allowing us to focus on core learning and progress more efficiently.&lt;/p>
&lt;h2 id="connections-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#connections-">Connections ⛓️&lt;/a>
&lt;/h2>
&lt;p>Through the study group and community discussions, I’ve developed a strong connection with the ProLUG community and feel confident that I can rely on the server for discussions, questions, and troubleshooting. In the near future, I plan to give back by supporting future coursework and helping new learners navigate their journey.&lt;/p>
&lt;h2 id="thankful-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#thankful-">Thankful 🙏&lt;/a>
&lt;/h2>
&lt;p>I’m deeply grateful to Scott Champine (Het Tanis) for offering this free course and dedicating so much of his time to it. I’m equally thankful to the server members who joined the study group and dove headfirst into the intricacies of systems.&lt;/p>
&lt;p>Until next time! ✌️&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacurecap/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 15 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu15/</link><pubDate>Wed, 25 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu15/</guid><description>&lt;h1 id="engineering-troubleshooting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#engineering-troubleshooting">Engineering Troubleshooting&lt;/a>
&lt;/h1>
&lt;p>Systems engineering troubleshooting involves diagnosing and resolving complex issues within interconnected systems to ensure seamless operation and optimal performance. It requires a methodical approach to identify root causes, integrate solutions, and maintain system functionality while addressing both technical and process-related challenges.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#discussion-post-1">Discussion Post 1:&lt;/a>
&lt;/h2>
&lt;p>Your management is all fired up about implementing some Six Sigma processes around the company. You decide to familiarize yourself and get some basic understanding to pass along to your team.&lt;/p>
&lt;h3 id="quoted-from-the-book">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#quoted-from-the-book">Quoted from the book&lt;/a>
&lt;/h3>
&lt;p>5S is a Japanese Lean approach to organizing a workspace, so that by making a process more effective and efficient, it will become easier to identify and expunge muda. 5S relies on visual cues and a clean work area to enhance efficiencies, reduce accidents, and standardize workflows to reduce defects. The method is based on five steps:&lt;/p>
&lt;ul>
&lt;li>Sort (Seiri)&lt;/li>
&lt;li>Straighten (Seiton)&lt;/li>
&lt;li>Shine (Seiso)&lt;/li>
&lt;li>Standardize (Seiketsu)&lt;/li>
&lt;li>Sustain (Shitsuke)&lt;/li>
&lt;/ul>
&lt;h3 id="what-about-the-5s-methodology-might-help-us-as-a-team-of-system-administrators">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#what-about-the-5s-methodology-might-help-us-as-a-team-of-system-administrators">What about the “5S” methodology might help us as a team of system administrators?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Identify and categorize common troubleshooting problems such as typos, illogical configurations, or vulnerabilities to establish clarity and prioritize issues. (Seiri)&lt;/li>
&lt;li>Organize and catalog processes and procedures for addressing both routine and uncommon problem scenarios for quick access and consistency. (Seiton)&lt;/li>
&lt;li>Validate and test all processes and procedures to ensure they function effectively and reliably. (Seiso)&lt;/li>
&lt;li>Promote team familiarity by regularly practicing and drilling procedures, similar to incident response training, to build confidence and efficiency. (Seiketsu)&lt;/li>
&lt;li>Apply the processes and procedures in real-world scenarios, evaluate their effectiveness, make necessary adjustments, and document improvements for future use. (Shitsuke)&lt;/li>
&lt;/ul>
&lt;p>By applying the 5S methodology to troubleshooting, the team can develop a shared understanding of how to consistently address issues, identify system failure points, and create opportunities for incremental improvement, fostering a sense of flow and efficiency.&lt;/p>
&lt;h3 id="what-are-the-four-layers-of-process-definition-how-would-you-explain-them-to-your-junior-engineers">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#what-are-the-four-layers-of-process-definition-how-would-you-explain-them-to-your-junior-engineers">What are the four layers of process definition? How would you explain them to your junior engineers?&lt;/a>
&lt;/h3>
&lt;p>input - anything entering the process or is required to enter the process to drive the creation of an output
outputs - service or product that is created by this process
events - predefined criteria or actions that cause a process to begin working.
tasks - activities are the heart. a unit of action within the process.
4.1 - Decisions are possible made during or for tasks.&lt;/p>
&lt;p>The four layers of a process—inputs, outputs, events, and tasks—function similarly to how a computer program uses functions to process variables and produce results. However, in a Six Sigma process, these elements are more dynamic, encompassing both virtual and physical components, as well as steps that may be driven by either human actions or automated systems. This flexibility allows Six Sigma to address complex workflows that combine diverse inputs and tasks to achieve consistent and efficient outputs.&lt;/p>
&lt;p>Looking at our operation as a series of processes with layers like this can help us to identify, refine and standardize processes into Standard Operating Procedures (SOP&amp;rsquo;s).&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-2-your-team-looks-at-a-lot-of-visual-data-you-decide-to-write-up-an-explanation-for-them-to-explain-what-they-look-at">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#discussion-post-2-your-team-looks-at-a-lot-of-visual-data-you-decide-to-write-up-an-explanation-for-them-to-explain-what-they-look-at">Discussion Post 2: Your team looks at a lot of visual data. You decide to write up an explanation for them to explain what they look at.&lt;/a>
&lt;/h2>
&lt;h3 id="what-is-a-high-water-mark-why-might-it-be-good-to-know-in-utilization-of-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#what-is-a-high-water-mark-why-might-it-be-good-to-know-in-utilization-of-systems">What is a high water mark? Why might it be good to know in utilization of systems?&lt;/a>
&lt;/h3>
&lt;p>The phrase “high water mark” originates from marking a riverbank to indicate the highest water level reached during a season. This mark serves as a warning, signaling potential danger if the water rises beyond it in the future.
In the context of systems, the high water mark represents historically safe operational loads. If metrics indicate that this threshold has been exceeded, it should alert administrators to a potential issue.
For example, if the high water mark for daily memory usage was 14/18 GiB of RAM, and we observe the system suddenly using 16/16 GiB, this warrants attention as a potential problem requiring further investigation.&lt;/p>
&lt;h3 id="what-is-an-upper-and-lower-control-limit-in-a-system-output-while-this-isnt-exactly-what-were-looking-at-why-might-it-be-good-to-explain-to-your-junior-engineers">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#what-is-an-upper-and-lower-control-limit-in-a-system-output-while-this-isnt-exactly-what-were-looking-at-why-might-it-be-good-to-explain-to-your-junior-engineers">What is an upper and lower control limit in a system output? While this isn’t exactly what we’re looking at, why might it be good to explain to your junior engineers?&lt;/a>
&lt;/h3>
&lt;p>Control limits are essential tools for monitoring the stability of a process over time. The upper and lower control limits define the normal range within which a process output should remain when the process is operating correctly. If the output exceeds these boundaries, it signals a potential issue, indicating that the process may be out of control and requiring investigation or troubleshooting.&lt;/p>
&lt;hr>
&lt;h2 id="definitionsterminology">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#definitionsterminology">Definitions/Terminology&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Incident&lt;/strong> An unplanned event that disrupts normal operations.&lt;/li>
&lt;li>&lt;strong>Problem&lt;/strong> The underlying cause of one or more incidents.&lt;/li>
&lt;li>&lt;strong>FMEA&lt;/strong> (Failure Mode and Effects Analysis): A method for identifying and prioritizing potential failure points in a process.&lt;/li>
&lt;li>&lt;strong>Six Sigma&lt;/strong> A data-driven methodology focused on improving processes by reducing defects and variability.&lt;/li>
&lt;li>&lt;strong>TQM&lt;/strong> (Total Quality Management): A management approach emphasizing continuous improvement and customer satisfaction across all organizational processes.&lt;/li>
&lt;li>&lt;strong>Post Mortem&lt;/strong> A retrospective analysis of an event to identify successes and areas for improvement.&lt;/li>
&lt;li>&lt;strong>Scientific Method&lt;/strong> A systematic process of forming hypotheses, testing them, and analyzing results to draw conclusions.&lt;/li>
&lt;li>&lt;strong>Iterative&lt;/strong> A repetitive approach to refining a process or solution through successive cycles.&lt;/li>
&lt;li>&lt;strong>Discrete Data&lt;/strong> Data that can only take specific, distinct values.&lt;/li>
&lt;li>&lt;strong>Ordinal&lt;/strong> Data with a meaningful order but no consistent interval (e.g., satisfaction ratings).&lt;/li>
&lt;li>&lt;strong>Nominal&lt;/strong> (Binary/Attribute): Categorical data without order, such as “yes/no” or “male/female.”&lt;/li>
&lt;li>&lt;strong>Continuous Data&lt;/strong> Data that can take any value within a range, such as temperature or time.&lt;/li>
&lt;li>&lt;strong>Risk Priority Number (RPN)&lt;/strong> A score in FMEA used to prioritize risks, calculated as Severity × Occurrence × Detection.&lt;/li>
&lt;li>&lt;strong>5 Whys&lt;/strong> A technique to identify the root cause of a problem by repeatedly asking “why” until the root cause is found.&lt;/li>
&lt;li>&lt;strong>Fishbone Diagram (Ishikawa)&lt;/strong> A visual tool used to identify and categorize potential causes of a problem.&lt;/li>
&lt;li>&lt;strong>Fault Tree Analysis (FTA)&lt;/strong> A deductive analysis method used to identify the root causes of system failures.&lt;/li>
&lt;li>&lt;strong>PDCA (Plan-Do-Check-Act)&lt;/strong> A cyclical process for continuous improvement in workflows or systems.&lt;/li>
&lt;li>&lt;strong>SIPOC&lt;/strong> A high-level process map identifying Suppliers, Inputs, Processes, Outputs, and Customers.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu15/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 14 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu14/</link><pubDate>Sun, 22 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu14/</guid><description>&lt;h1 id="ansible-automation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#ansible-automation">Ansible Automation&lt;/a>
&lt;/h1>
&lt;p>Ansible is an open-source automation tool used for configuration management, application deployment, and IT orchestration, enabling tasks to be executed on multiple systems simultaneously without the need for agents. It uses simple YAML-based playbooks and SSH for communication, making it efficient and easy to learn for managing infrastructure.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#discussion-post-1">Discussion Post 1:&lt;/a>
&lt;/h2>
&lt;p>Refer to your Unit 5 scan of the systems. You know that Ansible
is a tool that you want to maintain in the environment. Review this online documentation:
&lt;a href="https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html">https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html&lt;/a>&lt;/p>
&lt;h3 id="make-an-inventory-of-the-servers-grouped-any-way-you-like">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#make-an-inventory-of-the-servers-grouped-any-way-you-like">Make an inventory of the servers, grouped any way you like.&lt;/a>
&lt;/h3>
&lt;p>[warewulf]
192.168.200.25&lt;/p>
&lt;p>[ubuntu]
192.168.200.[101:103]
192.168.200.[201:203]&lt;/p>
&lt;p>[rockynodes]
192.168.200.[51:69]&lt;/p>
&lt;h3 id="what-format-did-you-choose-to-use-for-your-inventory">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#what-format-did-you-choose-to-use-for-your-inventory">What format did you choose to use for your inventory?&lt;/a>
&lt;/h3>
&lt;p>INI. YAML seems to be the clear choice as it allows for a more declarative inventory. However, while working in the study group it was easier to edit INI without making indentation errors.&lt;/p>
&lt;h3 id="what-other-things-might-you-include-later-in-your-inventory-to-make-it-more-useful">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#what-other-things-might-you-include-later-in-your-inventory-to-make-it-more-useful">What other things might you include later in your inventory to make it more useful?&lt;/a>
&lt;/h3>
&lt;p>I can add quite a few interesting things to an inventory file to make it more useful. Once the file reaches a certain size, it is better to break it out into separate unit files that are nested for things like Hosts, Host Variables, Production, Staging etc&amp;hellip;&lt;/p>
&lt;p>Some notable things I think make things pretty powerful are:&lt;/p>
&lt;ul>
&lt;li>Dynamic Inventorying&lt;/li>
&lt;li>Vault encrypted secrets&lt;/li>
&lt;li>Jinja2 Dynamic variables&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#discussion-post-2">Discussion Post 2:&lt;/a>
&lt;/h2>
&lt;p>You have been noticing drift on your server configurations, so
you want a way to generate a report on them every day to validate the configurations are the
same.&lt;/p>
&lt;ul>
&lt;li>Use any lab in here to find ideas: &lt;a href="https://killercoda.com/het-tanis/course/Ansible-">https://killercoda.com/het-tanis/course/Ansible-&lt;/a>
Labs Use this webhook to send your relevant data out to our sandbox.
&lt;a href="https://discord.com/api/webhooks/1317659221604433951/uyKpuq8fNNNSEyCra4n33PakI">https://discord.com/api/webhooks/1317659221604433951/uyKpuq8fNNNSEyCra4n33PakI&lt;/a>
Bk-XtTn1WrwTpHs9BcgkIu7URPV_Gd5HJCRX0_EJVUT&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>name: System Information Check
hosts: all
become: yes
tasks:
&lt;ul>
&lt;li>
&lt;p>name: Check kernel version
command: uname -r
register: kernel_version&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Display kernel version
debug:
msg: &amp;ldquo;Kernel Version: {{ kernel_version.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Display kernel command line
command: cat /proc/cmdline
register: kernel_cmdline&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug kernel command line
debug:
msg: &amp;ldquo;Kernel Command Line: {{ kernel_cmdline.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Check hardware information
command: lshw
register: hardware_info&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug hardware information
debug:
msg: &amp;ldquo;Hardware Information: {{ hardware_info.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: List installed RPM packages
command: rpm -qa
register: installed_rpms&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug installed RPM packages
debug:
msg: &amp;ldquo;Installed RPMs: {{ installed_rpms.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Check active services
command: systemctl list-units &amp;ndash;type=service &amp;ndash;state=running
register: active_services&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug active services
debug:
msg: &amp;ldquo;Active Services: {{ active_services.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: List system users
command: cat /etc/passwd
register: system_users&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug system users
debug:
msg: &amp;ldquo;System Users: {{ system_users.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Check last login information
command: last
register: last_login&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug last login information
debug:
msg: &amp;ldquo;Last Login Information: {{ last_login.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Display currently logged-in users
command: w
register: logged_in_users&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug currently logged-in users
debug:
msg: &amp;ldquo;Logged-in Users: {{ logged_in_users.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Display ISO time
command: date &amp;ndash;iso-8601=seconds
register: iso_time&lt;/p>
&lt;/li>
&lt;li>
&lt;p>name: Debug ISO time
debug:
msg: &amp;ldquo;ISO Time: {{ iso_time.stdout }}&amp;rdquo;&lt;/p>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="discussion-post-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#discussion-post-3">Discussion Post 3:&lt;/a>
&lt;/h2>
&lt;p>Using ansible module for git, pull down this repo: 👍
&lt;a href="https://github.com/het-tanis/HPC_Deploy.git">https://github.com/het-tanis/HPC_Deploy.git&lt;/a>&lt;/p>
&lt;h3 id="how-is-the-repo-setup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#how-is-the-repo-setup">How is the repo setup?&lt;/a>
&lt;/h3>
&lt;p>We have 3 playbooks in the root of the directory. These playbooks utilize roles defined in the roles subdirectory.
Playbook 01 gathers facts about nfs using roles defined in a subdirectory called roles.
Playbook 02 gathers data from a target system using roles defined in a subdirectory called data-gather.
Playbook 03 updates and installs using roles defined in a subdirectory called packages_update/tasks &amp;amp; packages_install/tasks.&lt;/p>
&lt;h3 id="what-is-in-the-roles-directory">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#what-is-in-the-roles-directory">What is in the roles directory?&lt;/a>
&lt;/h3>
&lt;p>Partially answered for the previous question.
Roles are structured with dedicated directories for tasks, handlers, and templates.&lt;/p>
&lt;h3 id="how-are-these-playbooks-called-and-how-do-roles-differ-from-tasks">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#how-are-these-playbooks-called-and-how-do-roles-differ-from-tasks">How are these playbooks called, and how do roles differ from tasks?&lt;/a>
&lt;/h3>
&lt;p>These playbooks incorporate roles based on specific conditions, executing the tasks defined within each role. When a role is included, the playbook inherits all its contents.&lt;/p>
&lt;hr>
&lt;h2 id="digging-deeper">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#digging-deeper">Digging Deeper&lt;/a>
&lt;/h2>
&lt;h3 id="i-have-a-large-amount-of-labs-to-get-you-started-on-your-ansible-journey-all-free">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#i-have-a-large-amount-of-labs-to-get-you-started-on-your-ansible-journey-all-free">I have a large amount of labs to get you started on your Ansible Journey (all free):&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Ansible-Labs">https://killercoda.com/het-tanis/course/Ansible-Labs&lt;/a> 👍&lt;/p>
&lt;h3 id="find-projects-from-our-channel-ansible-code-in-discord-and-find-something-that-is">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#find-projects-from-our-channel-ansible-code-in-discord-and-find-something-that-is">Find projects from our channel Ansible-Code, in Discord and find something that is&lt;/a>
&lt;/h3>
&lt;p>interesting to you. 👍&lt;/p>
&lt;h3 id="use-ansible-to-access-secrets-from-hashicorp-vault-httpskillercodacomhet-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#use-ansible-to-access-secrets-from-hashicorp-vault-httpskillercodacomhet-">Use Ansible to access secrets from Hashicorp Vault: &lt;a href="https://killercoda.com/het-">https://killercoda.com/het-&lt;/a>&lt;/a>
&lt;/h3>
&lt;p>tanis/course/Hashicorp-Labs/004-vault-read-secrets-ansible 👍&lt;/p>
&lt;hr>
&lt;h1 id="lab-work---">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#lab-work---">Lab Work 🧪 👍&lt;/a>
&lt;/h1>
&lt;h3 id="create-an-inventory">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#create-an-inventory">Create an inventory:&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>While still in the /root/ansible_madness directory, create a file hosts
vi /root/ansible_madness/hosts
Populate the file as follows&lt;/li>
&lt;/ol>
&lt;p>[servers]&lt;/p>
&lt;ul>
&lt;li>192.168.200.101&lt;/li>
&lt;li>192.168.200.102&lt;/li>
&lt;li>192.168.200.103&lt;/li>
&lt;/ul>
&lt;p>Run Ad Hoc commands against your servers
This will test your connection into all the servers.&lt;/p>
&lt;h3 id="1-ansible-servers--i-hosts--u-inmate--k--m-shell--a-uptime">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#1-ansible-servers--i-hosts--u-inmate--k--m-shell--a-uptime">1. ansible servers -i hosts -u inmate -k -m shell -a uptime&lt;/a>
&lt;/h3>
&lt;p>Use this password: LinuxR0cks1!&lt;/p>
&lt;p>Do the same thing, but this time be verbose&lt;/p>
&lt;h3 id="2-ansible--vvv-servers--i-hosts--u-inmate--k--m-shell--a-uptime">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#2-ansible--vvv-servers--i-hosts--u-inmate--k--m-shell--a-uptime">2. ansible -vvv servers -i hosts -u inmate -k -m shell -a uptime&lt;/a>
&lt;/h3>
&lt;p>Create a playbook to push over files.&lt;/p>
&lt;h3 id="3-echo-this-is-my-file-yourname--somefile">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#3-echo-this-is-my-file-yourname--somefile">3. echo &amp;ldquo;This is my file &lt;!-- raw HTML omitted -->&amp;rdquo; &amp;gt; somefile&lt;/a>
&lt;/h3>
&lt;h3 id="4-vi-deployyaml">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#4-vi-deployyaml">4. vi deploy.yaml&lt;/a>
&lt;/h3>
&lt;p>Populate it as follows:&lt;/p>
&lt;pre>&lt;code>name: Start of push playbook
hosts: servers
vars:
gather_facts: True
become: False
tasks:
name: Copy somefile over at {{ ansible_date_time.iso8601_basic_short }}
copy:
src: /root/ansible_madness/somefile
dest: /tmp/somefile.txt
&lt;/code>&lt;/pre>
&lt;h3 id="5-execute-your-playbook">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#5-execute-your-playbook">5. Execute your playbook&lt;/a>
&lt;/h3>
&lt;p>ansible-playbook -i hosts -k deploy.yaml&lt;/p>
&lt;h3 id="6-verify-that-your-file-pushed-everywhere">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#6-verify-that-your-file-pushed-everywhere">6. Verify that your file pushed everywhere&lt;/a>
&lt;/h3>
&lt;p>ansible servers -i hosts -u inmate -k -m shell -a “ls -l /tmp/somefile”
Pull down a github repo&lt;/p>
&lt;ol>
&lt;li>git clone &lt;a href="https://github.com/het-tanis/HPC_Deploy.git">https://github.com/het-tanis/HPC_Deploy.git&lt;/a>
cd HPC_Deploy
What do you see in here?
What do you need to learn about more to deploy some of these tools?
Can you execute some of these, why or why not?&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#reflection-questions">Reflection Questions&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>What questions do you still have about this week?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu14/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 13 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu13/</link><pubDate>Sun, 15 Dec 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu13/</guid><description>&lt;h1 id="system-hardening">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#system-hardening">System Hardening&lt;/a>
&lt;/h1>
&lt;p>Linux system hardening involves securing the system by reducing its attack surface through measures such as disabling unnecessary services, enforcing access controls, applying security patches, and using tools like OpenSCAP, STIG compliance frameworks, or the OSCAP Scanner. These tools help automate security audits, enforce compliance standards, and identify vulnerabilities to enhance system security.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#discussion-post-1">Discussion Post 1:&lt;/a>
&lt;/h2>
&lt;p>Your security team comes to you with a discrepancy between
the production security baseline and something that is running on one of your servers in
production. There are 5 servers in a web cluster and only one of them is showing this
behavior. They want you to account for why something is different.&lt;/p>
&lt;h3 id="how-are-you-going-to-validate-that-the-difference-between-the-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#how-are-you-going-to-validate-that-the-difference-between-the-systems">How are you going to validate that the difference between the systems?&lt;/a>
&lt;/h3>
&lt;p>I am going to assume that I am new to the system in general and have very surface knowledge from fellow staff. I am also assuming we are working with a redhat based system.&lt;/p>
&lt;h4 id="starting-off-simple">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#starting-off-simple">Starting off simple&lt;/a>
&lt;/h4>
&lt;p>Maybe the problem is an obvious one, so I would just start off with a glance.&lt;/p>
&lt;ul>
&lt;li>Quick cursory check (Kernel Version uname-a)&lt;/li>
&lt;li>Manually Checking Logs (Journalctl, dmesg, audit.log, syslog)&lt;/li>
&lt;li>Checking ports (Socket Statistics, ss -ntulp)&lt;/li>
&lt;li>Listing installed packages (DNF list, RPM -qa)&lt;/li>
&lt;li>Listing users and Logins (/etc/passwd, w, last)&lt;/li>
&lt;li>Seeing what System D services are running (systemctl list-units - -type=service)&lt;/li>
&lt;li>Digging for documentation and or commit history&lt;/li>
&lt;/ul>
&lt;h4 id="deeper-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#deeper-">Deeper ⛏️&lt;/a>
&lt;/h4>
&lt;p>If no low hanging fruit were there, then I would check configurations&lt;/p>
&lt;ul>
&lt;li>Grub.conf, FirewallD/Apparmour, SELinux,&lt;/li>
&lt;/ul>
&lt;h4 id="sorting-ish-from-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#sorting-ish-from-">Sorting 🪰&amp;lsquo;ish from 🌶️&lt;/a>
&lt;/h4>
&lt;p>If I do that see something distinctly different, I would employ a more sophisticated approach with difference checking.
Given that everything is a structured file, I can append the output from a working system and the goose 🪿 to a new file and run diff against them.&lt;/p>
&lt;ul>
&lt;li>Diff&amp;rsquo;ing the Logs&lt;/li>
&lt;li>Diff&amp;rsquo;ing Socket Statistics&lt;/li>
&lt;li>Diff&amp;rsquo;ing Installed Packages&lt;/li>
&lt;/ul>
&lt;h3 id="what-are-you-going-to-look-at-to-explain-this">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#what-are-you-going-to-look-at-to-explain-this">What are you going to look at to explain this?&lt;/a>
&lt;/h3>
&lt;p>I think I have answered this above.&lt;/p>
&lt;h3 id="what-could-be-done-to-prevent-this-problem-in-the-future">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#what-could-be-done-to-prevent-this-problem-in-the-future">What could be done to prevent this problem in the future?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Introducing or Improving the change management policy and employing version control would be my first suggestion.&lt;/li>
&lt;li>Ensuring that there is a build/test/deploy pipeline that integrates tightly with change management.&lt;/li>
&lt;li>Using IaC and Automation to ensure consistency and repeatability with tools like Ansible, Packer, Podman or Kubernetes.&lt;/li>
&lt;li>Hardening systems with either simple policies or through the guidance of STIG&amp;rsquo;s.&lt;/li>
&lt;li>Introducing stronger controls over user privileges like employing RBA policies.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#discussion-post-2">Discussion Post 2:&lt;/a>
&lt;/h2>
&lt;p>Your team has been giving you more and more engineering
responsibilities. You are being asked to build out the next set of servers to integrate into the
development environment. Your team is going from RHEL 8 to Rocky 9.4.&lt;/p>
&lt;h3 id="how-might-you-start-to-plan-out-your-migration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#how-might-you-start-to-plan-out-your-migration">How might you start to plan out your migration?&lt;/a>
&lt;/h3>
&lt;h4 id="observe">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#observe">Observe&lt;/a>
&lt;/h4>
&lt;p>Firstly I would gather system information&lt;/p>
&lt;ul>
&lt;li>Benchmark/baseline performance metrics and utilization (Disk, I/O, PS, Connections etc)&lt;/li>
&lt;li>Configs (Scripts and configuration files)&lt;/li>
&lt;li>Installed Packages.&lt;/li>
&lt;li>users (Listing users and privileges)&lt;/li>
&lt;li>Policies (Firewall, SELinux)&lt;/li>
&lt;li>Purpose (Assessing the use of a particular system to see if may need changes/upgrades)&lt;/li>
&lt;/ul>
&lt;h4 id="capture">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#capture">Capture&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>I would snapshot the current system if possible&lt;/li>
&lt;li>If a complete snapshot copy is not possible, I would gather files essential to rebuilding a replica&lt;/li>
&lt;/ul>
&lt;h4 id="reconstruct">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#reconstruct">Reconstruct&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Build it in a test VM emulating the current environment&lt;/li>
&lt;li>Template the VM for experimental changes (Adding additional tools or Configs)&lt;/li>
&lt;/ul>
&lt;h4 id="analyze--optimize">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#analyze--optimize">Analyze / Optimize&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Gather business or operational requirements, perhaps the system needs enhancements&lt;/li>
&lt;li>Experiment with performance tuning&lt;/li>
&lt;li>Test new packages and/or configurations&lt;/li>
&lt;/ul>
&lt;h4 id="build">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#build">Build&lt;/a>
&lt;/h4>
&lt;p>During the analysis and optimization phase, I would start a playbook with information gathered from previous phases.
I would build and run the playbook against VM templates until satisfied.&lt;/p>
&lt;h4 id="deploy">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#deploy">Deploy&lt;/a>
&lt;/h4>
&lt;p>Given the prior phases, my Playbook would be robust and capable of the transition.
However, I would ensure a robust backup and rollback plan in the case something fails.&lt;/p>
&lt;h3 id="what-are-you-going-to-check-on-the-existing-systems-to-baseline-your-build">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#what-are-you-going-to-check-on-the-existing-systems-to-baseline-your-build">What are you going to check on the existing systems to baseline your build?&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>Compute Usage&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Memory Load&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Disk Resources&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Networking Metrics&lt;/strong>&lt;/li>
&lt;/ol>
&lt;h3 id="what-kind-of-validation-plan-might-you-use-for-your-new-rocky-94-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#what-kind-of-validation-plan-might-you-use-for-your-new-rocky-94-systems">What kind of validation plan might you use for your new Rocky 9.4 systems?&lt;/a>
&lt;/h3>
&lt;p>I would have a seperate playbook built that would validate performance against what I was observing during my VM experimentation.
Though the environment may differ from that of the VM, I would still be able to discern performance characteristics and notice any outlier differences.&lt;/p>
&lt;hr>
&lt;h2 id="digging-deeper">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#digging-deeper">Digging Deeper&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>Run through this lab: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/107-server-startup-process">https://killercoda.com/het-tanis/course/Linux-Labs/107-server-startup-process&lt;/a> 👍&lt;/li>
&lt;/ol>
&lt;h3 id="how-does-this-help-you-better-understand-the-discussion-13-2-question">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#how-does-this-help-you-better-understand-the-discussion-13-2-question">How does this help you better understand the discussion 13-2 question?&lt;/a>
&lt;/h3>
&lt;p>Well when I am gathering a picture of my current security baseline, I can use some of these tools like dmesg and ss to see what possible attack surface I may have.&lt;/p>
&lt;ol start="2">
&lt;li>Run through this lab: &lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/203-updating-golden-image">https://killercoda.com/het-tanis/course/Linux-Labs/203-updating-golden-image&lt;/a> 👍&lt;/li>
&lt;/ol>
&lt;h3 id="how-does-this-help-you-better-understand-the-process-of-hardening-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#how-does-this-help-you-better-understand-the-process-of-hardening-systems">How does this help you better understand the process of hardening systems?&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#reflection-questions">Reflection Questions&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>What questions do you still have about this week?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h1 id="lab-work-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#lab-work-">Lab Work 🧪&lt;/a>
&lt;/h1>
&lt;h3 id="1-you-will-scan-a-server-for-a-scc-report-and-get-a-stig-score-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#1-you-will-scan-a-server-for-a-scc-report-and-get-a-stig-score-">1. You will scan a server for a SCC Report and get a STIG Score 👍&lt;/a>
&lt;/h3>
&lt;h3 id="2-you-will-remediate-some-of-the-items-from-the-scan-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#2-you-will-remediate-some-of-the-items-from-the-scan-">2. You will remediate some of the items from the scan 👍&lt;/a>
&lt;/h3>
&lt;h3 id="3-you-will-rescan-and-verify-a-better-score-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#3-you-will-rescan-and-verify-a-better-score-">3. You will rescan and verify a better score. 👍&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu13/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 12 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu12/</link><pubDate>Sat, 30 Nov 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu12/</guid><description>&lt;h1 id="baselining--benchmarking">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#baselining--benchmarking">Baselining &amp;amp; Benchmarking&lt;/a>
&lt;/h1>
&lt;p>The purpose of a baseline is not to find fault, load, or to take corrective action. A baseline simply
determines what is. You must know what is so that you can test against that when you make a change to
be able to objectively say there was or wasn&amp;rsquo;t an improvement. You must know where you are at to be
able to properly plan where you are going. A poor baseline assessment, because of inflated numbers or
inaccurate testing, does a disservice to the rest of your project. You must accurately draw the first line
and understand your system&amp;rsquo;s performance.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#discussion-post-1">Discussion Post 1:&lt;/a>
&lt;/h2>
&lt;p>Your manager has come to you with another emergency. He has a meeting next week to discuss capacity planning and usage of the system with IT upper management. He doesn’t want to lose his budget, but he has to prove that the system utilization warrants spending more.&lt;/p>
&lt;ul>
&lt;li>What information can you show your manager from your systems?&lt;/li>
&lt;/ul>
&lt;p>You could present your manager with a progressive trend graph showing time on the x-axis and several fields on the y-axis that represent changes from a baseline, assuming the necessary data has been collected. With this information, it would be possible to predict when various system resources will reach their maximum capacity.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>What type of data would prove system utilization? (Remember the big 4: compute, memory, disk, networking)&lt;/p>
&lt;p>CPU load, process execution time, throughput.
Disk Operations (IOPS).
Networking Requests and Bandwidth.
RAM utilization, memory paging/swapping rates.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>What would your report look like to your manager?&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h1 id="capacity-planning-report">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#capacity-planning-report">Capacity Planning Report&lt;/a>
&lt;/h1>
&lt;p>Current and projected system utilization. By examining trends over time, we can predict when critical resources will reach their limits if no additional capacity is provisioned.&lt;/p>
&lt;h2 id="key-areas-of-focus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#key-areas-of-focus">Key Areas of Focus&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Compute Usage&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Memory Load&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Disk Resources&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Networking Metrics&lt;/strong>&lt;/li>
&lt;/ol>
&lt;h2 id="historical-data-and-trends">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#historical-data-and-trends">Historical Data and Trends&lt;/a>
&lt;/h2>
&lt;p>Below is a sample progressive trend graph over the last 6 months. The x-axis represents time (in weeks), while the y-axis shows percentage utilization relative to an established baseline.&lt;/p>
&lt;p>&lt;strong>Example Metrics (relative to baseline):&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>CPU Utilization (% of baseline)&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Memory Load (% of baseline)&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Disk IOPS (% of baseline)&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Network Throughput (% of baseline)&lt;/strong>&lt;/p>
&lt;p>Time (Weeks): 1 2 3 4 5 6 … 20 21 22
CPU Util(%): 50 52 55 57 60 62 … 80 82 85
Memory(%): 45 47 50 50 52 55 … 70 73 75
Disk IOPS(%): 30 32 35 36 38 40 … 60 63 68
Network(%): 40 42 45 47 49 51 … 75 78 80&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>As time progresses, each of the key metrics is trending upward, indicating increasing load and approaching capacity thresholds.&lt;/p>
&lt;h2 id="projections">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#projections">Projections&lt;/a>
&lt;/h2>
&lt;p>We can estimate the “time to ceiling” for critical resources. For instance, if CPU load is rising at an average rate of 2–3% per month, and we know that at 90% utilization the system will experience performance degradation.&lt;/p>
&lt;p>&lt;strong>Projected Time to CPU Ceiling:&lt;/strong> 3–5 months&lt;br>
&lt;strong>Projected Time to Memory Ceiling:&lt;/strong> 6–8 months&lt;br>
&lt;strong>Projected Time to Disk IOPS Ceiling:&lt;/strong> 8–10 months&lt;br>
&lt;strong>Projected Time to Network Bandwidth Ceiling:&lt;/strong> 4–6 months&lt;/p>
&lt;h2 id="recommendations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#recommendations">Recommendations&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Compute&lt;/strong>: Consider adding more CPU cores or upgrading processors before reaching the predicted 90% utilization mark.&lt;/li>
&lt;li>&lt;strong>Memory&lt;/strong>: Upgrade RAM or optimize applications to reduce memory footprint.&lt;/li>
&lt;li>&lt;strong>Disk&lt;/strong>: Enhance disk subsystems or switch to faster storage (e.g., SSDs) to handle projected IOPS.&lt;/li>
&lt;li>&lt;strong>Networking&lt;/strong>: Increase network capacity (e.g., from 1Gb to 10Gb links) or optimize network traffic.&lt;/li>
&lt;/ul>
&lt;h2 id="conclusion">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#conclusion">Conclusion&lt;/a>
&lt;/h2>
&lt;p>Investment in scaling resources now will prevent future performance bottlenecks, ensuring the system can continue to meet business demands effectively.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#discussion-post-2">Discussion Post 2:&lt;/a>
&lt;/h2>
&lt;p>You are in a capacity planning meeting with a few of the architects. They have decided to add 2 more agents to your Linux Sytems, Bacula Agent and an Avamar Agent . They expect these agents to run their work starting at 0400 every morning.&lt;/p>
&lt;ul>
&lt;li>What do these agents do? (May have to look them up)&lt;/li>
&lt;/ul>
&lt;p>Bacula is an open-source suite of tools designed to automate backup tasks. It’s widely regarded for its flexibility and reliability. Dell Avamar, on the other hand, is a commercial backup automation solution. Both tools handle incremental backups using custom daemons that monitor changes over time, offering greater sophistication than simple scheduling systems like Cron. Additionally, they can manage backups across diverse, heterogeneous storage environments.&lt;/p>
&lt;ul>
&lt;li>Do you think there is a good reason not to use these agents at this timeframe?&lt;/li>
&lt;/ul>
&lt;p>This approach is about balancing workload. If all processes start at a fixed time, they can consume valuable resources simultaneously. The best schedule depends on the environment. For example, if the environment experiences downtime—such as a traditional office setting—starting backups at 4 a.m. might be fine. However, if services run around the clock, it’s better to stagger the tasks so they use only a fraction of the available resources at any given time. This approach also reduces the impact of failures, since not all systems are involved at once.&lt;/p>
&lt;ul>
&lt;li>Is there anything else you might want to point out to these architects about these agents they are installing?&lt;/li>
&lt;/ul>
&lt;p>There are several factors architects should consider. However, in the context of this discussion, performance overhead is particularly relevant. They need to ensure that the chosen backup solutions won’t overburden the system’s resources and that there’s enough “breathing room” to maintain smooth operations.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-3-todo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#discussion-post-3-todo">Discussion Post 3: &amp;lsquo;TODO&amp;rsquo;&lt;/a>
&lt;/h2>
&lt;p>Your team has recently tested at proof of concept of a new storage system. The vendor has published the blazing fast speeds that are capable of being run through this storage system. You have a set of systems connected to both the old storage system and the new storage system.&lt;/p>
&lt;ul>
&lt;li>Write up a test procedure of how you may test these two systems.&lt;/li>
&lt;/ul>
&lt;p>I did a bit of research regarding tooling for such a task and found FIO &amp;lsquo;Flexible Input / Output&amp;rsquo;, a program written for the purpose of testing systems with various scenarios.
Rather than using BASH, I can run more comprehensive testing with more data to analyze using FIO.&lt;/p>
&lt;h3 id="baseline-test">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#baseline-test">Baseline Test&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> fio --filename=/dev/new_storage_lun --direct=1 --rw=read --bs=128k --size=10G --numjobs=1 --iodepth=32 --runtime=300 --time_based --name=new_storage_seq_read
fio --filename=/dev/old_storage_lun --direct=1 --rw=read --bs=128k --size=10G --numjobs=1 --iodepth=32 --runtime=300 --time_based --name=old_storage_seq_read
&lt;/code>&lt;/pre>
&lt;h3 id="running-mixed-workload-tests">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#running-mixed-workload-tests">Running Mixed Workload Tests&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> fio --filename=/dev/new_storage_lun --direct=1 --rw=randrw --rwmixread=70 --bs=4k --size=10G --numjobs=4 --iodepth=16 --runtime=300 --time_based --name=new_storage_mixed
&lt;/code>&lt;/pre>
&lt;h3 id="increased-concurrency-and-scale">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#increased-concurrency-and-scale">Increased Concurrency and Scale&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Increase &lt;code>numjobs&lt;/code> and &lt;code>iodepth&lt;/code> in subsequent runs to measure how performance changes:&lt;/p>
&lt;p>fio &amp;ndash;filename=/dev/new_storage_lun &amp;ndash;direct=1 &amp;ndash;rw=read &amp;ndash;bs=128k &amp;ndash;size=10G &amp;ndash;numjobs=8 &amp;ndash;iodepth=64 &amp;ndash;runtime=300 &amp;ndash;time_based &amp;ndash;name=new_storage_high_concurrency&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Run the same tests on the old storage system and record all metrics.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="stresssoak-tests">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#stresssoak-tests">Stress/Soak Tests&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>12-hour continuous I/O test on both storage systems.&lt;/p>
&lt;p>fio &amp;ndash;filename=/dev/new_storage_lun &amp;ndash;direct=1 &amp;ndash;rw=randwrite &amp;ndash;bs=4k &amp;ndash;size=100G &amp;ndash;numjobs=1 &amp;ndash;iodepth=32 &amp;ndash;runtime=43200 &amp;ndash;time_based &amp;ndash;name=new_storage_soak&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="awk-line-parsing">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#awk-line-parsing">AWK Line Parsing&lt;/a>
&lt;/h3>
&lt;p>I would then pipe the output of these commands to &lt;strong>AWK&lt;/strong> to seperate out specific datapoints to append to files for full analysis.&lt;/p>
&lt;ul>
&lt;li>How are you assuring these test are objective?&lt;/li>
&lt;/ul>
&lt;p>By gathering multiple datasets with varying run parameters, I can reduce statistical noise and better isolate data of interest by comparing these datasets against one another.&lt;/p>
&lt;ul>
&lt;li>What is meant by the term Ceteris Paribus, in this context?&lt;/li>
&lt;/ul>
&lt;p>in the context of system benchmarking means that when measuring the performance of one specific aspect of the system, all other variables and conditions are kept constant. This approach ensures that any observed changes in performance can be attributed directly to the variable under test, rather than being influenced by unrelated fluctuations in the environment or system load.&lt;/p>
&lt;hr>
&lt;h2 id="definitions--terminology">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#definitions--terminology">Definitions &amp;amp; Terminology&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Benchmark&lt;/li>
&lt;li>High watermark&lt;/li>
&lt;li>Scope&lt;/li>
&lt;li>Methodology&lt;/li>
&lt;li>Testing&lt;/li>
&lt;li>Control&lt;/li>
&lt;li>Experiment&lt;/li>
&lt;li>Analytics&lt;/li>
&lt;li>Descriptive&lt;/li>
&lt;li>Diagnostic&lt;/li>
&lt;li>Predictive&lt;/li>
&lt;li>Prescriptive&lt;/li>
&lt;/ul>
&lt;h2 id="digging-deeper-optional">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#digging-deeper-optional">Digging Deeper (optional)&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>Analyzing data may open up a new field of interest to you. Go through some of the
free lessons on Kaggle, here: &lt;a href="https://www.kaggle.com/learn">https://www.kaggle.com/learn&lt;/a>&lt;/li>
&lt;/ol>
&lt;p>a. What did you learn?&lt;/p>
&lt;p>b. How will you apply these lessons to data and monitoring you have already
collected as a system administrator?&lt;/p>
&lt;ol start="2">
&lt;li>Find a blog or article that discusses the 4 types of data analytics.&lt;/li>
&lt;/ol>
&lt;p>a. What did you learn about past operations?
b. What did you learn about predictive operations?&lt;/p>
&lt;ol start="3">
&lt;li>Download Spyder IDE (Open source)&lt;/li>
&lt;/ol>
&lt;p>a. Find a blog post or otherwise try to evaluate some data.
b. Perform some Linear regression. My block of code (but this requires some
additional libraries to be added. I can help with that if you need it.)&lt;/p>
&lt;p>import matplotlib.pyplot as plt&lt;/p>
&lt;p>from sklearn.linear_model import LinearRegression&lt;/p>
&lt;p>size = [[5.0], [5.5], [5.9], [6.3], [6.9], [7.5]]
price =[[165], [200], [223], [250], [278], [315]]
plt.title(&amp;lsquo;Pizza Price plotted against the size&amp;rsquo;)&lt;/p>
&lt;p>plt.xlabel(&amp;lsquo;Pizza Size in inches&amp;rsquo;)&lt;/p>
&lt;p>plt.ylabel(&amp;lsquo;Pizza Price in cents&amp;rsquo;)&lt;/p>
&lt;p>plt.plot(size, price, &amp;lsquo;k.&amp;rsquo;)&lt;/p>
&lt;p>plt.axis([5.0, 9.0, 99, 355])&lt;/p>
&lt;p>plt.grid(True)&lt;/p>
&lt;p>model = LinearRegression()&lt;/p>
&lt;p>model.fit(X = size, y = price)&lt;/p>
&lt;p>#plot the regression line&lt;/p>
&lt;p>plt.plot(size, model.predict(size), color=&amp;lsquo;r&amp;rsquo;)&lt;/p>
&lt;p>Reflection Questions&lt;/p>
&lt;ol>
&lt;li>
&lt;p>What questions do you still have about this week?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="digging-deeper">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#digging-deeper">Digging Deeper&lt;/a>
&lt;/h2>
&lt;h4 id="1-read-the-rest-of-the-chapter-httpssregoogleworkbookmonitoring-and-note-anything-else-of-interest-when-it-comes-to-monitoring-and-dashboarding">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#1-read-the-rest-of-the-chapter-httpssregoogleworkbookmonitoring-and-note-anything-else-of-interest-when-it-comes-to-monitoring-and-dashboarding">1. Read the rest of the chapter &lt;a href="https://sre.google/workbook/monitoring/">https://sre.google/workbook/monitoring/&lt;/a> and note anything else of interest when it comes to monitoring and dashboarding.&lt;/a>
&lt;/h4>
&lt;h4 id="2-look-up-the-prolug-prometheus-certified-associate-prep-2024-in-resources---presentations-in-our-prolug-discord-study-that-for-a-deep-dive-into-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#2-look-up-the-prolug-prometheus-certified-associate-prep-2024-in-resources---presentations-in-our-prolug-discord-study-that-for-a-deep-dive-into-prometheus">2. Look up the “ProLUG Prometheus Certified Associate Prep 2024” in Resources -&amp;gt; Presentations in our ProLUG Discord. Study that for a deep dive into Prometheus.&lt;/a>
&lt;/h4>
&lt;h4 id="3-complete-the-project-section-of-monitoring-deep-dive-project-guide-from-the-prolug-projects-section-of-the-discord-we-have-a-youtube-video-on-that-project-as-well-httpswwwyoutubecomwatchv54vgghr99qg">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#3-complete-the-project-section-of-monitoring-deep-dive-project-guide-from-the-prolug-projects-section-of-the-discord-we-have-a-youtube-video-on-that-project-as-well-httpswwwyoutubecomwatchv54vgghr99qg">3. Complete the project section of “Monitoring Deep Dive Project Guide” from the prolug-projects section of the Discord. We have a Youtube video on that project as well. &lt;a href="https://www.youtube.com/watch?v=54VgGHr99Qg">https://www.youtube.com/watch?v=54VgGHr99Qg&lt;/a>&lt;/a>
&lt;/h4>
&lt;h2 id="labs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#labs">Labs&lt;/a>
&lt;/h2>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs">https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/103-monitoring-linux-telemetry">https://killercoda.com/het-tanis/course/Linux-Labs/103-monitoring-linux-telemetry&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/104-monitoring-linux-Influx-Grafana">https://killercoda.com/het-tanis/course/Linux-Labs/104-monitoring-linux-Influx-Grafana&lt;/a>&lt;/p>
&lt;ol start="2">
&lt;li>While completing each lab think about the following:&lt;/li>
&lt;/ol>
&lt;p>a. How does it tie into the diagram below?&lt;/p>
&lt;p>b. What could you improve, or what would you change based on your previous administration
experience.&lt;/p>
&lt;p>Install Grafana
on the Rocky Linux system by adding the Grafana repo manually.
Red = Inputs
Blue = Outputs&lt;/p>
&lt;ol>
&lt;li>Create a new repository configuration
sudo vim /etc/yum.repos.d/grafana.repo&lt;/li>
&lt;/ol>
&lt;p>Paste:&lt;/p>
&lt;p>[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm &lt;br>
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1&lt;/p>
&lt;ol start="2">
&lt;li>Verify using the DNF&lt;/li>
&lt;/ol>
&lt;p>sudo dnf repolist&lt;/p>
&lt;p>sudo dnf clean - verifies whether files are working&lt;/p>
&lt;p>Should see:&lt;/p>
&lt;p>repo id repo name
appstream Rocky Linux 8 - AppStream
baseos Rocky Linux 8 - BaseOS
extras Rocky Linux 8 - Extras
grafana grafana/spl&lt;/p>
&lt;ol start="3">
&lt;li>Check the grafana package on the official repository&lt;/li>
&lt;/ol>
&lt;p>sudo dnf info grafana&lt;/p>
&lt;p>Should see something similar 👀&lt;/p>
&lt;p>Importing GPG key 0x24098CB6:
Userid : &amp;ldquo;Grafana &amp;quot;
Fingerprint: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
From : &lt;a href="https://packages.grafana.com/gpg.key">https://packages.grafana.com/gpg.key&lt;/a>
Is this ok [y/N]: y&lt;/p>
&lt;p>Should see 👀&lt;/p>
&lt;p>Name : grafana
Version : 8.2.5
Release : 1
rchitecture : x86_64
Size : 64 M
Source : grafana-8.2.5-1.src.rpm
Repository : grafana
Summary : Grafana
URL : &lt;a href="https://grafana.com">https://grafana.com&lt;/a>
License : &amp;ldquo;Apache 2.0&amp;rdquo;
Description : Grafana&lt;/p>
&lt;ol start="4">
&lt;li>Install Grafana
sudo dnf install grafana -y&lt;/li>
&lt;/ol>
&lt;p>⏳ Takes a while&amp;hellip;&lt;/p>
&lt;ol start="5">
&lt;li>Restart SystemD unit
sudo systemctl enable &amp;ndash;now grafana-server&lt;/li>
&lt;/ol>
&lt;p>Verify
sudo systemctl status grafana-server&lt;/p>
&lt;p>5.5. Firewall (Security)
Firewall is Managed by files present in /etc/firedwalld&lt;/p>
&lt;p>cd /etc/firewalld/
ls -l&lt;/p>
&lt;p>cp /usr/lib/firewalld/services/ssh.xml /etc/firewalld/services/example.xml&lt;/p>
&lt;p>sudo firewall-cmd &amp;ndash;add-service=grafana &amp;ndash;permanent&lt;/p>
&lt;p>sudo firewall-cmd &amp;ndash;add-port=3000/tcp &amp;ndash;permanent
sudo firewall-cmd &amp;ndash;reload&lt;/p>
&lt;ol start="6">
&lt;li>
&lt;p>Create config file
sudo vim /etc/grafana/grafana.ini&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Change the default value of:&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>The option &amp;lsquo;http_addr&amp;rsquo; to &amp;rsquo;localhost&amp;rsquo;, the &amp;lsquo;http_port&amp;rsquo; to &amp;lsquo;3000&amp;rsquo;, and the &amp;lsquo;domain&amp;rsquo; option to your domain name as below. For this example, the domain name is &amp;lsquo;grafana.example.io&amp;rsquo;.&lt;/p>
&lt;p>For non-standard port, be sure to uncomment ;
[server] 👍
http_port = 4000 👍&lt;/p>
&lt;p>The public facing domain name used to access grafana from a browser
domain = grafana.example.io&lt;/p>
&lt;p>7.1 Turn off the nasty default report of analytics 👺
[analytics]
reporting_enabled = false&lt;/p>
&lt;p>7.2. Restart the grafana service to apply a new configuration.&lt;/p>
&lt;p>sudo systemctl restart grafana-server&lt;/p>
&lt;p>Reverse Proxy Setup&lt;/p>
&lt;ol>
&lt;li>Install NGINX&lt;/li>
&lt;/ol>
&lt;p>sudo dnf install nginx -y&lt;/p>
&lt;ol start="2">
&lt;li>Create a new server block for grafana&lt;/li>
&lt;/ol>
&lt;p>/etc/nginx/conf.d/grafana.conf&lt;/p>
&lt;p>Required to proxy Grafana Live WebSocket connections&lt;/p>
&lt;p>map $http_upgrade $connection_upgrade {
default upgrade;
&amp;rsquo;&amp;rsquo; close;
}
server {
listen 80;
server_name grafana.example.io;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl http2;
server_name grafana.example.io;
root /usr/share/nginx/html;
index index.html index.htm;
ssl_certificate /etc/letsencrypt/live/grafana.example.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/grafana.example.io/privkey.pem;
access_log /var/log/nginx/grafana-access.log;
error_log /var/log/nginx/grafana-error.log;
location / {
proxy_pass http://localhost:3000/;
}&lt;/p>
&lt;p>Proxy Grafana Live WebSocket connections
location /api/live {
rewrite ^/(.*) /$1 break;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_pass http://localhost:3000/;
}
}&lt;/p>
&lt;ol start="3">
&lt;li>Next, verify the Nginx configuration&lt;/li>
&lt;/ol>
&lt;p>sudo nginx -t&lt;/p>
&lt;p>Should see 👀&lt;/p>
&lt;p>nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful 👍&lt;/p>
&lt;ol start="4">
&lt;li>Start and enable the Nginx service
sudo systemctl enable &amp;ndash;now nginx
sudo systemctl status nginx&lt;/li>
&lt;/ol>
&lt;p>Install Prometheus (Saturday)&lt;/p>
&lt;h2 id="rocky-prometheus-install">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#rocky-prometheus-install">Rocky Prometheus Install&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>Add New User and Directory &amp;lsquo;prometheus&amp;rsquo;&lt;/li>
&lt;/ol>
&lt;p>create a new configuration directory and data directory for the Prometheus installation.&lt;/p>
&lt;p>sudo adduser -M -r -s /sbin/nologin prometheus&lt;/p>
&lt;ol start="2">
&lt;li>create a new configuration
directory &amp;lsquo;/etc/prometheus&amp;rsquo; and the data directory &amp;lsquo;/var/lib/prometheus&amp;rsquo;&lt;/li>
&lt;/ol>
&lt;p>(Only needed for running as service)&lt;/p>
&lt;p>sudo mkdir /etc/prometheus
sudo mkdir /var/lib/prometheus&lt;/p>
&lt;p>Note:
All Prometheus configuration at the &amp;lsquo;/etc/prometheus&amp;rsquo; directory, and all Prometheus data will automatically be saved to the directory &amp;lsquo;/var/lib/prometheus&amp;rsquo;.
Installing Prometheus on Rocky Linux&lt;/p>
&lt;p>Install Prometheus monitoring system manually from the tarball or tar.gz file.&lt;/p>
&lt;ol>
&lt;li>Change the working directory
to &amp;lsquo;/usr/src&amp;rsquo; and download the Prometheus binary&lt;/li>
&lt;/ol>
&lt;p>cd /usr/src
wget &lt;a href="https://github.com/prometheus/prometheus/releases/download/v3.0.1/prometheus-3.0.1.linux-amd64.tar.gz">https://github.com/prometheus/prometheus/releases/download/v3.0.1/prometheus-3.0.1.linux-amd64.tar.gz&lt;/a>&lt;/p>
&lt;p>Extract&lt;/p>
&lt;p>tar -xzf ***.tar.gz&lt;/p>
&lt;p>cd into folder&lt;/p>
&lt;p>Run bin:&lt;/p>
&lt;pre>&lt;code>./bin 👍
If bin works, proceed
&lt;/code>&lt;/pre>
&lt;ol start="2">
&lt;li>Copy all Prometheus configurations
to the directory &amp;lsquo;/etc/prometheus&amp;rsquo; and the binary file &amp;lsquo;prometheus&amp;rsquo; to the &amp;lsquo;/usr/local/bin&amp;rsquo; directory.&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>Move prometheus configuration &amp;lsquo;prometheus.yml&amp;rsquo; to the directory &amp;lsquo;/etc/prometheus.&lt;/li>
&lt;/ul>
&lt;p>sudo mv $PROM_SRC/prometheus.yml /etc/prometheus/&lt;/p>
&lt;ul>
&lt;li>Move the binary file &amp;lsquo;prometheus&amp;rsquo; and &amp;lsquo;promtool&amp;rsquo; to the directory &amp;lsquo;/usr/local/bin/&amp;rsquo;.&lt;/li>
&lt;/ul>
&lt;p>sudo mv $PROM_SRC/prometheus /usr/local/bin/
sudo mv $PROM_SRC/promtool /usr/local/bin/&lt;/p>
&lt;ul>
&lt;li>Move Prometheus console templates and libraries to the &amp;lsquo;/etc/prometheus&amp;rsquo; directory.&lt;/li>
&lt;/ul>
&lt;p>sudo mv -r $PROM_SRC/consoles /etc/prometheus
sudo mv -r $PROM_SRC/console_libraries /etc/prometheus&lt;/p>
&lt;ol start="3">
&lt;li>Edit Prometheus configuration &amp;lsquo;/etc/prometheus/prometheus.yml&amp;rsquo;&lt;/li>
&lt;/ol>
&lt;p>vim /etc/prometheus/prometheus.yml&lt;/p>
&lt;p>On the &amp;lsquo;scrape_configs&amp;rsquo; option, you may need to add monitoring jobs&lt;/p>
&lt;p>The default configuration comes with the default monitoring job name &amp;lsquo;prometheus&amp;rsquo; and the target server &amp;rsquo;localhost&amp;rsquo; through the &amp;lsquo;static_configs&amp;rsquo; option.&lt;/p>
&lt;p>Change the target from &amp;rsquo;localhost:9090&amp;rsquo; to the server IP address &amp;lsquo;192.168.1.10:9090&amp;rsquo; as below.&lt;/p>
&lt;p>Note:
Scrape configuration containing exactly one endpoint to scrape:
Here it&amp;rsquo;s Prometheus itself.
scrape_configs:
The job name is added as a label &lt;code>job=&amp;lt;job_name&amp;gt;&lt;/code> to any timeseries scraped from this config.
job_name: &amp;ldquo;prometheus&amp;rdquo;&lt;/p>
&lt;p>metrics_path defaults to &amp;lsquo;/metrics&amp;rsquo;
scheme defaults to &amp;lsquo;http&amp;rsquo;.&lt;/p>
&lt;p>static_configs:
targets: [&amp;ldquo;192.168.1.10:9090&amp;rdquo;]&lt;/p>
&lt;ol start="4">
&lt;li>Change the configuration and data directories to the user &amp;lsquo;promethues&amp;rsquo;.&lt;/li>
&lt;/ol>
&lt;p>sudo chown prometheus:prometheus /etc/prometheus
sudo chown prometheus:prometheus /var/lib/prometheus&lt;/p>
&lt;p>Basic prometheus installation finished, Hopefully 👍 .&lt;/p>
&lt;p>Configure Prometheus&lt;/p>
&lt;ol>
&lt;li>Create a new systemd service
sudo vim /etc/systemd/system/prometheus.service&lt;/li>
&lt;/ol>
&lt;p>Copy and paste the following configuration.&lt;/p>
&lt;p>[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target&lt;/p>
&lt;p>[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus &lt;br>
&amp;ndash;config.file /etc/prometheus/prometheus.yml &lt;br>
&amp;ndash;storage.tsdb.path /var/lib/prometheus/ &lt;br>
&amp;ndash;web.console.templates=/etc/prometheus/consoles &lt;br>
&amp;ndash;web.console.libraries=/etc/prometheus/console_libraries&lt;/p>
&lt;p>[Install]
WantedBy=multi-user.target&lt;/p>
&lt;ol start="2">
&lt;li>Reload the systemd manager to apply a new config.&lt;/li>
&lt;/ol>
&lt;p>sudo systemctl daemon-reload&lt;/p>
&lt;ol start="3">
&lt;li>Start and enable the Prometheus service&lt;/li>
&lt;/ol>
&lt;p>sudo systemctl enable &amp;ndash;now prometheus
sudo systemctl status prometheus&lt;/p>
&lt;p>Prometheus monitoring tool is now accessible on the TCP port &amp;lsquo;9090.&lt;/p>
&lt;ol start="4">
&lt;li>Visit IP address with port &amp;lsquo;9090&amp;rsquo;&lt;/li>
&lt;/ol>
&lt;p>http://192.168.1.10:9090/&lt;/p>
&lt;p>And you will see the prometheus dashboard query below.&lt;/p>
&lt;p>Prometheus query dashboard&lt;/p>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#reflection-questions">Reflection Questions&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>What questions do you still have about this week?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu12/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 11 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu11/</link><pubDate>Thu, 28 Nov 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu11/</guid><description>&lt;h1 id="monitoring-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#monitoring-systems">Monitoring Systems&lt;/a>
&lt;/h1>
&lt;p>In this unit, we explore monitoring systems, which often consist of multiple interconnected components. At its core, monitoring involves carefully exposing system data and transmitting it to tools for analysis and alerting. From my experience with Prometheus and Grafana—two widely used and versatile solutions—I’ve seen how effective these tools can be for various scenarios. However, many other tools are also available. One of my key takeaways from the unit’s readings and labs was the importance of careful data exposure. Much like setting permissions in a Linux system, it’s crucial to determine what data can be accessed and who is allowed to see it in the reporting chain. System information, if mishandled, can easily become a double-edged sword.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#discussion-post-1">Discussion Post 1&lt;/a>
&lt;/h2>
&lt;h3 id="scenario">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#scenario">Scenario&lt;/a>
&lt;/h3>
&lt;p>You’ve heard the term “loose coupling” thrown around the
office about a new monitoring solution coming down the pike. You find a good resource and
read the section on “Prefer Loose Coupling” &lt;a href="https://sre.google/workbook/monitoring/">https://sre.google/workbook/monitoring/&lt;/a>&lt;/p>
&lt;h4 id="1-what-does-loose-coupling-mean-if-you-had-to-summarize-to-your-junior-team">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#1-what-does-loose-coupling-mean-if-you-had-to-summarize-to-your-junior-team">1. What does “loose coupling” mean, if you had to summarize to your junior team&lt;/a>
&lt;/h4>
&lt;p>members?&lt;/p>
&lt;p>Loose coupling means the components of a system can operate independently, yet still work together when combined. This design allows individual components to be swapped or replaced with minimal disruption to the overall system. In contrast, a strongly coupled system binds its components so tightly that altering one would disrupt or even break the entire system’s functionality.&lt;/p>
&lt;h4 id="2-what-is-the-advantage-given-for-why-you-might-want-to-implement-this-type-of-tooling-in-your-monitoring-do-you-agree-why-or-why-not">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#2-what-is-the-advantage-given-for-why-you-might-want-to-implement-this-type-of-tooling-in-your-monitoring-do-you-agree-why-or-why-not">2. What is the advantage given for why you might want to implement this type of tooling in your monitoring? Do you agree? Why or why not?&lt;/a>
&lt;/h4>
&lt;p>The advantage of a loosely coupled monitoring system lies in its flexibility to evolve over time. Systems change, requirements shift, and new tools emerge, making adaptability essential. A design that allows components to be replaced or upgraded with minimal disruption is highly valuable—not only for an organization aiming to maintain efficiency but also for the administrators and engineers responsible for ensuring stability and resolving issues.&lt;/p>
&lt;h4 id="3-they-mention-exposing-metrics-what-does-it-mean-to-expose-metrics-what-happens-to-metrics-that-are-exposed-but-never-collected">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#3-they-mention-exposing-metrics-what-does-it-mean-to-expose-metrics-what-happens-to-metrics-that-are-exposed-but-never-collected">3. They mention “exposing metrics” what does it mean to expose metrics? What happens to metrics that are exposed but never collected?&lt;/a>
&lt;/h4>
&lt;p>Exposing metrics involves making system information accessible for monitoring and analysis. However, this must be approached with caution, as exposing such information can introduce vulnerabilities. Simply exposing data without actively collecting or utilizing it needlessly increases security risks without providing any benefit.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#discussion-post-2">Discussion Post 2&lt;/a>
&lt;/h2>
&lt;h3 id="scenario-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#scenario-1">Scenario&lt;/a>
&lt;/h3>
&lt;p>Your HPC team is asking for more information about how CPU 0
is behaving on a set of servers. Your team has node exporter writing data out to Prometheus
(Use this to simulate &lt;a href="https://promlabs.com/promql-cheat-sheet/)">https://promlabs.com/promql-cheat-sheet/)&lt;/a>.&lt;/p>
&lt;h4 id="1-can-you-see-the-usage-of-cpu0-and-what-is-the-query">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#1-can-you-see-the-usage-of-cpu0-and-what-is-the-query">1. Can you see the usage of CPU0 and what is the query?&lt;/a>
&lt;/h4>
&lt;p>Yes one can use a query that focuses on the metrics provided by the Node Exporter. Specifically, filter for CPU 0 and its usage.&lt;/p>
&lt;pre>&lt;code>100 - (avg by (instance) (irate(node_cpu_seconds_total{cpu=&amp;quot;0&amp;quot;, mode=&amp;quot;idle&amp;quot;}
&lt;/code>&lt;/pre>
&lt;h4 id="2-can-you-see-the-usage-of-cpu0-for-just-the-last-5-minutes-and-what-is-the-query">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#2-can-you-see-the-usage-of-cpu0-for-just-the-last-5-minutes-and-what-is-the-query">2. Can you see the usage of CPU0 for just the last 5 minutes and what is the query?&lt;/a>
&lt;/h4>
&lt;p>Yes&lt;/p>
&lt;pre>&lt;code>100 - (avg by (instance) (rate(node_cpu_seconds_total{cpu=&amp;quot;0&amp;quot;, mode=&amp;quot;idle&amp;quot;}[5m])) * 100)
&lt;/code>&lt;/pre>
&lt;h4 id="3-you-know-that-cpu0-is-excluded-from-slurm-can-you-exclude-that-and-only-pull-the-user-and-system-for-the-remaining-cpus-and-what-is-that-query">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#3-you-know-that-cpu0-is-excluded-from-slurm-can-you-exclude-that-and-only-pull-the-user-and-system-for-the-remaining-cpus-and-what-is-that-query">3. You know that CPU0 is excluded from Slurm, can you exclude that and only pull the user and system for the remaining CPUs and what is that query?&lt;/a>
&lt;/h4>
&lt;p>Yes&lt;/p>
&lt;pre>&lt;code>sum by (instance) (rate(node_cpu_seconds_total{cpu!=&amp;quot;0&amp;quot;, mode=~&amp;quot;user|system&amp;quot;}[5m])) * 100
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h2 id="digging-deeper">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#digging-deeper">Digging Deeper&lt;/a>
&lt;/h2>
&lt;h4 id="1-read-the-rest-of-the-chapter-httpssregoogleworkbookmonitoring-and-note-anything-else-of-interest-when-it-comes-to-monitoring-and-dashboarding">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#1-read-the-rest-of-the-chapter-httpssregoogleworkbookmonitoring-and-note-anything-else-of-interest-when-it-comes-to-monitoring-and-dashboarding">1. Read the rest of the chapter &lt;a href="https://sre.google/workbook/monitoring/">https://sre.google/workbook/monitoring/&lt;/a> and note anything else of interest when it comes to monitoring and dashboarding.&lt;/a>
&lt;/h4>
&lt;h4 id="2-look-up-the-prolug-prometheus-certified-associate-prep-2024-in-resources---presentations-in-our-prolug-discord-study-that-for-a-deep-dive-into-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#2-look-up-the-prolug-prometheus-certified-associate-prep-2024-in-resources---presentations-in-our-prolug-discord-study-that-for-a-deep-dive-into-prometheus">2. Look up the “ProLUG Prometheus Certified Associate Prep 2024” in Resources -&amp;gt; Presentations in our ProLUG Discord. Study that for a deep dive into Prometheus.&lt;/a>
&lt;/h4>
&lt;h4 id="3-complete-the-project-section-of-monitoring-deep-dive-project-guide-from-the-prolug-projects-section-of-the-discord-we-have-a-youtube-video-on-that-project-as-well-httpswwwyoutubecomwatchv54vgghr99qg">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#3-complete-the-project-section-of-monitoring-deep-dive-project-guide-from-the-prolug-projects-section-of-the-discord-we-have-a-youtube-video-on-that-project-as-well-httpswwwyoutubecomwatchv54vgghr99qg">3. Complete the project section of “Monitoring Deep Dive Project Guide” from the prolug-projects section of the Discord. We have a Youtube video on that project as well. &lt;a href="https://www.youtube.com/watch?v=54VgGHr99Qg">https://www.youtube.com/watch?v=54VgGHr99Qg&lt;/a>&lt;/a>
&lt;/h4>
&lt;h2 id="labs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#labs">Labs&lt;/a>
&lt;/h2>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs">https://killercoda.com/het-tanis/course/Linux-Labs/102-monitoring-linux-logs&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/103-monitoring-linux-telemetry">https://killercoda.com/het-tanis/course/Linux-Labs/103-monitoring-linux-telemetry&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://killercoda.com/het-tanis/course/Linux-Labs/104-monitoring-linux-Influx-Grafana">https://killercoda.com/het-tanis/course/Linux-Labs/104-monitoring-linux-Influx-Grafana&lt;/a>&lt;/p>
&lt;ol start="2">
&lt;li>While completing each lab think about the following:&lt;/li>
&lt;/ol>
&lt;p>a. How does it tie into the diagram below?&lt;/p>
&lt;p>b. What could you improve, or what would you change based on your previous administration
experience.&lt;/p>
&lt;hr>
&lt;h3 id="1-install-grafana">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#1-install-grafana">1. Install Grafana&lt;/a>
&lt;/h3>
&lt;h4 id="11-create-a-new-repository-configuration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#11-create-a-new-repository-configuration">1.1 Create a New Repository Configuration&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo vim /etc/yum.repos.d/grafana.repo&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Paste the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="k">[grafana]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">name&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">grafana&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">baseurl&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">https://packages.grafana.com/oss/rpm&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">repo_gpgcheck&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">enabled&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">gpgcheck&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">gpgkey&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">https://packages.grafana.com/gpg.key&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">sslverify&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">1&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="12-verify-the-repository">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#12-verify-the-repository">1.2 Verify the Repository&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo dnf repolist
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo dnf clean all&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Expected Output:&lt;/p>
&lt;pre tabindex="0">&lt;code>repo id repo name
appstream Rocky Linux 8 - AppStream
baseos Rocky Linux 8 - BaseOS
extras Rocky Linux 8 - Extras
grafana grafana/spl&lt;/code>&lt;/pre>
&lt;h4 id="13-check-the-grafana-package">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#13-check-the-grafana-package">1.3 Check the Grafana Package&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo dnf info grafana&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Example Output:&lt;/p>
&lt;pre tabindex="0">&lt;code>Importing GPG key 0x24098CB6:
Userid : &amp;#34;Grafana&amp;#34;
Fingerprint: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
From : https://packages.grafana.com/gpg.key
Is this ok [y/N]: y&lt;/code>&lt;/pre>
&lt;h4 id="14-install-grafana">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#14-install-grafana">1.4 Install Grafana&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo dnf install grafana -y&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="15-enable-and-start-grafana-service">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#15-enable-and-start-grafana-service">1.5 Enable and Start Grafana Service&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo systemctl &lt;span class="nb">enable&lt;/span> --now grafana-server
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo systemctl status grafana-server&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="16-configure-firewall">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#16-configure-firewall">1.6 Configure Firewall&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo firewall-cmd --add-service&lt;span class="o">=&lt;/span>grafana --permanent
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo firewall-cmd --add-port&lt;span class="o">=&lt;/span>3000/tcp --permanent
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo firewall-cmd --reload&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="17-create-and-edit-configuration-file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#17-create-and-edit-configuration-file">1.7 Create and Edit Configuration File&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo vim /etc/grafana/grafana.ini&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Update the following settings:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="k">[server]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">http_port&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">4000&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">domain&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">grafana.example.io&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">[analytics]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">reporting_enabled&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">false&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Restart the service:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo systemctl restart grafana-server&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;hr>
&lt;h3 id="2-reverse-proxy-setup-with-nginx">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#2-reverse-proxy-setup-with-nginx">2. Reverse Proxy Setup with NGINX&lt;/a>
&lt;/h3>
&lt;h4 id="21-install-nginx">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#21-install-nginx">2.1 Install NGINX&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo dnf install nginx -y&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="22-create-a-server-block-for-grafana">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#22-create-a-server-block-for-grafana">2.2 Create a Server Block for Grafana&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo vim /etc/nginx/conf.d/grafana.conf&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Paste the configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-nginx" data-lang="nginx">&lt;span class="line">&lt;span class="cl">&lt;span class="k">map&lt;/span> &lt;span class="nv">$http_upgrade&lt;/span> &lt;span class="nv">$connection_upgrade&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">default&lt;/span> &lt;span class="s">upgrade&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">&amp;#39;&amp;#39;&lt;/span> &lt;span class="s">close&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">server&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">listen&lt;/span> &lt;span class="mi">80&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">server_name&lt;/span> &lt;span class="s">grafana.example.io&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">rewrite&lt;/span> &lt;span class="s">^&lt;/span> &lt;span class="s">https://&lt;/span>&lt;span class="nv">$server_name$request_uri?&lt;/span> &lt;span class="s">permanent&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">server&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">listen&lt;/span> &lt;span class="mi">443&lt;/span> &lt;span class="s">ssl&lt;/span> &lt;span class="s">http2&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">server_name&lt;/span> &lt;span class="s">grafana.example.io&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">ssl_certificate&lt;/span> &lt;span class="s">/etc/letsencrypt/live/grafana.example.io/fullchain.pem&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">ssl_certificate_key&lt;/span> &lt;span class="s">/etc/letsencrypt/live/grafana.example.io/privkey.pem&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">location&lt;/span> &lt;span class="s">/&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">proxy_pass&lt;/span> &lt;span class="s">http://localhost:3000/&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">location&lt;/span> &lt;span class="s">/api/live&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">proxy_http_version&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="s">.1&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">proxy_set_header&lt;/span> &lt;span class="s">Upgrade&lt;/span> &lt;span class="nv">$http_upgrade&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">proxy_set_header&lt;/span> &lt;span class="s">Connection&lt;/span> &lt;span class="nv">$connection_upgrade&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kn">proxy_pass&lt;/span> &lt;span class="s">http://localhost:3000/&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="23-verify-nginx-configuration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#23-verify-nginx-configuration">2.3 Verify NGINX Configuration&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo nginx -t&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Expected Output:&lt;/p>
&lt;pre tabindex="0">&lt;code>nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful&lt;/code>&lt;/pre>
&lt;h4 id="24-start-and-enable-nginx">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#24-start-and-enable-nginx">2.4 Start and Enable NGINX&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo systemctl &lt;span class="nb">enable&lt;/span> --now nginx
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo systemctl status nginx&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;hr>
&lt;h3 id="3-install-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#3-install-prometheus">3. Install Prometheus&lt;/a>
&lt;/h3>
&lt;h4 id="31-add-a-new-user-and-directories">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#31-add-a-new-user-and-directories">3.1 Add a New User and Directories&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo adduser -M -r -s /sbin/nologin prometheus
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mkdir /etc/prometheus
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mkdir /var/lib/prometheus&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="32-download-and-extract-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#32-download-and-extract-prometheus">3.2 Download and Extract Prometheus&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd&lt;/span> /usr/src
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">wget https://github.com/prometheus/prometheus/releases/download/v3.0.1/prometheus-3.0.1.linux-amd64.tar.gz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">tar -xzf prometheus-3.0.1.linux-amd64.tar.gz
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd&lt;/span> prometheus-3.0.1.linux-amd64&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="33-move-files-to-appropriate-locations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#33-move-files-to-appropriate-locations">3.3 Move Files to Appropriate Locations&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo mv prometheus /usr/local/bin/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mv promtool /usr/local/bin/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mv consoles /etc/prometheus
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mv console_libraries /etc/prometheus
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo mv prometheus.yml /etc/prometheus/&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="34-change-ownership">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#34-change-ownership">3.4 Change Ownership&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="35-configure-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#35-configure-prometheus">3.5 Configure Prometheus&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo vim /etc/prometheus/prometheus.yml&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Example scrape configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">scrape_configs&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">job_name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;prometheus&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">static_configs&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">targets&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;192.168.1.10:9090&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="36-create-a-systemd-service">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#36-create-a-systemd-service">3.6 Create a Systemd Service&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo vim /etc/systemd/system/prometheus.service&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Paste the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="k">[Unit]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">Description&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">Prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">Wants&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">network-online.target&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">After&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">network-online.target&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">[Service]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">User&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">Group&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">Type&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">simple&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">ExecStart&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">[Install]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">WantedBy&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">multi-user.target&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="37-start-prometheus-service">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#37-start-prometheus-service">3.7 Start Prometheus Service&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">sudo systemctl daemon-reload
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo systemctl &lt;span class="nb">enable&lt;/span> --now prometheus
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo systemctl status prometheus&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="38-access-prometheus">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#38-access-prometheus">3.8 Access Prometheus&lt;/a>
&lt;/h4>
&lt;p>Visit &lt;code>http://192.168.1.10:9090&lt;/code> in your browser to view the Prometheus dashboard.&lt;/p>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#reflection-questions">Reflection Questions&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>What questions do you still have about this week?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu11/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 10 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu10/</link><pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu10/</guid><description>&lt;h1 id="kubernetes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#kubernetes">Kubernetes&lt;/a>
&lt;/h1>
&lt;p>&amp;ldquo;The OS of the Internet&amp;rdquo;&lt;/p>
&lt;p>This week, we were privileged to host a special guest lecture by John Champine, Scott&amp;rsquo;s brother. Over the course of an engaging two-hour session, John delivered an in-depth exploration of Kubernetes, thoroughly covering the five W&amp;rsquo;s: Who, What, When, Where, and Why.&lt;/p>
&lt;p>John&amp;rsquo;s passion and deep knowledge of Kubernetes were evident throughout the presentation. Having firsthand experience with the challenges of pre-Kubernetes infrastructure, he offered valuable insights into how this platform has revolutionized modern computing. Notably, John specializes in OpenShift, an IBM-owned management layer built atop Kubernetes. OpenShift adds additional functionality and ease of use to what is already a powerful but complex system.&lt;/p>
&lt;p>One concept that particularly caught my attention was the &lt;strong>fractionalization of CPU and memory resources&lt;/strong> made possible by Kubernetes&amp;rsquo; sophisticated resource management. John introduced the term &lt;em>millicore&lt;/em>, a concept I was previously unfamiliar with. It refers to the fine-grained allocation of processing power, where fractions of a CPU core are shared across processes during compute cycles. This ability to manage resources at such a granular level is remarkable, showcasing the efficiency and precision of Kubernetes.&lt;/p>
&lt;p>Before this lecture, I never imagined that such details—down to the microsecond allocation of core usage—could not only be considered but also controlled and utilized to optimize workloads. This level of resource management truly solidifies Kubernetes&amp;rsquo; position as the &amp;ldquo;operating system of the internet,&amp;rdquo; enabling applications to run more efficiently and reliably across diverse infrastructures.&lt;/p>
&lt;p>John’s insights not only deepened my understanding of Kubernetes but also sparked curiosity about the broader implications of containerized resource management in modern computing.&lt;/p>
&lt;p>One idea that has been dispelled by doing these exercises is that Kubernetes is overkill for most things. Yes, standing up multiple networked nodes and having them interoperate is no small task. However, there exist lightweight, single node variants like K3s that enable a simplified experience while maintaining the powerful advantages of an orchestration system.&lt;/p>
&lt;h2 id="furthermore-given-the-threat-landscape-desire-for-declarative-infrastructure-and-ever-fluctuating-demand-it-makes-sense-to-implement-a-tool-that-is-designed-for-these-modern-demands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#furthermore-given-the-threat-landscape-desire-for-declarative-infrastructure-and-ever-fluctuating-demand-it-makes-sense-to-implement-a-tool-that-is-designed-for-these-modern-demands">Furthermore, given the threat landscape, desire for declarative infrastructure and ever fluctuating demand, it makes sense to implement a tool that is designed for these modern demands.&lt;/a>
&lt;/h2>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#discussion-post-1">Discussion Post 1&lt;/a>
&lt;/h2>
&lt;p>Reading: &lt;a href="https://kubernetes.io/docs/concepts/overview/">https://kubernetes.io/docs/concepts/overview/&lt;/a> 📗&lt;/p>
&lt;h3 id="question-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#question-1">Question 1&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>What are the two most compelling reasons you see to implement Kubernetes in your organization?&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Efficient Usage of Resources&lt;/strong>: Kubernetes optimizes resource allocation and ensures workloads are distributed efficiently across your infrastructure.&lt;/li>
&lt;li>&lt;strong>Built-in Redundancy&lt;/strong>: Kubernetes provides automatic failover and self-healing capabilities, ensuring high availability for applications.&lt;/li>
&lt;/ol>
&lt;p>Other notable reasons include:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Load Balancing&lt;/strong>: Automatically distributes traffic across pods to maintain application performance. ⚖️&lt;/li>
&lt;li>&lt;strong>Centralized Control&lt;/strong>: Manages deployments, updates, and scaling from a single interface. 🎯&lt;/li>
&lt;li>&lt;strong>Declarative in Nature&lt;/strong>: Uses declarative configurations, making it easier to maintain and reproduce states. 🔖&lt;/li>
&lt;li>&lt;strong>Customizable for Organizational Needs&lt;/strong>: Offers flexibility to adapt to specific requirements through pluggable components. 🔌&lt;/li>
&lt;li>&lt;strong>Open Source&lt;/strong>: Eliminates vendor lock-in while benefiting from a large and active community. ⚙️&lt;/li>
&lt;li>&lt;strong>Broadly Used&lt;/strong>: Extensive community adoption ensures a wealth of resources, tools, and discussions. 📜&lt;/li>
&lt;li>&lt;strong>Written in Go&lt;/strong>: Delivers a lightweight, high-performance foundation that I am irrationally a fan of 😉&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="question-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#question-2">Question 2&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>When the article says Kubernetes is not a PaaS, what do they mean by that? What is a PaaS in comparison?&lt;/strong>&lt;/p>
&lt;p>Kubernetes is not a Platform-as-a-Service (PaaS) because it operates at the &lt;strong>container level&lt;/strong> rather than the &lt;strong>application or hardware level&lt;/strong>. While it provides some features similar to PaaS offerings, Kubernetes emphasizes flexibility, composability, and user choice rather than prescribing a monolithic solution.&lt;/p>
&lt;h4 id="key-characteristics-of-kubernetes-compared-to-paas">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#key-characteristics-of-kubernetes-compared-to-paas">Key Characteristics of Kubernetes Compared to PaaS:&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>What Kubernetes Is&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Provides foundational building blocks for deploying, scaling, and managing containerized applications.&lt;/li>
&lt;li>Is modular, with optional and pluggable solutions for logging, monitoring, alerting, and scaling.&lt;/li>
&lt;li>Focuses on maintaining desired state through independent, composable control processes.&lt;/li>
&lt;li>Preserves user choice by not dictating application or configuration specifics.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>What Kubernetes Is Not&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Does not limit the types of applications it supports.&lt;/li>
&lt;li>Does not deploy source code or build your application.&lt;/li>
&lt;li>Does not provide application-level services (e.g., middleware, databases).&lt;/li>
&lt;li>Does not enforce specific logging, monitoring, or alerting solutions.&lt;/li>
&lt;li>Does not include a proprietary configuration system or language (e.g., Jsonnet).&lt;/li>
&lt;li>Does not manage comprehensive machine-level configuration, maintenance, or self-healing.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;h4 id="comparison-to-paas">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#comparison-to-paas">Comparison to PaaS:&lt;/a>
&lt;/h4>
&lt;p>A Platform-as-a-Service (PaaS), such as Heroku or OpenShift, provides a more opinionated, all-encompassing solution by:&lt;/p>
&lt;ul>
&lt;li>Supporting application deployment directly from source code.&lt;/li>
&lt;li>Managing application-level services like databases or caching layers.&lt;/li>
&lt;li>Offering integrated logging, monitoring, and alerting.&lt;/li>
&lt;li>Providing a simplified developer experience but with less flexibility.&lt;/li>
&lt;/ul>
&lt;p>In contrast, Kubernetes gives users the tools to build their own developer platforms while leaving critical choices in the user’s hands.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#discussion-post-2">Discussion Post 2&lt;/a>
&lt;/h2>
&lt;h3 id="scenario">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#scenario">Scenario&lt;/a>
&lt;/h3>
&lt;p>You get a ticket about your new test cluster. The team is unable to deploy some of their applications. They suspect there is a problem and send you over this output:&lt;/p>
&lt;h3 id="kubernetes-cluster-information">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#kubernetes-cluster-information">Kubernetes Cluster Information&lt;/a>
&lt;/h3>
&lt;h4 id="kubectl-version">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#kubectl-version">kubectl Version&lt;/a>
&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Component&lt;/th>
&lt;th>Version&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Client Version&lt;/td>
&lt;td>v1.31.6+k3s3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Kustomize Version&lt;/td>
&lt;td>v5.0.4-0.20230601165947-6ce0bf390ce3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Server Version&lt;/td>
&lt;td>v1.30.6+k3s1&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="node-status">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#node-status">Node Status&lt;/a>
&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>NAME&lt;/th>
&lt;th>STATUS&lt;/th>
&lt;th>ROLES&lt;/th>
&lt;th>AGE&lt;/th>
&lt;th>VERSION&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Test_Cluster1&lt;/td>
&lt;td>Ready&lt;/td>
&lt;td>control-plane,master&lt;/td>
&lt;td>17h&lt;/td>
&lt;td>v1.30.6+k3s1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Test_Cluster2&lt;/td>
&lt;td>NotReady&lt;/td>
&lt;td>worker&lt;/td>
&lt;td>33m&lt;/td>
&lt;td>v1.29.6+k3s1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Test_Cluster3&lt;/td>
&lt;td>Ready&lt;/td>
&lt;td>worker&lt;/td>
&lt;td>17h&lt;/td>
&lt;td>v1.28.6+k3s1&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="question-1-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#question-1-1">Question 1&lt;/a>
&lt;/h3>
&lt;p>What are you checking on the cluster to validate you see their error?&lt;/p>
&lt;p>To identify and validate the issue with the node &lt;strong>Test_Cluster2&lt;/strong>:&lt;/p>
&lt;p>Check the overall cluster status&lt;/p>
&lt;ul>
&lt;li>Run &lt;strong>kubectl get nodes&lt;/strong> to see the status of all nodes in the cluster.&lt;/li>
&lt;li>This confirms &lt;strong>Test_Cluster2&lt;/strong> is &lt;strong>NotReady&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;p>Inspect node details&lt;/p>
&lt;ul>
&lt;li>Run &lt;strong>kubectl describe nodes Test_Cluster2&lt;/strong> to check for events, taints, and resource usage issues. Look for errors related to kubelet, network, or node conditions.&lt;/li>
&lt;/ul>
&lt;p>Access the node**&lt;/p>
&lt;ul>
&lt;li>SSH into the node with &lt;strong>ssh Test_Cluster2&lt;/strong> to perform further diagnostics.&lt;/li>
&lt;/ul>
&lt;p>Verify kubelet status&lt;/p>
&lt;ul>
&lt;li>Run &lt;strong>systemctl status kubelet&lt;/strong> to check if the kubelet service is running and healthy.&lt;/li>
&lt;/ul>
&lt;p>Check container runtime&lt;/p>
&lt;ul>
&lt;li>Depending on your runtime, run either &lt;strong>systemctl status docker&lt;/strong> or &lt;strong>systemctl status podman&lt;/strong> to ensure the container runtime is operational.&lt;/li>
&lt;/ul>
&lt;p>Reload and restart services&lt;/p>
&lt;ul>
&lt;li>If issues are detected, attempt to reload the systemd daemon (&lt;strong>systemctl daemon-reload&lt;/strong>) and restart kubelet (&lt;strong>systemctl restart kubelet&lt;/strong>).&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="question-2-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#question-2-1">Question 2&lt;/a>
&lt;/h3>
&lt;p>What do you think the problem could be?&lt;/p>
&lt;p>Potential problems for &lt;strong>Test_Cluster2&lt;/strong> being &lt;strong>NotReady&lt;/strong> include:&lt;/p>
&lt;ul>
&lt;li>The &lt;strong>Test_Cluster2&lt;/strong> node is running Kubernetes version &lt;strong>v1.29.6+k3s1&lt;/strong>, which is older than the server and other nodes (&lt;strong>v1.30.6+k3s1&lt;/strong>). This may cause compatibility issues.&lt;/li>
&lt;li>The kubelet service might have failed or not started.&lt;/li>
&lt;li>Networking problems could prevent the node from communicating with the control plane.&lt;/li>
&lt;li>The node may lack sufficient CPU, memory, or disk space for the kubelet to function.&lt;/li>
&lt;li>Taints, labels, or configuration errors might prevent the node from becoming &lt;strong>Ready&lt;/strong>.&lt;/li>
&lt;li>Hardware issues or kernel module problems may impact the node&amp;rsquo;s health.&lt;/li>
&lt;/ul>
&lt;h3 id="question-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#question-3">Question 3&lt;/a>
&lt;/h3>
&lt;p>Do you think someone else has tried anything to fix this problem before you? Why or why not?&lt;/p>
&lt;p>Yes, someone may have tried to fix it&lt;/p>
&lt;ul>
&lt;li>The node was added only &lt;strong>33 minutes ago&lt;/strong>, indicating recent activity.&lt;/li>
&lt;li>It’s common for issues to be noticed and an initial attempt made before escalating.&lt;/li>
&lt;li>&lt;strong>systemctl status&lt;/strong> may show if services were restarted recently, suggesting prior troubleshooting.&lt;/li>
&lt;/ul>
&lt;p>No, it may not have been addressed yet because:&lt;/p>
&lt;ul>
&lt;li>The node is still in the &lt;strong>NotReady&lt;/strong> state, implying no successful resolution so far.&lt;/li>
&lt;li>Lack of detailed documentation or escalation might mean no one has investigated yet.&lt;/li>
&lt;/ul>
&lt;p>To confirm, check the node&amp;rsquo;s event logs (&lt;strong>kubectl describe nodes Test_Cluster2&lt;/strong>) or system logs (&lt;strong>journalctl -u kubelet&lt;/strong>) for evidence of recent actions.&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#discussion-post-3">Discussion Post 3&lt;/a>
&lt;/h2>
&lt;h3 id="scenario-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#scenario-1">Scenario:&lt;/a>
&lt;/h3>
&lt;p>You are the network operations center (NOC) lead. Your team has recently started supporting the dev, test, and QA environments for your company’s K8s cluster. Write up a basic checkout procedure for your new NOC personnel to verify operation of the cluster before escalating on critical alerts.&lt;/p>
&lt;h1 id="kubernetes-cluster-checkout-procedure-for-noc-personnel">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#kubernetes-cluster-checkout-procedure-for-noc-personnel">Kubernetes Cluster Checkout Procedure for NOC Personnel&lt;/a>
&lt;/h1>
&lt;p>This document outlines the basic steps for verifying the operation of the Kubernetes (K8s) cluster before escalating on critical alerts.&lt;/p>
&lt;hr>
&lt;h2 id="1-verify-cluster-health">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#1-verify-cluster-health">&lt;strong>1. Verify Cluster Health&lt;/strong>&lt;/a>
&lt;/h2>
&lt;h4 id="--login-to-the-cluster">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--login-to-the-cluster">- &lt;strong>Login to the Cluster&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>
&lt;p>Access the cluster using the &lt;strong>kubectl&lt;/strong> command-line tool.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Use the appropriate kubeconfig file for the environment (dev, test, QA).&lt;/p>
&lt;p>kubectl config use-context &lt;!-- raw HTML omitted -->&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="--check-cluster-nodes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--check-cluster-nodes">- &lt;strong>Check Cluster Nodes&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get nodes
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>Look for any nodes in NotReady, Unknown, or SchedulingDisabled status. Investigate any anomalies.&lt;/li>
&lt;/ul>
&lt;h4 id="--check-system-pods">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--check-system-pods">- &lt;strong>Check System Pods&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>
&lt;p>Verify critical system pods in the kube-system namespace are running&lt;/p>
&lt;pre>&lt;code> kubectl get pods -n kube-system
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ul>
&lt;h4 id="pay-special-attention-to-core-components">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#pay-special-attention-to-core-components">Pay special attention to core components:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>kube-apiserver&lt;/li>
&lt;li>kube-scheduler&lt;/li>
&lt;li>kube-controller-manager&lt;/li>
&lt;li>etcd&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="2-verify-namespace-and-application-status">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#2-verify-namespace-and-application-status">&lt;strong>2. Verify Namespace and Application Status&lt;/strong>&lt;/a>
&lt;/h2>
&lt;h4 id="--list-all-namespaces">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--list-all-namespaces">- &lt;strong>List All Namespaces&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get namespaces
&lt;/code>&lt;/pre>
&lt;h4 id="--check-pod-status-in-active-namespaces">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--check-pod-status-in-active-namespaces">- &lt;strong>Check Pod Status in Active Namespaces&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get pods -n &amp;lt;namespace&amp;gt;
&lt;/code>&lt;/pre>
&lt;h4 id="--inspect-deployments-and-replicasets">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--inspect-deployments-and-replicasets">- &lt;strong>Inspect Deployments and ReplicaSets&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get deployments -n &amp;lt;namespace&amp;gt;
kubectl get rs -n &amp;lt;namespace&amp;gt;
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h2 id="3-verify-cluster-networking">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#3-verify-cluster-networking">&lt;strong>3. Verify Cluster Networking&lt;/strong>&lt;/a>
&lt;/h2>
&lt;h4 id="--service-connectivity">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--service-connectivity">- &lt;strong>Service Connectivity&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get svc -n &amp;lt;namespace&amp;gt;
&lt;/code>&lt;/pre>
&lt;h4 id="--dns-resolution">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--dns-resolution">- &lt;strong>DNS Resolution&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl exec -n kube-system &amp;lt;coredns-pod&amp;gt; -- nslookup kubernetes.default
&lt;/code>&lt;/pre>
&lt;h4 id="--ingressload-balancer">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#--ingressload-balancer">- &lt;strong>Ingress/Load Balancer&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> kubectl get ingress -n &amp;lt;namespace&amp;gt;
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h2 id="4-monitor-resource-utilization">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#4-monitor-resource-utilization">&lt;strong>4. Monitor Resource Utilization&lt;/strong>&lt;/a>
&lt;/h2>
&lt;p>Node Resource Usage&lt;/p>
&lt;pre>&lt;code> kubectl top nodes
&lt;/code>&lt;/pre>
&lt;p>Pod Resource Usage&lt;/p>
&lt;pre>&lt;code> kubectl top pods -n &amp;lt;namespace&amp;gt;
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h2 id="5-check-cluster-events">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#5-check-cluster-events">&lt;strong>5. Check Cluster Events&lt;/strong>&lt;/a>
&lt;/h2>
&lt;pre>&lt;code> kubectl get events --sort-by='.metadata.creationTimestamp'
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h2 id="6-validate-logging-and-monitoring">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#6-validate-logging-and-monitoring">&lt;strong>6. Validate Logging and Monitoring&lt;/strong>&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Ensure logging systems (e.g., EFK, Fluentd) are collecting logs as expected.&lt;/li>
&lt;li>Verify monitoring dashboards (e.g., Prometheus, Grafana) for anomalies or missing metrics.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="7-escalation-criteria">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#7-escalation-criteria">&lt;strong>7. Escalation Criteria&lt;/strong>&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Core system pods (kube-apiserver, etcd) are not running.&lt;/li>
&lt;li>A node remains in NotReady for more than 10 minutes.&lt;/li>
&lt;li>Pods in critical application namespaces are in CrashLoopBackOff or Error state without resolution.&lt;/li>
&lt;li>Networking issues persist and cannot be resolved by basic checks.&lt;/li>
&lt;li>Cluster resource utilization is critically high (e.g., &amp;gt;90% CPU or memory).&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="8-document-findings">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#8-document-findings">&lt;strong>8. Document Findings&lt;/strong>&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Record all findings in the incident management system, including:&lt;/li>
&lt;li>Steps taken during the checkout procedure.&lt;/li>
&lt;li>Observed errors or anomalies.&lt;/li>
&lt;li>Commands run and their output (if significant).&lt;/li>
&lt;/ul>
&lt;h2 id="end-of-document">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#end-of-document">End of Document&lt;/a>
&lt;/h2>
&lt;hr>
&lt;h3 id="what-information-online-helped-you-figure-this-out-what-blogs-or-tools-did-you-use">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#what-information-online-helped-you-figure-this-out-what-blogs-or-tools-did-you-use">What information online helped you figure this out? What blogs or tools did you use?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://kubernetes.io/docs/tasks/debug/debug-cluster/">https://kubernetes.io/docs/tasks/debug/debug-cluster/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://kubernetes.io/docs/concepts/">https://kubernetes.io/docs/concepts/&lt;/a>&lt;/li>
&lt;li>From conducting study-groups and working with K3s&lt;/li>
&lt;/ul>
&lt;h3 id="what-did-you-learn-in-this-process-of-writing-this-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#what-did-you-learn-in-this-process-of-writing-this-up">What did you learn in this process of writing this up?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Kubernetes is an Operating System with similar failure modes to that of Linux&lt;/li>
&lt;li>Kubernetes maintains helpful logs&lt;/li>
&lt;li>Kubernetes gives helpful errors&lt;/li>
&lt;li>KubeCTL is the tool I should internalize and master&lt;/li>
&lt;li>KubeCTL can manage multiple clusters remotely&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="digging-deeper-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#digging-deeper-">Digging Deeper ⛏️&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>Work more in the lab to build a container of your choice and then find out how to
deploy that into your cluster in a secure, scalable way. 👍&lt;/li>
&lt;/ol>
&lt;p>I have actually experimented with building out custom containers using Podman and using:&lt;/p>
&lt;pre>&lt;code> podman commit
&lt;/code>&lt;/pre>
&lt;p>to export the image as a custom local image. Then, I run that image and input the command:&lt;/p>
&lt;pre>&lt;code> podman generate kube my-container &amp;gt; my-container.yaml
&lt;/code>&lt;/pre>
&lt;p>This creates a manifest yaml that can then be spun up with Kubernetes.&lt;/p>
&lt;ol start="2">
&lt;li>Read this about securing containers: &lt;a href="https://docs.docker.com/build/building/best-">https://docs.docker.com/build/building/best-&lt;/a>
practices&lt;/li>
&lt;/ol>
&lt;p>I do have prior experience with this having completed the DevSecOps certification from TryHackMe, it covers containers security with red-team exercises.
However, it does not cover a ton of defensive measures. This best practices document is going to be really helpful when setting up future containers.&lt;/p>
&lt;ul>
&lt;li>Do this to practice securing those containers. &lt;a href="https://killercoda.com/killer-">https://killercoda.com/killer-&lt;/a>
shell-cks/scenario/static-manual-analysis-docker 👍&lt;/li>
&lt;/ul>
&lt;ol start="3">
&lt;li>Read these about securing Kubernetes Deployments:&lt;/li>
&lt;/ol>
&lt;p>&lt;a href="https://kubernetes.io/docs/concepts/security/">https://kubernetes.io/docs/concepts/security/&lt;/a> 👍 and
&lt;a href="https://kubernetes.io/docs/concepts/security/pod-security-standards/">https://kubernetes.io/docs/concepts/security/pod-security-standards/&lt;/a>&lt;/p>
&lt;ul>
&lt;li>
&lt;p>TLS&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Secrets API&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Runtime Classes&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Network Policies&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Admission Policy&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Pod Security standards&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Open Policy, assumed safe privileged user.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Baseline Policy&lt;/p>
&lt;/li>
&lt;li>
&lt;p>SELinux enforce Policy&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Do this lab to practice securing Kubernetes: &lt;a href="https://killercoda.com/killer-">https://killercoda.com/killer-&lt;/a>
shell-cks/scenario/static-manual-analysis-k8s&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>So checking the privilege status indicates a container is privleged or not. If privleged, move to insecure directory.&lt;/p>
&lt;hr>
&lt;h1 id="labs-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#labs-">Labs 🥼🧪&lt;/a>
&lt;/h1>
&lt;h3 id="warmup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#warmup">Warmup&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> curl -sfL https://get.k3s.io &amp;gt; /tmp/k3_installer.sh 👍
more /tmp/k3_installer.sh 👍
&lt;/code>&lt;/pre>
&lt;p>What do you notice in the installer?&lt;/p>
&lt;p>What checks are there?&lt;/p>
&lt;pre>&lt;code> grep -i arch /tmp/k3_installer.sh
&lt;/code>&lt;/pre>
&lt;p>What is the name of the variable holding the architecture?&lt;/p>
&lt;p>How is the system finding that variable?&lt;/p>
&lt;pre>&lt;code> uname -m
&lt;/code>&lt;/pre>
&lt;p>Verify your system architecture&lt;/p>
&lt;pre>&lt;code> grep -iE “selinux|sestatus” /tmp/k3_installer.sh
&lt;/code>&lt;/pre>
&lt;p>Does K3s check if selinux is running, or no? Yes 👍&lt;/p>
&lt;h3 id="installing-k3s-and-looking-at-how-it-interacts-with-your-linux-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#installing-k3s-and-looking-at-how-it-interacts-with-your-linux-system">Installing k3s and looking at how it interacts with your Linux system&lt;/a>
&lt;/h3>
&lt;p>Install k3s
curl -sfL &lt;a href="https://get.k3s.io">https://get.k3s.io&lt;/a> | sh -&lt;/p>
&lt;p>What was installed on your system?&lt;/p>
&lt;pre>&lt;code> rpm -qa –last | tac
&lt;/code>&lt;/pre>
&lt;p>Your tasks in this lab are designed to get you thinking about how container deployments interact with&lt;/p>
&lt;ol start="3">
&lt;li>
&lt;p>Verify the service is running&lt;/p>
&lt;pre>&lt;code> systemctl status k3s
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Check it systemd configuration&lt;/p>
&lt;pre>&lt;code> systemctl cat k3s
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>See what files and ports it is using&lt;/p>
&lt;pre>&lt;code> ss -ntulp | grep &amp;lt;pid from 3&amp;gt;
lsof -p &amp;lt;pid from 3&amp;gt;
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ol>
&lt;p>#Do you notice any ports that you did not expect?&lt;/p>
&lt;ol start="6">
&lt;li>
&lt;p>Verify simple kubectl call to API&lt;/p>
&lt;pre>&lt;code> kubectl get nodes
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Verify K3s is set to start on boot and then cycle the service&lt;/p>
&lt;pre>&lt;code> systemctl is-enabled k3s
systemctl stop k3s
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ol>
&lt;p>Recheck your steps 3-6&lt;/p>
&lt;p>What error do you see, and is it expected?&lt;/p>
&lt;p>What is the API port that kubectl is failing on?&lt;/p>
&lt;pre>&lt;code> systemctl start k3s
&lt;/code>&lt;/pre>
&lt;p>Verify your normal operations again.&lt;/p>
&lt;p>Looking at the K3 environment&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Check out components&lt;/p>
&lt;pre>&lt;code> kubectl version
kubectl get nodes
kubectl get pods -A
kubectl get namespaces
kubectl get configmaps -A
kubectl get secrets -A
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ol>
&lt;p>#Which namespace seems to be the most used?&lt;/p>
&lt;p>Creating Pods, Deployments, and Services&lt;/p>
&lt;p>It’s possible that the lab will fail in this environment. Continue as you can and identify the problem using&lt;/p>
&lt;p>the steps at the end of this section.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Create a pod named webpage with the image nginx&lt;/p>
&lt;pre>&lt;code> kubectl run webpage --image=nginx
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Create a pod named database with the image redis and labels set to tier=database&lt;/p>
&lt;pre>&lt;code> kubectl run database --image=redis --labels=tier=database
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Create a service with the name redis-service to expose the database pod within the cluster on port&lt;/p>
&lt;pre>&lt;code> 6379 (default Redis port)
kubectl expose pod database --port=6379 --name=redis-service --
type=ClusterIP
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Create a deployment called web-deployment using the image nginx that has 3 replicas&lt;/p>
&lt;pre>&lt;code> kubectl create deployment web-deployment --image=nginx --
replicas=3
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Verify that the pods are created&lt;/p>
&lt;pre>&lt;code> kubectl get deployments
kubectl get pods
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Create a new namespace called my-test&lt;/p>
&lt;pre>&lt;code> kubectl create namespace my-test
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Create a new deployment called redis-deploy with the image redis in your my-test namespace with 2&lt;/p>
&lt;pre>&lt;code> replicas
kubectl create deployment redis-deploy -n my-test --image=redis -
-replicas=2
&lt;/code>&lt;/pre>
&lt;/li>
&lt;/ol>
&lt;p>Do some of your same checks from before. What do you notice about the pods you created? Did they all
work?&lt;/p>
&lt;p>If this breaks in the lab, document the error. Check your disk space and RAM, the two tightest
constraints in the lab. Using systemctl restart k3s and journalctl -xe can you figure out what is failing?
(Rocky boxes may have limitations that cause this to not fully deploy, can you find out why?)&lt;/p>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#reflection-questions">Reflection questions:&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>What questions do you still have about this week?&lt;/li>
&lt;/ol>
&lt;p>I would like to know more about Kubernetes and how it can be effectively managed, but this is just a matter of further study.&lt;/p>
&lt;ol start="2">
&lt;li>How can you apply this now in your current role in IT? If you’re not in IT, how can you
look to put something like this into your resume or portfolio?&lt;/li>
&lt;/ol>
&lt;p>I installed K3S on my personal lab and ran through two days of exercises with the study group, gaining some competency with installing, configuring and deploying a set of pods from manifests. So I could confidently state that I know how to do this and check on the health of the system.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu10/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 9 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu9/</link><pubDate>Tue, 12 Nov 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu9/</guid><description>&lt;h1 id="containers--kubernetes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#containers--kubernetes-">Containers &amp;amp; Kubernetes 🦭&lt;/a>
&lt;/h1>
&lt;p>One of the most exciting units for me has been exploring deployment and hosting infrastructure. I’ve already spent some time working with Docker and Podman, but I have had limited hands-on experience with Kubernetes. Before this unit, I completed a few interactive Kubernetes labs on Killercoda, covering basic commands, information gathering, and logging.&lt;/p>
&lt;p>This week, I followed an interactive K3s lab that guided me through the installation process—a perfect refresher. Afterward, I jumped onto one of my Proxmox VMs and installed K3s on my homeLab 👨‍🔧&lt;/p>
&lt;hr>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#discussion-post-1">Discussion Post 1&lt;/a>
&lt;/h2>
&lt;p>It’s a slow day in the NOC and you have heard that a new system of container deployments are being used by your developers. Do some reading about containers, docker, and podman.&lt;/p>
&lt;h3 id="1what-resources-helped-me-answer-these-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#1what-resources-helped-me-answer-these-questions">1. What resources helped me answer these questions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://www.redhat.com/en/topics/containers">https://www.redhat.com/en/topics/containers&lt;/a>&lt;/li>
&lt;li>My RHCSA 9 Course on Udemy&lt;/li>
&lt;li>Notes I have composed in LogSeq from multiple sources&lt;/li>
&lt;li>Julia Evans Blog &lt;a href="https://jvns.ca/">https://jvns.ca/&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="2what-did-you-learn-about-that-you-didnt-know-before">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#2what-did-you-learn-about-that-you-didnt-know-before">2. What did you learn about that you didn’t know before?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>I did not know that Podman and Kubernetes can run WASM Applications alongside containers. I have some interest in WASM and Subsequent ByteCode, having read about it on occasion.&lt;/li>
&lt;li>I did not know that Podman containers can be converted to SystemD services.&lt;/li>
&lt;li>I learned a technique that I quite like using podman commit to create a custom compose file from a modified container and will likely use this alot.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Terminology that I wasn&amp;rsquo;t familiar with:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Control Plane: Manages container orchestration, monitoring, and state across cluster nodes.&lt;/li>
&lt;li>The API server: Core interface for communication between users and container clusters.&lt;/li>
&lt;li>Scheduler: Assigns containers to nodes based on resource availability and policies.&lt;/li>
&lt;/ul>
&lt;h3 id="3what-seems-to-be-the-major-benefit-of-containers">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#3what-seems-to-be-the-major-benefit-of-containers">3. What seems to be the major benefit of containers?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Can be declarative with compose. So infrastructure can be explicitly defined and easily rebuilt.&lt;/li>
&lt;li>Light weight / low resource. Containers are not complete systems and are stripped to the bare essentials, meaning they are very small files that run fast.&lt;/li>
&lt;/ul>
&lt;h3 id="4what-seems-to-be-some-obstacles-to-container-deployment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#4what-seems-to-be-some-obstacles-to-container-deployment">4. What seems to be some obstacles to container deployment?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>From my own experience, mounting persistent volumes was a bit tricky.&lt;/li>
&lt;li>Container networking presents a challenge bot conceptually and practically.&lt;/li>
&lt;li>Packaging application to run harmoniously within a container environment presents some friction.&lt;/li>
&lt;li>Large infrastructure must be broken into microservices, introducing complexity.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#discussion-post-2">Discussion Post 2&lt;/a>
&lt;/h2>
&lt;p>You get your first ticket about a problem with containers. One of the engineers is trying to move his container up to the Dev environment shared server. He sends you over this information about the command he’s trying to run.&lt;/p>
&lt;pre>&lt;code>[developer1@devserver read]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[developer1@devserver read]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/read_docker latest 2c0728a1f483 5 days ago 68.2 MB
docker.io/library/python 3.13.0-alpine3.19 9edd75ff93ac 3 weeks ago 47.5 MB
[developer1@devserver read]$ podman run -dt -p 8080:80/tcp docker.io/library/httpd
You decide to check out the server
[developer1@devserver read] ss -ntulp
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:((&amp;quot;systemd-resolve&amp;quot;,pid=166693,fd=13))
tcp LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* users:((&amp;quot;mariadbd&amp;quot;,pid=234918,fd=20))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:((&amp;quot;sshd&amp;quot;,pid=166657,fd=3))
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:((&amp;quot;systemd-resolve&amp;quot;,pid=166693,fd=14))
tcp LISTEN 0 4096 *:8080 *:* users:((&amp;quot;node_exporter&amp;quot;,pid=662,fd=3))
&lt;/code>&lt;/pre>
&lt;h3 id="1-what-do-you-think-the-problem-might-be-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#1-what-do-you-think-the-problem-might-be-">1. What do you think the problem might be? 🔍&lt;/a>
&lt;/h3>
&lt;p>There is a container call node exporter that is listening on port 8080, therefore the port is already in use. I think this is a pretty common issue as this port is normally used for public traffic. With many nodes running it is easy to double assign a port.&lt;/p>
&lt;h3 id="2-how-will-you-test-this-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#2-how-will-you-test-this-">2. How will you test this? 🤔&lt;/a>
&lt;/h3>
&lt;p>I would run the conflicting container run command with a slight port change.
podman run -dt -p 8081:80/tcp docker.io/library/httpd&lt;/p>
&lt;h3 id="3-the-developer-tells-you-that-hes-pulling-a-local-image-do-you-find-this-to-be-true-or-is-something-else-happening-in-their-run-command">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#3-the-developer-tells-you-that-hes-pulling-a-local-image-do-you-find-this-to-be-true-or-is-something-else-happening-in-their-run-command">3. The developer tells you that he’s pulling a local image, do you find this to be true, or is something else happening in their run command?&lt;/a>
&lt;/h3>
&lt;p>It is true that once and image is pulled, it is stored locally. So the developer may have &lt;strong>pulled&lt;/strong> the image. However in the command he is specifying a source for pulling a fresh container, so the dev is definitely sus. Typically if the image has been pulled it is given a container ID, which is then used to build with.&lt;/p>
&lt;h2 id="installing-k3s-in-my-homelab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#installing-k3s-in-my-homelab-">Installing K3s in my HomeLab 👍&lt;/a>
&lt;/h2>
&lt;p>After completing the suggested lab, I took note of installation process and replicated it on my HomeLab. I just wanted to share my process and bumps.&lt;/p>
&lt;h3 id="1-installation-from-curl-script">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#1-installation-from-curl-script">1. Installation from curl script&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>curl -sfL https://get.k3s.io | sh -
&lt;/code>&lt;/pre>
&lt;h3 id="2-making-sure-the-service-is-running-in-systemd">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#2-making-sure-the-service-is-running-in-systemd">2. Making sure the service is running in systemD&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>systemctl status k3s
&lt;/code>&lt;/pre>
&lt;h3 id="3-changing-config-permissions-problem-that-had-stumped-me">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#3-changing-config-permissions-problem-that-had-stumped-me">3. Changing config permissions (Problem that had stumped me)&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>sudo chmod 644 /etc/rancher/k3s/k3s.yaml
&lt;/code>&lt;/pre>
&lt;h3 id="4-deploying-a-pod">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#4-deploying-a-pod">4. Deploying a pod&lt;/a>
&lt;/h3>
&lt;p>kubectl run nginx &amp;ndash;image=nginx:alpine&lt;/p>
&lt;h3 id="5-making-an-alias-so-commands-are-less-annoying">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#5-making-an-alias-so-commands-are-less-annoying">5. Making an alias so commands are less annoying&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>alias k=kubectl
&lt;/code>&lt;/pre>
&lt;h3 id="6-checking-the-running-pod">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#6-checking-the-running-pod">6. Checking the running pod&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>k get pods
&lt;/code>&lt;/pre>
&lt;h2 id="digging-deeper-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#digging-deeper-">Digging Deeper ⛏️&lt;/a>
&lt;/h2>
&lt;h3 id="1see-if-you-can-get-a-deployment-working-in-the-lab">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#1see-if-you-can-get-a-deployment-working-in-the-lab">1. See if you can get a deployment working in the lab.&lt;/a>
&lt;/h3>
&lt;p>Screen shots from this deployment&lt;/p>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/1.png" alt="Step 1">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/volume.png" alt="Step 2">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/build.png" alt="Step 3">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/ps.png" alt="Step 4">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/attach.png" alt="Step 5">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/install1.png" alt="Step 6">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/install2.png" alt="Step 7">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/go.png" alt="Step 8">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/rungo.png" alt="Step 9">&lt;br>
&lt;img src="https://trevorsmale.github.io/techblog/images/PACU9/running.png" alt="Step 10">&lt;/p>
&lt;h3 id="what-worked-well">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#what-worked-well">What worked well?&lt;/a>
&lt;/h3>
&lt;p>creating a persistent volume and attaching to the volume worked well.
mkdir /root/TreasuresVolume
Pulling and building an image worked well.
Attaching to the container and interacting with it went well.
podman run -dit &amp;ndash;name TreasuresContainer -v /root/TreasuresVolume:/app docker.io/library/golang:alpine tail -f /dev/null
apk add vim gcc bash&lt;/p>
&lt;h3 id="what-did-you-have-to-troubleshoot">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#what-did-you-have-to-troubleshoot">What did you have to troubleshoot?&lt;/a>
&lt;/h3>
&lt;p>I ran into trouble when exiting the container. It will kill the container, forcing me to start it again, which was frustrating.
Having done this in the past, I thought this would not be an issue. However, I just learned that containers without continually running services will die when exited.
The fix for such an issue is to run something light and persistent on the container in order to keep it alive. This can be accomplished with a bash script or turning a go binary into a system binary to keep running.&lt;/p>
&lt;h3 id="what-documentation-can-you-make-to-be-able-to-do-this-faster-next-time">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#what-documentation-can-you-make-to-be-able-to-do-this-faster-next-time">What documentation can you make to be able to do this faster next time?&lt;/a>
&lt;/h3>
&lt;p>Actually, this blog is used to partially keep track of this. I use LogSeq as a second brain, where I will definitely copy and paste this info into my Podman section.&lt;/p>
&lt;hr>
&lt;h2 id="reflection-questions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#reflection-questions">Reflection Questions🤔&lt;/a>
&lt;/h2>
&lt;h3 id="1what-questions-do-you-still-have-about-this-week">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#1what-questions-do-you-still-have-about-this-week">1. What questions do you still have about this week?&lt;/a>
&lt;/h3>
&lt;p>I would like to know more about small scale deployments of Kubernetes such as the one I deployed using Rancher and K3S. More specifically I would like to know what limitations a small scale deployment has versus a multi machine / multi node system.&lt;/p>
&lt;h3 id="2how-can-you-apply-this-now-in-your-current-role-in-it-if-youre-not-in-it-how-can-you-look-to-put-something-like-this-into-your-resume-or-portfolio">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#2how-can-you-apply-this-now-in-your-current-role-in-it-if-youre-not-in-it-how-can-you-look-to-put-something-like-this-into-your-resume-or-portfolio">2. How can you apply this now in your current role in IT? If you’re not in IT, how can you look to put something like this into your resume or portfolio?&lt;/a>
&lt;/h3>
&lt;p>This content is highly applicable to my intended work as deploying services is becoming increasingly important, as evidenced by the requirement for knowledge of Podman in the RHCSA 9. I already have some container deployment work to display to prospective employers atm. I plan to further my knowledge in this area, especially in regard to Kubernetes as this seems to be the operating system of the internet.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu9/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 8 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu8/</link><pubDate>Wed, 30 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu8/</guid><description>&lt;h1 id="scripting-system-checks">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#scripting-system-checks">Scripting System Checks&lt;/a>
&lt;/h1>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU8/ibb.jpg" alt="Arnold">&lt;/p>
&lt;p>Once again beyond the Discussion Posts and Labbing. I spent a great deal of time scripting/programming System checks. After completing the labs which Bash Scripting and intro to &amp;lsquo;C&amp;rsquo;, I got really into GO as a system util. I have a particularly productive day with using the embed.fs feature of GO and packing unix system tools together in a single go program at compilation. I think there is a ton of potential here for my own uses. 👨‍🔧&lt;/p>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#discussion-post-1">Discussion Post 1&lt;/a>
&lt;/h2>
&lt;p>Scenario&lt;/p>
&lt;p>It’s a 2-week holiday in your country, and most of the engineers and architects who designed the system are out of town. You’ve noticed a pattern of logs filling up on a set of web servers due to increased traffic. Research and verification show that the logs are being sent off in real time to Splunk. Your team has been deleting the logs every few days, but a 3rd-shift engineer missed this in the notes, causing downtime. How might you implement a simple fix to stop-gap the problem until all engineering resources return next week?&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Resources Used&lt;/strong>:&lt;/p>
&lt;/li>
&lt;li>
&lt;p>TryHackMe (Splunk) Intro&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Study Group discussion&lt;/p>
&lt;/li>
&lt;li>
&lt;p>ChatGPT&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Blogs:&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://www.nohl.eu/tech-resources/notes-to-linux/log-files-in-tmpfs-without-breaking-logging/">Nohl&amp;rsquo;s Tech Resources: Log Files in tmpfs Without Breaking Logging&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://dietpi.com/docs/software/log_system/">DietPi Documentation: Log System&lt;/a>&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="why-cant-you-just-make-a-design-fix-and-add-space-in-varlog-on-all-these-systems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#why-cant-you-just-make-a-design-fix-and-add-space-in-varlog-on-all-these-systems">Why can’t you just make a design fix and add space in /var/log on all these systems?&lt;/a>
&lt;/h4>
&lt;p>Adding more space to &lt;code>/var/log&lt;/code> might be a design fix, but it isn’t feasible in the short term due to:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Operational Constraints&lt;/strong>: Extending storage may involve downtime, additional permissions, or architectural changes that can’t be approved without the primary engineers.&lt;/li>
&lt;li>&lt;strong>Temporary Nature of the Fix&lt;/strong>: Increasing space only delays the issue. If logs continue to grow, the problem will recur once space is exhausted again.&lt;/li>
&lt;/ul>
&lt;h4 id="why-cant-you-just-make-a-design-change-and-use-logrotate-more-frequently">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#why-cant-you-just-make-a-design-change-and-use-logrotate-more-frequently">Why can’t you just make a design change and use logrotate more frequently?&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Possibility of Log Loss&lt;/strong>: Higher logrotate frequency could still miss high-frequency log spikes, especially during unusual traffic peaks, risking logs being deleted before Splunk ingestion is complete.&lt;/li>
&lt;li>&lt;strong>Configuration and Testing&lt;/strong>: Aggressive logrotate adjustments may interfere with processes expecting logs at specific retention periods. Testing changes in production without key team members isn’t ideal.&lt;/li>
&lt;/ul>
&lt;h4 id="temporary-fix-options">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#temporary-fix-options">Temporary Fix Options&lt;/a>
&lt;/h4>
&lt;p>To address the issue, consider implementing a temporary fix by configuring a log retention policy that aggressively compresses or truncates logs without disrupting active processes. Here are some potential approaches:&lt;/p>
&lt;h3 id="implement-a-temporary-cron-job">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#implement-a-temporary-cron-job">Implement a Temporary &lt;strong>Cron Job&lt;/strong>&lt;/a>
&lt;/h3>
&lt;p>Schedule a cron job to truncate logs on a more aggressive schedule without deleting them. For example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&amp;gt; /var/log/access.log
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sb">```&lt;/span>bash
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &amp;gt; /var/log/access.log&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>This would empty the log file without removing it or impacting the active file descriptors held by any running processes.&lt;/p>
&lt;h3 id="set-up-temporary-log-compression">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#set-up-temporary-log-compression">Set Up Temporary Log Compression&lt;/a>
&lt;/h3>
&lt;p>Compress the logs after truncation if additional space savings are needed. Tools like gzip can compress logs efficiently, reducing disk space usage and ensuring logs are still accessible if required for audits or incident investigations.&lt;/p>
&lt;h3 id="implement-a-ram-disk-for-temporary-logs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#implement-a-ram-disk-for-temporary-logs">Implement a RAM Disk for Temporary Logs&lt;/a>
&lt;/h3>
&lt;p>As a short-term measure, you could set up a RAM disk for logs that don’t need long-term retention. This allows logs to be stored temporarily in memory, reducing disk space pressure. For instance&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> mount -t tmpfs -o &lt;span class="nv">size&lt;/span>&lt;span class="o">=&lt;/span>512M tmpfs /var/log/temp&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>You could then configure lower-priority logs to write here temporarily, knowing they will be lost upon reboot, which may be acceptable in a crisis scenario.&lt;/p>
&lt;h3 id="adjust-splunk-forwarder-configuration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#adjust-splunk-forwarder-configuration">Adjust Splunk Forwarder Configuration:&lt;/a>
&lt;/h3>
&lt;p>If possible, configure the Splunk forwarder to filter logs more aggressively, reducing the volume of logs that are retained on the system. The props.conf or inputs.conf files can be configured to forward logs without keeping local copies.&lt;/p>
&lt;p>Adding more space to /var/log might be a design fix, but it isn’t feasible in the short term due to the following:&lt;/p>
&lt;ul>
&lt;li>Operational Constraints: Extending storage could involve downtime, additional permissions, or changes that require architectural decisions that can’t be made without the primary engineers.&lt;/li>
&lt;li>Temporary Nature of the Fix: Increasing space only delays the issue rather than preventing it. If the logs keep growing, the problem will recur once space runs out again.&lt;/li>
&lt;/ul>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#discussion-post-2">Discussion Post 2&lt;/a>
&lt;/h2>
&lt;p>You are the only Linux Administrator at a small healthcare company. The engineer/admin before you left you a lot of scripts to untangle. This is one of our many tasks as administrators, so you set out to accomplish it. You start to notice that he only ever uses nested if statements in bash. You also notice that every loop is a conditional &lt;code>while true&lt;/code> and then he breaks the loop after a decision test each loop. You know his stuff works, but you think it could be more easily written for supportability, for you and future admins. You decide to write up some notes by reading some google, AI, and talking to your peers.&lt;/p>
&lt;h3 id="compare-the-use-of-nested-if-versus-case-statement-in-bash">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#compare-the-use-of-nested-if-versus-case-statement-in-bash">Compare the use of nested if versus case statement in bash.&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Nested if statements are useful for situations where each condition depends on the result of the previous test, requiring a hierarchy or sequence.&lt;/li>
&lt;li>A case statement is ideal for handling multiple discrete values of a variable, especially if there are many possible branches. It’s typically cleaner and more readable than a nested if.&lt;/li>
&lt;/ul>
&lt;h3 id="compare-the-use-of-conditional-and-counting-loops-under-what-circumstances">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#compare-the-use-of-conditional-and-counting-loops-under-what-circumstances">Compare the use of conditional and counting loops. Under what circumstances&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Use conditional loops (while) when you don’t know the number of iterations in advance and need to loop based on conditions.&lt;/li>
&lt;li>Use counting loops (for) when you have a set number of iterations or are working with a list. This structure is clearer and prevents issues that may arise from unintentional infinite loops.&lt;/li>
&lt;/ul>
&lt;h3 id="would-you-use-one-or-the-other">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#would-you-use-one-or-the-other">would you use one or the other?&lt;/a>
&lt;/h3>
&lt;p>optimizing or refactoring Bash scripts the Engineer had left me.&lt;/p>
&lt;ul>
&lt;li>I would replace nested if statements with case statements when possible to improve readability, especially when handling multiple discrete values.&lt;/li>
&lt;li>Of course, I would comment things for added communication/ maintainability.&lt;/li>
&lt;li>I would Limit while true loops to cases where no predictable count or list is available. Clearly define a break condition early to avoid infinite loops.&lt;/li>
&lt;li>I would Use for loops for counting or iterating over arrays or lists, as they provide a clean structure with known iteration limits.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu8/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 7 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu7/</link><pubDate>Sun, 27 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu7/</guid><description>&lt;h1 id="security">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#security">Security&lt;/a>
&lt;/h1>
&lt;h2 id="patching-the-system-package-management">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#patching-the-system-package-management">Patching the system/ Package Management&lt;/a>
&lt;/h2>
&lt;h3 id="yum-dnf-rpm">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#yum-dnf-rpm">yum, dnf, rpm&lt;/a>
&lt;/h3>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU7/CatPackage.jpg" alt="Packaged Cat">&lt;/p>
&lt;p>As the course progresses, I am learning more deeply within a study group. Aside from the lab work and discussion posts. I have been putting a lot of hours satisfying curiosities regarding the linux system.
For this unit we did a deep dive into packaging, going so far as to look at the history and reasoning before decision making. We had also looked at packages are managed within tightly controlled environments.
I now feel that I have a robust understanding of the theory and practical elements of Redhat packaging and beyond.&lt;/p>
&lt;h2 id="discussion-post-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#discussion-post-1">Discussion Post 1:&lt;/a>
&lt;/h2>
&lt;p>Why software versioning is important. 🤔&lt;/p>
&lt;ol>
&lt;li>Versioning enables you to monitor software updates systematically, making it easier to troubleshoot, roll back changes, and trace modifications for security or functionality purposes. 👍&lt;/li>
&lt;li>One can manage dependencies confidently, avoiding conflicts between system components, libraries, and tools. crucial for stable and consistent deployments. 👍&lt;/li>
&lt;li>We can verify package integrity, ensuring installed software hasn’t been altered or corrupted. Essential for maintaining a secure and stable system environment. 👍&lt;/li>
&lt;/ol>
&lt;h2 id="discussion-post-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#discussion-post-2">Discussion Post 2:&lt;/a>
&lt;/h2>
&lt;h3 id="scenario">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#scenario">Scenario:&lt;/a>
&lt;/h3>
&lt;p>You are new to a Linux team. A ticket has come in from an application team and has already been escalated to your manager. They want software installed on one of their servers but you cannot find any documentation and your security team is out to lunch and not responding. You remember from some early documentation that you read that all the software in the internal repos you currently have are approved for deployment on servers. You want to also verify by checking other servers that this software exists. This is an urgent ask and your manager is hovering.
How can you check all the repos on your system to see which are active? 🤔
How would you check another server to see if the software was installed there? 🤔
If you find the software, how might you figure out when it was installed? (Time/Date) 🤔&lt;/p>
&lt;h3 id="answer">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#answer">Answer:&lt;/a>
&lt;/h3>
&lt;p>In an urgent situation like this, I’d first check which approved software repositories are active on my system,
then verify if the software is already installed on similar servers to ensure it’s safe to proceed. Finally, I’d review the installation history to confirm when it was
added. Working with Red Hat packaging and package management systems has many more options than I was expecting; through labbing in the study group,
I’ve gained a much better understanding of packages, dependencies, and package management.&lt;/p>
&lt;p>Packing was a pretty deep rabbit hole for me.&lt;/p>
&lt;p>This is the process I&amp;rsquo;d follow for this case:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Check Active Repositories
dnf repolist&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Check if the Software is Installed on Your System
rpm -qa | grep &amp;lt;software_name&amp;gt;
or
dnf list installed &amp;lt;software_name&amp;gt;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Check Another Server for Software Installation with SSH and Step 2 commands.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>View Installation History (Time/Date)&lt;/p>
&lt;p>dnf history info &amp;lt;transaction_id&amp;gt;
dnf history list &amp;lt;software_name&amp;gt;&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="discussion-post-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#discussion-post-3">Discussion Post 3&lt;/a>
&lt;/h2>
&lt;p>(After you have completed the lab) - Looking at the concept of group install from DNF or Yum. Why do you think an administrator may never want to use that in a running system? Why might an engineer want to or not want to use that? This is a thought exercise, so it’s not a “right or wrong” answer it’s for you to think about.&lt;/p>
&lt;h3 id="question">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#question">Question:&lt;/a>
&lt;/h3>
&lt;p>What is the concept of software bloat, and how do you think it relates?&lt;/p>
&lt;h3 id="answer-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#answer-1">Answer:&lt;/a>
&lt;/h3>
&lt;p>Software bloat is when essential tools/packages are larger than they need to be, effecting performance, reliability and security. By performance I am referring to the loss of potential performance from unessecary resource use. In regards to reliability, more complex systems inherently have more potential to fail. Security means many things, so I am specifically thinking about attack surface and potential for vulnerability due to the aforementioned complexity.&lt;/p>
&lt;h3 id="question-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#question-1">Question:&lt;/a>
&lt;/h3>
&lt;p>What is the concept of a security baseline, and how do you think it relates?&lt;/p>
&lt;h3 id="answer-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#answer-2">Answer:&lt;/a>
&lt;/h3>
&lt;p>A set of minimum security standards and controls that organizations implement to protect systems.&lt;/p>
&lt;h3 id="question-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#question-2">Question:&lt;/a>
&lt;/h3>
&lt;p>How do you think something like this affects performance baselines?&lt;/p>
&lt;h3 id="answer-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#answer-3">Answer:&lt;/a>
&lt;/h3>
&lt;p>By targeting specific packages, tracking changes, reducing unnessecary dependancies and bloat, we satisfy the tenants of a security baseline by establishing consistency, simplifying compliance, enhancing efficiency and reduce risk.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu7/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 6 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu6/</link><pubDate>Mon, 21 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu6/</guid><description>&lt;h1 id="security--firewalld--ufw-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#security--firewalld--ufw-">Security – Firewalld &amp;amp; UFW 🔥🧱&lt;/a>
&lt;/h1>
&lt;p>In this unit, we explore essential concepts in firewall management using Firewalld and UFW. A firewall acts as a security system, controlling the flow of traffic between networks by enforcing rules based on zones —logical areas with different security policies. Services are predefined sets of ports or protocols that firewalls allow or block, and zones like DMZ (Demilitarized Zone) provide added security layers by isolating public-facing systems. Stateful packet filtering tracks the state of connections, allowing more dynamic rules, while stateless packet filtering inspects individual packets without connection context. Proxies facilitate indirect network connections for security and privacy, while advanced security measures such as Web Application Firewalls (WAF) and Next-Generation Firewalls (NGFW) offer specialized protection against modern threats.&lt;/p>
&lt;hr>
&lt;h1 id="lab-work-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#lab-work-">Lab Work 🧪🥼&lt;/a>
&lt;/h1>
&lt;h2 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#intro">Intro&lt;/a>
&lt;/h2>
&lt;p>This week, we dove deep into configuring and testing firewall settings in our Discord study group. I had several virtual machines set up in my ProxMox home lab, and we experimented while completing the lab work. As usual, we went on several tangents, verifying ideas. In total, we spent over 5 hours running commands, experimenting with different configurations, breaking things, and debating solutions. By the end of the session, I gained a practical understanding of Firewalld configuration, packet sending, and packet tracing with Wireshark. It was frustrating at times, but ultimately rewarding.&lt;/p>
&lt;h3 id="sending--receiving-test-packets-experiment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#sending--receiving-test-packets-experiment">Sending &amp;amp; Receiving test packets experiment&lt;/a>
&lt;/h3>
&lt;h4 id="1-so-we-set-up-one-server-to-receive-a-packet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#1-so-we-set-up-one-server-to-receive-a-packet">1. So we set up one server to receive a packet:&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> nc -l -p -u 12345 &amp;gt; received_file
&lt;/code>&lt;/pre>
&lt;h4 id="2-sending-from-another-server-and-noted-that-the-packet-was-recorded-in-received_file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#2-sending-from-another-server-and-noted-that-the-packet-was-recorded-in-received_file">2. Sending from another server and noted that the packet was recorded in &lt;strong>received_file&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> echo 'message1' | nc -u server_b_ip 12345
&lt;/code>&lt;/pre>
&lt;h4 id="3-we-set-firewalld-to-block-udp-port-12345">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#3-we-set-firewalld-to-block-udp-port-12345">3. We set Firewalld to block udp port 12345&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> sudo firewall-cmd --zone=public --add-rich-rule='rule family=&amp;quot;ipv4&amp;quot; source address=&amp;quot;192.168.2.166&amp;quot; port protocol=&amp;quot;udp&amp;quot; port=&amp;quot;12345&amp;quot; accept' --permanent
&lt;/code>&lt;/pre>
&lt;h4 id="4-so-we-set-up-one-server-to-receive-a-packet">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#4-so-we-set-up-one-server-to-receive-a-packet">4. So we set up one server to receive a packet:&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> nc -l -p -u 12345 &amp;gt; received_file
&lt;/code>&lt;/pre>
&lt;h4 id="5-sending-from-another-server">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#5-sending-from-another-server">5. Sending from another server:&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> echo 'Blocked' | nc -u server_b_ip 12345
&lt;/code>&lt;/pre>
&lt;h4 id="6-we-then-noted-that-this-packet-did-not-come-through">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#6-we-then-noted-that-this-packet-did-not-come-through">6. We then noted that this packet did not come through&lt;/a>
&lt;/h4>
&lt;h4 id="7-we-then-set-up-netcat-to-listen-for-packets-on-udp-port-12346-slightly-different">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#7-we-then-set-up-netcat-to-listen-for-packets-on-udp-port-12346-slightly-different">7. We then set up netcat to listen for packets on udp port 12346 &amp;lsquo;slightly different&amp;rsquo;&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> nc -l -p -u 12346 &amp;gt; received_file
&lt;/code>&lt;/pre>
&lt;h4 id="8-sending-from-another-server-and-noted-that-the-packet-was-recorded-in-received_file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#8-sending-from-another-server-and-noted-that-the-packet-was-recorded-in-received_file">8. Sending from another server and noted that the packet was recorded in &lt;strong>received_file&lt;/strong>&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> echo 'message2' | nc -u server_b_ip 12346
&lt;/code>&lt;/pre>
&lt;h4 id="9-then-we-busted-open-wireshark-on-the-packet-receiving-vm-and-turned-on-general-packet-scanning">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#9-then-we-busted-open-wireshark-on-the-packet-receiving-vm-and-turned-on-general-packet-scanning">9. Then we busted open WireShark on the packet receiving VM and turned on general packet scanning&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> echo 'mom' | nc -u server_b_ip 12346
&lt;/code>&lt;/pre>
&lt;h4 id="10-we-then-looked-at-all-of-the-ways-we-could-inspect-the-packets-including-additional-data-bits-over-udp-for-no-apparent-reason">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#10-we-then-looked-at-all-of-the-ways-we-could-inspect-the-packets-including-additional-data-bits-over-udp-for-no-apparent-reason">10. We then looked at all of the ways we could inspect the packets including additional data bits over UDP for no apparent reason.&lt;/a>
&lt;/h4>
&lt;p>Fin&lt;/p>
&lt;hr>
&lt;h1 id="types-of-firewalls-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#types-of-firewalls-">Types of Firewalls 🔍&lt;/a>
&lt;/h1>
&lt;h2 id="firewalld-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#firewalld-">Firewalld 🔥🧱&lt;/a>
&lt;/h2>
&lt;p>Uses &lt;strong>zones&lt;/strong> to define the level of trust for network connections, making it easy to apply different security settings to various types of connections (like home, public, or work). It’s dynamic, meaning changes can be made without restarting the firewall, ensuring smooth operation.&lt;/p>
&lt;h3 id="zones-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#zones-">Zones 🍱&lt;/a>
&lt;/h3>
&lt;p>The concept is specific to Firewalld. Zones are a predefined set of firewall rules that determine the level of trust assigned to a network connection. Zones allow you to apply different security policies to different network interfaces based on how much you trust the network.&lt;/p>
&lt;h3 id="common-commands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#common-commands">Common Commands&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> firewall-cmd --state
&lt;/code>&lt;/pre>
&lt;p>Checks if Firewalld is running.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --get-active-zones
&lt;/code>&lt;/pre>
&lt;p>Lists all active zones and the interfaces associated with them.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --get-default-zone
&lt;/code>&lt;/pre>
&lt;p>Displays the default zone for new interfaces or connections.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --set-default-zone=ZONE
&lt;/code>&lt;/pre>
&lt;p>Changes the default zone to the specified zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --zone=ZONE --add-service=SERVICE
&lt;/code>&lt;/pre>
&lt;p>Allows a service (e.g., SSH, HTTP) in the specified zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --zone=ZONE --remove-service=SERVICE
&lt;/code>&lt;/pre>
&lt;p>Removes a service from the specified zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --zone=ZONE --add-port=PORT/PROTOCOL
&lt;/code>&lt;/pre>
&lt;p>Opens a specific port (e.g., 80/tcp) in the specified zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --zone=ZONE --remove-port=PORT/PROTOCOL
&lt;/code>&lt;/pre>
&lt;p>Closes a specific port in the specified zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --reload
&lt;/code>&lt;/pre>
&lt;p>Reloads the Firewalld configuration without dropping active connections.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --list-all
&lt;/code>&lt;/pre>
&lt;p>Lists all the rules and settings in the active zone.&lt;/p>
&lt;pre>&lt;code> firewall-cmd --permanent
&lt;/code>&lt;/pre>
&lt;p>Applies changes permanently (used with other commands to ensure changes persist after reboots).&lt;/p>
&lt;pre>&lt;code> firewall-cmd --runtime-to-permanent
&lt;/code>&lt;/pre>
&lt;p>Converts the current runtime configuration to a permanent one.&lt;/p>
&lt;h3 id="zone-example">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#zone-example">Zone example&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>A public zone might have stricter rules, blocking most traffic except for essential services like web browsing.&lt;/li>
&lt;li>A home zone could allow more open traffic, such as file sharing, because the network is more trusted.&lt;/li>
&lt;/ul>
&lt;h2 id="ufw-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#ufw-">UFW 🔥🧱&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Uncomplicated Firewall&lt;/strong> is a user-friendly firewall designed to simplify the process of controlling network traffic by allowing or blocking connections. UFW is commonly used on &lt;strong>Ubuntu&lt;/strong> and provides easy commands for setting up firewall rules, making it ideal for beginners. Despite it is simplicity, it is powerful enough to handle complex configurations.&lt;/p>
&lt;h3 id="default-deny-policy-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#default-deny-policy-">Default Deny Policy 🔐&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>By default, UFW denies all incoming connections while allowing outgoing ones. This enhances security by requiring users to explicitly allow any incoming traffic.&lt;/li>
&lt;/ul>
&lt;h3 id="common-commands-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#common-commands-1">Common Commands&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> sudo ufw status
&lt;/code>&lt;/pre>
&lt;p>Displays the current status of UFW and active rules.&lt;/p>
&lt;pre>&lt;code> sudo ufw enable
&lt;/code>&lt;/pre>
&lt;p>Enables the UFW firewall.&lt;/p>
&lt;pre>&lt;code> sudo ufw disable
&lt;/code>&lt;/pre>
&lt;p>Disables the UFW firewall.&lt;/p>
&lt;pre>&lt;code> sudo ufw default deny incoming
&lt;/code>&lt;/pre>
&lt;p>Sets the default policy to deny all incoming connections.&lt;/p>
&lt;pre>&lt;code> sudo ufw default allow outgoing
&lt;/code>&lt;/pre>
&lt;p>Sets the default policy to allow all outgoing connections.&lt;/p>
&lt;pre>&lt;code> sudo ufw allow PORT
&lt;/code>&lt;/pre>
&lt;p>Allows traffic on a specific port (e.g., &lt;code>sudo ufw allow 22&lt;/code> to allow SSH).&lt;/p>
&lt;pre>&lt;code> sudo ufw deny PORT
&lt;/code>&lt;/pre>
&lt;p>Denies traffic on a specific port.&lt;/p>
&lt;pre>&lt;code> sudo ufw delete allow PORT
&lt;/code>&lt;/pre>
&lt;p>Removes a previously allowed rule for a port.&lt;/p>
&lt;pre>&lt;code> sudo ufw allow SERVICE
&lt;/code>&lt;/pre>
&lt;p>Allows traffic for a service by name (e.g., &lt;code>sudo ufw allow ssh&lt;/code>).&lt;/p>
&lt;pre>&lt;code> sudo ufw deny SERVICE
&lt;/code>&lt;/pre>
&lt;p>Denies traffic for a service by name.&lt;/p>
&lt;pre>&lt;code> sudo ufw allow from IP
&lt;/code>&lt;/pre>
&lt;p>Allows traffic from a specific IP address.&lt;/p>
&lt;pre>&lt;code> sudo ufw deny from IP
&lt;/code>&lt;/pre>
&lt;p>Denies traffic from a specific IP address.&lt;/p>
&lt;pre>&lt;code> sudo ufw allow proto PROTOCOL from IP to any port PORT
&lt;/code>&lt;/pre>
&lt;p>Allows traffic for a specific protocol, source IP, and port (e.g., &lt;code>sudo ufw allow proto tcp from 192.168.1.100 to any port 80&lt;/code>).&lt;/p>
&lt;pre>&lt;code> sudo ufw reset
&lt;/code>&lt;/pre>
&lt;p>Resets all UFW rules to default.&lt;/p>
&lt;pre>&lt;code> sudo ufw reload
&lt;/code>&lt;/pre>
&lt;p>Reloads UFW rules without disabling the firewall.&lt;/p>
&lt;h2 id="waf-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#waf-">WAF 🔥🧱&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Web Application Firewall&lt;/strong> is a security system designed to protect web applications by filtering and monitoring HTTP traffic between a web application and the internet. It helps prevent common web-based attacks like SQL injection, cross-site scripting (XSS), and cross-site request forgery (CSRF) by analyzing the incoming and outgoing traffic and blocking malicious requests. Unlike traditional firewalls that focus on network security, a WAF specifically targets the security of web applications and can be an important part of a layered defense strategy.&lt;/p>
&lt;h3 id="more-sophisticated-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#more-sophisticated-">More Sophisticated 🍷&lt;/a>
&lt;/h3>
&lt;p>are generally more sophisticated than Firewalld or UFW because they operate at the application layer (Layer 7) of the OSI model. Blocking traffic is one thing, but packet inspection is another.&lt;/p>
&lt;h3 id="quite-a-few-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#quite-a-few-">Quite a few ⚖️&lt;/a>
&lt;/h3>
&lt;p>There are many Web Application Firewalls out there that cover specific cloud platforms or web services. Here is a list of some popular ones:&lt;/p>
&lt;ul>
&lt;li>AWS WAF&lt;/li>
&lt;li>Cloudflare WAF&lt;/li>
&lt;li>F5 Advanced WAF&lt;/li>
&lt;li>Imperva WAF&lt;/li>
&lt;li>ModSecurity&lt;/li>
&lt;li>Barracuda WAF&lt;/li>
&lt;li>Sucuri WAF&lt;/li>
&lt;li>Akamai Kona Site Defender&lt;/li>
&lt;li>Fortinet FortiWeb&lt;/li>
&lt;/ul>
&lt;h2 id="ngfw-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#ngfw-">NGFW 🔥🧱🧠&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Next-Generation Firewall&lt;/strong> is an advanced type of firewall that goes beyond traditional firewall features like packet filtering. It combines standard firewall capabilities with more advanced functionalities such as deep packet inspection (DPI), intrusion prevention systems (IPS), and application-level control. NGWs can inspect and control traffic at a more granular level, allowing administrators to set security rules based on specific applications, users, or behaviors.&lt;/p>
&lt;h3 id="features-of-a-typical-ngfw">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#features-of-a-typical-ngfw">Features of a typical NGFW&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Deep Packet Inspection (DPI)&lt;/strong>: Examines the content of data packets, not just their headers, allowing the firewall to identify and block threats hidden in the traffic.&lt;/li>
&lt;li>&lt;strong>Intrusion Detection and Prevention System (IDS/IPS)&lt;/strong>: Monitors network traffic for suspicious activity and can take action (like blocking or alerting) to prevent attacks in real-time.&lt;/li>
&lt;li>&lt;strong>Application Awareness and Control&lt;/strong>: Recognizes and manages specific applications (e.g., Facebook, Skype) regardless of port or protocol, allowing for fine-grained traffic control.&lt;/li>
&lt;li>&lt;strong>Advanced Malware Protection (AMP)&lt;/strong>: Detects and blocks malware using both signature-based detection and behavioral analysis to prevent malware from entering the network.&lt;/li>
&lt;li>&lt;strong>SSL/TLS Decryption&lt;/strong>: Decrypts encrypted traffic (HTTPS) for inspection to detect threats hiding inside secure channels.&lt;/li>
&lt;li>&lt;strong>User Identity Integration&lt;/strong>: Applies firewall rules based on user identity or group membership rather than just IP addresses, providing more flexible access control.&lt;/li>
&lt;li>&lt;strong>Threat Intelligence Feeds&lt;/strong>: Uses real-time threat data from global databases to protect against emerging threats and malicious IP addresses or domains.&lt;/li>
&lt;li>&lt;strong>Cloud-Delivered Security&lt;/strong>: Provides scalable and flexible cloud-based protection services such as sandboxing, traffic analysis, and updates for zero-day attacks.&lt;/li>
&lt;li>&lt;strong>Virtual Private Network (VPN) Support&lt;/strong>: Allows secure, encrypted connections for remote users or between different networks (site-to-site or remote access VPNs).&lt;/li>
&lt;li>&lt;strong>URL Filtering&lt;/strong>: Controls access to websites based on categories (e.g., social media, gambling) or specific URLs, helping enforce acceptable use policies.&lt;/li>
&lt;li>&lt;strong>Quality of Service (QoS)&lt;/strong>: Prioritizes certain types of traffic, ensuring that critical applications receive the necessary bandwidth and reducing congestion.&lt;/li>
&lt;li>&lt;strong>Zero-Trust Network Segmentation&lt;/strong>: Implements policies based on strict access control, ensuring that users and devices only access the resources they are explicitly permitted.&lt;/li>
&lt;li>&lt;strong>Sandboxing&lt;/strong>: Isolates suspicious files or code in a secure environment to detect malicious behavior without affecting the rest of the network.&lt;/li>
&lt;li>&lt;strong>Logging and Reporting&lt;/strong>: Provides detailed logs and reports on network traffic, blocked threats, and firewall activity for auditing and troubleshooting.&lt;/li>
&lt;/ul>
&lt;h3 id="ngfw-products">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#ngfw-products">NGFW Products&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Palo Alto Networks NGFW&lt;/li>
&lt;li>Cisco Firepower NGFW&lt;/li>
&lt;li>Fortinet FortiGate NGFW&lt;/li>
&lt;li>Check Point NGFW&lt;/li>
&lt;li>Sophos XG NGFW&lt;/li>
&lt;li>Juniper Networks SRX Series NGFW&lt;/li>
&lt;li>Barracuda CloudGen NGFW&lt;/li>
&lt;li>SonicWall NGFW&lt;/li>
&lt;li>WatchGuard Firebox NGFW&lt;/li>
&lt;li>Forcepoint NGFW&lt;/li>
&lt;li>PfSense NGFW&lt;/li>
&lt;/ul>
&lt;h3 id="experience-with-pfsense">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#experience-with-pfsense">Experience with PFSense&lt;/a>
&lt;/h3>
&lt;p>I am familiar with PfSense as it is &lt;strong>Open Source&lt;/strong> and popular among the Homelab enthusiasts because it is offers expansive features built upon FreeBSD which has killer networking.&lt;/p>
&lt;h3 id="some-limitations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#some-limitations">Some limitations&lt;/a>
&lt;/h3>
&lt;h4 id="pre-packaged-features">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#pre-packaged-features">Pre-packaged Features&lt;/a>
&lt;/h4>
&lt;p>Commercial NGFWs (e.g., Palo Alto Networks, Cisco Firepower) often come with built-in advanced features such as cloud-delivered threat intelligence, AI-powered threat detection, and sandboxing for zero-day threats. While pfSense can be extended with third-party packages, it doesn’t natively offer the same level of seamless integration or automation.&lt;/p>
&lt;h4 id="unified-management">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#unified-management">Unified Management&lt;/a>
&lt;/h4>
&lt;p>Commercial NGFWs typically provide a centralized management console for handling multiple firewalls across large networks. While pfSense can handle multiple installations, managing them requires more manual effort and may not be as streamlined as the enterprise-grade management consoles of commercial NGFWs.&lt;/p>
&lt;h4 id="enterprise-support">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#enterprise-support">Enterprise Support&lt;/a>
&lt;/h4>
&lt;p>pfSense relies on community and third-party support, whereas commercial NGFWs offer direct vendor support with service level agreements (SLAs), which can be crucial for large enterprises needing guaranteed response times and assistance.&lt;/p>
&lt;h4 id="threat-intelligence">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#threat-intelligence">Threat Intelligence&lt;/a>
&lt;/h4>
&lt;p>NGFWs like those from Palo Alto or Cisco often integrate with real-time global threat intelligence networks, offering constant updates about emerging threats. While pfSense can be configured with tools like Snort for intrusion detection, it lacks the built-in, cloud-powered intelligence found in commercial NGFWs.&lt;/p>
&lt;hr>
&lt;h1 id="case-study-1-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#case-study-1-">Case Study #1 🤔&lt;/a>
&lt;/h1>
&lt;p>A ticket has come in from an application team. Some of the servers your team built for them last week have not been reporting up to enterprise monitoring and they need it to be able to troubleshoot a current issue, but they have no data. You jump on the new servers and find that your engineer built everything correctly and the agents for node_exporter, ceph_exporter and logstash exporter that your teams use. But, they also have adhered to the new company standard of firewalld must be running. No one has documented the ports that need to be open, so you’re stuck between the new standards and fixing this problem on live systems.&lt;/p>
&lt;h3 id="1-initial-research">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#1-initial-research">1. Initial Research&lt;/a>
&lt;/h3>
&lt;p>Findings:&lt;/p>
&lt;ul>
&lt;li>node_exporter typically uses port &lt;strong>9100&lt;/strong>&lt;/li>
&lt;li>ceph_exporter may use port &lt;strong>9128&lt;/strong>&lt;/li>
&lt;li>logstash commonly uses ports &lt;strong>5044&lt;/strong>&lt;/li>
&lt;/ul>
&lt;h3 id="2-checking-configs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#2-checking-configs">2. Checking Configs&lt;/a>
&lt;/h3>
&lt;h4 id="a-logstash-config">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#a-logstash-config">A. LogStash Config&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> cat /etc/logstash/conf.d/
&lt;/code>&lt;/pre>
&lt;h4 id="b-node-exporter-config">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#b-node-exporter-config">B. node exporter config&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> cat /etc/systemd/system/node_exporter.service
&lt;/code>&lt;/pre>
&lt;h4 id="c-ceph-exporter-config">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#c-ceph-exporter-config">C. ceph exporter config&lt;/a>
&lt;/h4>
&lt;pre>&lt;code> cat /etc/systemd/system/ceph_exporter.service
&lt;/code>&lt;/pre>
&lt;h1 id="or">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#or">Or&lt;/a>
&lt;/h1>
&lt;h3 id="3-gathering-socket-statistics">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#3-gathering-socket-statistics">3. Gathering Socket Statistics&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> sudo ss -tuln | grep LISTEN
&lt;/code>&lt;/pre>
&lt;h4 id="options-breakdown">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#options-breakdown">Options Breakdown&lt;/a>
&lt;/h4>
&lt;p>-t: Show TCP sockets.
-u: Show UDP sockets.
-l: Show listening sockets, i.e., those waiting for incoming connections.
-n: Show the output numerically, without resolving service names (e.g., display IP addresses and port numbers instead of domain names or service names like “http”).&lt;/p>
&lt;h3 id="q-1-as-youre-looking-this-up-what-terms-and-concepts-are-new-to-you">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-1-as-youre-looking-this-up-what-terms-and-concepts-are-new-to-you">Q: 1. As you’re looking this up, what terms and concepts are new to you?&lt;/a>
&lt;/h3>
&lt;p>Basically all of the concepts used are new to me. I am not very well versed in networking, network scanning or inspecting service configs.
So this became a research and practice exercise that has shown me quite a lot of new tricks.&lt;/p>
&lt;h3 id="q-2-what-are-the-ports-that-you-need-to-expose-how-did-you-find-the-answer">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-2-what-are-the-ports-that-you-need-to-expose-how-did-you-find-the-answer">Q: 2. What are the ports that you need to expose? How did you find the answer?&lt;/a>
&lt;/h3>
&lt;p>Theoretically I would expose port &lt;strong>9100&lt;/strong>, &lt;strong>9128&lt;/strong>, &lt;strong>5044&lt;/strong> from research. Furthermore, I now know how to check configs and/or gathering sockets statistics&lt;/p>
&lt;h3 id="q-3-what-are-you-going-to-do-to-fix-this-on-your-firewall">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-3-what-are-you-going-to-do-to-fix-this-on-your-firewall">Q: 3. What are you going to do to fix this on your firewall?&lt;/a>
&lt;/h3>
&lt;p>I would add these services to the internal zone:&lt;/p>
&lt;pre>&lt;code> firewall-cmd --zone=ZONE --add-service=SERVICE
&lt;/code>&lt;/pre>
&lt;p>Allows a service (e.g., SSH, HTTP) in the specified zone.&lt;/p>
&lt;hr>
&lt;h1 id="case-study-2-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#case-study-2-">Case Study #2 🤔&lt;/a>
&lt;/h1>
&lt;p>A manager heard you were the one that saved the new application by fixing the firewall. They get your manager to approach you with a request to review some documentation from a vendor that is pushing them hard to run a WAF in front of their web application. You are “the firewall” guy now, and they’re asking you to give them a review of the differences between the firewalls you set up (which they think should be enough to protect them) and what a WAF is doing.&lt;/p>
&lt;h3 id="q-1-what-do-you-know-about-the-differences-now">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-1-what-do-you-know-about-the-differences-now">Q: 1. What do you know about the differences now?&lt;/a>
&lt;/h3>
&lt;h4 id="traditional-firewalls-firewalldufw">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#traditional-firewalls-firewalldufw">Traditional Firewalls (firewalld/ufw):&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Operate at network and transport layers (OSI Layer 3 &amp;amp; 4).&lt;/li>
&lt;li>Control traffic based on IP addresses, ports, and protocols.&lt;/li>
&lt;li>Block or allow entire network connections.&lt;/li>
&lt;/ul>
&lt;h4 id="web-application-firewalls-wafs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#web-application-firewalls-wafs">Web Application Firewalls (WAFs):&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Operate at the application layer (OSI Layer 7).&lt;/li>
&lt;li>Inspect HTTP/HTTPS traffic, focusing on web application security.&lt;/li>
&lt;li>Protect against attacks like SQL injection, XSS, and other web vulnerabilities.&lt;/li>
&lt;/ul>
&lt;h3 id="q-2-what-are-you-going-to-do-to-figure-out-more">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-2-what-are-you-going-to-do-to-figure-out-more">Q: 2. What are you going to do to figure out more?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Dedicate time to researching effective WAF solutions.&lt;/li>
&lt;li>Identifying suitable solutions at 3 budget scales.&lt;/li>
&lt;li>Try to understand the additional labour behind management additional tools.&lt;/li>
&lt;/ul>
&lt;h3 id="q-3-prepare-a-report-for-them-comparing-it-to-the-firewall-you-did-in-the-first-discussion">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#q-3-prepare-a-report-for-them-comparing-it-to-the-firewall-you-did-in-the-first-discussion">Q: 3. Prepare a report for them comparing it to the firewall you did in the first discussion.&lt;/a>
&lt;/h3>
&lt;h1 id="report-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#report-">Report 🗒️&lt;/a>
&lt;/h1>
&lt;h3 id="evaluation-of-implementing-a-web-application-firewall-waf">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#evaluation-of-implementing-a-web-application-firewall-waf">Evaluation of Implementing a Web Application Firewall &lt;strong>WAF&lt;/strong>&lt;/a>
&lt;/h3>
&lt;h3 id="prepared-by-treasure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#prepared-by-treasure">&lt;strong>Prepared by:&lt;/strong> Treasure&lt;/a>
&lt;/h3>
&lt;h3 id="date-oct-20th-2024">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#date-oct-20th-2024">&lt;strong>Date:&lt;/strong> Oct 20th 2024&lt;/a>
&lt;/h3>
&lt;h3 id="subject-evaluation-of-waf-implementation-suitability-and-comparison-with-traditional-firewalls">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#subject-evaluation-of-waf-implementation-suitability-and-comparison-with-traditional-firewalls">&lt;strong>Subject:&lt;/strong> Evaluation of WAF Implementation Suitability and Comparison with Traditional Firewalls&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h2 id="1-introduction">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#1-introduction">&lt;strong>1. Introduction&lt;/strong>&lt;/a>
&lt;/h2>
&lt;p>This report has been prepared in response to a request to evaluate the suitability of implementing a Web Application Firewall (WAF) within our infrastructure. The aim of this report is to:&lt;/p>
&lt;ul>
&lt;li>Compare WAF technology with traditional firewall solutions currently implemented.&lt;/li>
&lt;li>Assess the benefits and limitations of each.&lt;/li>
&lt;li>Provide recommendations based on the findings.&lt;/li>
&lt;/ul>
&lt;h2 id="2-objectives">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#2-objectives">&lt;strong>2. Objectives&lt;/strong>&lt;/a>
&lt;/h2>
&lt;p>The key objectives of this evaluation are:&lt;/p>
&lt;ul>
&lt;li>To determine the suitability of WAF in enhancing our web application security.&lt;/li>
&lt;li>To identify potential risks and benefits associated with the deployment of WAF.&lt;/li>
&lt;li>To compare traditional firewall solutions with WAF in terms of functionality, security, and cost.&lt;/li>
&lt;li>To make recommendations based on the current and future needs of our IT infrastructure.&lt;/li>
&lt;/ul>
&lt;h2 id="3-comparison-of-technologies">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#3-comparison-of-technologies">&lt;strong>3. Comparison of Technologies&lt;/strong>&lt;/a>
&lt;/h2>
&lt;h3 id="31-traditional-firewalls-firewalldufw">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#31-traditional-firewalls-firewalldufw">&lt;strong>3.1 Traditional Firewalls (firewalld/ufw)&lt;/strong>&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Primary Function&lt;/strong>: Control and filter network traffic based on IP addresses, ports, and protocols.&lt;/li>
&lt;li>&lt;strong>Strengths&lt;/strong>:
&lt;ul>
&lt;li>Blocks unwanted connections at the network level.&lt;/li>
&lt;li>Suitable for general network protection.&lt;/li>
&lt;li>Easy to configure and manage.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Limitations&lt;/strong>:
&lt;ul>
&lt;li>Does not inspect web traffic at the application level.&lt;/li>
&lt;li>Cannot protect against specific web application attacks (e.g., SQL injection, XSS).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="32-web-application-firewalls-waf">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#32-web-application-firewalls-waf">&lt;strong>3.2 Web Application Firewalls (WAF)&lt;/strong>&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Primary Function&lt;/strong>: Protect web applications by filtering and monitoring HTTP/HTTPS traffic.&lt;/li>
&lt;li>&lt;strong>Strengths&lt;/strong>:
&lt;ul>
&lt;li>Protects against common web application vulnerabilities (e.g., SQL injection, XSS).&lt;/li>
&lt;li>Monitors web traffic to block malicious requests.&lt;/li>
&lt;li>Can provide real-time threat detection and logging.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Limitations&lt;/strong>:
&lt;ul>
&lt;li>May require more resources and specialized configuration.&lt;/li>
&lt;li>Focused solely on web applications, not general network traffic.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="33-key-differences">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#33-key-differences">&lt;strong>3.3 Key Differences&lt;/strong>&lt;/a>
&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Feature&lt;/th>
&lt;th>Traditional Firewall&lt;/th>
&lt;th>Web Application Firewall (WAF)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Layer&lt;/strong>&lt;/td>
&lt;td>Network (Layer 3/4)&lt;/td>
&lt;td>Application (Layer 7)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Traffic Type&lt;/strong>&lt;/td>
&lt;td>IP, ports, protocols&lt;/td>
&lt;td>HTTP/HTTPS, web requests&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Use Case&lt;/strong>&lt;/td>
&lt;td>General network security&lt;/td>
&lt;td>Web application protection&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Threat Coverage&lt;/strong>&lt;/td>
&lt;td>Blocks IP-based threats&lt;/td>
&lt;td>Mitigates web vulnerabilities (SQLi, XSS)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Cost&lt;/strong>&lt;/td>
&lt;td>Typically lower&lt;/td>
&lt;td>Generally higher due to specialized focus&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="4-key-considerations-for-waf-implementation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#4-key-considerations-for-waf-implementation">&lt;strong>4. Key Considerations for WAF Implementation&lt;/strong>&lt;/a>
&lt;/h2>
&lt;h3 id="41-security-benefits">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#41-security-benefits">&lt;strong>4.1 Security Benefits&lt;/strong>&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Enhanced protection against web-specific attacks.&lt;/li>
&lt;li>Ability to monitor and block suspicious activity in real-time.&lt;/li>
&lt;li>Added layer of security on top of traditional network firewalls.&lt;/li>
&lt;/ul>
&lt;h3 id="42-cost-analysis">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#42-cost-analysis">&lt;strong>4.2 Cost Analysis&lt;/strong>&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Initial Investment&lt;/strong>: The upfront cost of acquiring and configuring a WAF solution.&lt;/li>
&lt;li>&lt;strong>Ongoing Costs&lt;/strong>: Maintenance, updates, and potential personnel training.&lt;/li>
&lt;/ul>
&lt;h3 id="43-operational-impact">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#43-operational-impact">&lt;strong>4.3 Operational Impact&lt;/strong>&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>May require additional resources for setup, monitoring, and incident response.&lt;/li>
&lt;li>Potential need for collaboration between the security and development teams to ensure smooth integration.&lt;/li>
&lt;/ul>
&lt;h2 id="5-risk-assessment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#5-risk-assessment">&lt;strong>5. Risk Assessment&lt;/strong>&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Without WAF&lt;/strong>: Increased vulnerability to web application-specific threats, such as cross-site scripting (XSS) and SQL injection, especially for critical applications.&lt;/li>
&lt;li>&lt;strong>With WAF&lt;/strong>: Increased security for web applications but requires ongoing monitoring and adjustment to ensure performance and efficacy.&lt;/li>
&lt;/ul>
&lt;h2 id="6-recommendations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#6-recommendations">&lt;strong>6. Recommendations&lt;/strong>&lt;/a>
&lt;/h2>
&lt;p>Based on the evaluation, I recommend the following:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Implement a WAF&lt;/strong>: Due to the increasing reliance on web applications and the rise in web-based attacks, implementing a WAF would provide an essential layer of security.&lt;/li>
&lt;li>&lt;strong>Maintain Traditional Firewalls&lt;/strong>: Existing firewalls should continue to be used for network-level protection alongside the WAF.&lt;/li>
&lt;li>&lt;strong>Pilot Implementation&lt;/strong>: Begin with a limited deployment of WAF for high-risk applications to evaluate performance and cost before a full-scale rollout.&lt;/li>
&lt;li>&lt;strong>Staff Training&lt;/strong>: Ensure the security and IT teams are trained in WAF management to maximize its effectiveness.&lt;/li>
&lt;/ol>
&lt;h2 id="7-conclusion">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#7-conclusion">&lt;strong>7. Conclusion&lt;/strong>&lt;/a>
&lt;/h2>
&lt;p>The implementation of a Web Application Firewall is a strategic move to protect our web applications from evolving security threats. While traditional firewalls remain crucial for network security, they cannot defend against the types of attacks WAFs are designed to mitigate. By implementing both WAF and traditional firewall solutions, we can ensure comprehensive security coverage across both network and application layers.&lt;/p>
&lt;h2 id="8-next-steps">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#8-next-steps">&lt;strong>8. Next Steps&lt;/strong>&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Further evaluation of potential WAF solutions based on budget, compatibility, and scalability.&lt;/li>
&lt;li>Engage with the security team for a detailed implementation plan.&lt;/li>
&lt;li>Prepare a pilot program for critical applications and monitor its performance.&lt;/li>
&lt;/ul>
&lt;h3 id="approved-by-bob-saggit">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#approved-by-bob-saggit">&lt;strong>Approved by:&lt;/strong> Bob Saggit&lt;/a>
&lt;/h3>
&lt;h3 id="date-october-25th-2024">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#date-october-25th-2024">&lt;strong>Date:&lt;/strong> October 25th 2024&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h3 id="definitions">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#definitions">Definitions&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Firewall&lt;/strong>: A security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules.&lt;/li>
&lt;li>&lt;strong>Zone&lt;/strong>: A defined area within a network that contains systems with similar security requirements, separated by a firewall.&lt;/li>
&lt;li>&lt;strong>Service&lt;/strong>: A specific type of network functionality, like HTTP or DNS, that can be allowed or blocked by a firewall.&lt;/li>
&lt;li>&lt;strong>DMZ&lt;/strong>: A &amp;ldquo;Demilitarized Zone&amp;rdquo; is a network segment that serves as a buffer between a secure internal network and untrusted external networks.&lt;/li>
&lt;li>&lt;strong>Proxy&lt;/strong>: A server that acts as an intermediary for requests between clients and servers, often used for filtering, security, or caching.&lt;/li>
&lt;li>&lt;strong>Stateful packet filtering&lt;/strong>: A firewall feature that tracks the state of active connections and makes filtering decisions based on the connection&amp;rsquo;s state.&lt;/li>
&lt;li>&lt;strong>Stateless packet filtering&lt;/strong>: A type of firewall filtering that analyzes each packet independently without considering the state of the connection.&lt;/li>
&lt;li>&lt;strong>WAF&lt;/strong>: A Web Application Firewall that protects web applications by filtering and monitoring HTTP/HTTPS traffic for threats like SQL injection and XSS.&lt;/li>
&lt;li>&lt;strong>NGFW&lt;/strong>: A Next-Generation Firewall that combines traditional firewall functions with additional features like application awareness, integrated intrusion prevention, and advanced threat detection.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu6/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 5 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu5/</link><pubDate>Fri, 18 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu5/</guid><description>&lt;h1 id="managing-users--groups">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#managing-users--groups">Managing Users &amp;amp; Groups&lt;/a>
&lt;/h1>
&lt;p>The overarching theme of this Unit is in the title, we are looking at Managing Users &amp;amp; Groups. Managing users and groups in Linux within an enterprise involves creating, modifying, and organizing user accounts and permissions to enforce security and control over resources.&lt;/p>
&lt;p>Organizing permissions to enforce security is more important than it has ever been, as we live in a hyper connected world with many bad actors and large amounts of sensitive data.&lt;/p>
&lt;p>Linux is fundamentally well suited for Managing Users &amp;amp; Groups because permissions permeate every aspect of a Linux environment. Everything is a file and every file has associated permissions, Therefore we have granular control over the comings and goings of users as administrators.&lt;/p>
&lt;h2 id="lab-work-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#lab-work-">Lab Work 🧪🥼&lt;/a>
&lt;/h2>
&lt;h3 id="primary-commands--tools">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#primary-commands--tools">Primary Commands / Tools&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>alias&lt;/strong>: Creates a shortcut or alias for a command.&lt;/li>
&lt;li>&lt;strong>unalias&lt;/strong>: Removes an alias that was previously defined.&lt;/li>
&lt;li>&lt;strong>awk&lt;/strong>: A powerful text-processing tool used for pattern scanning and processing.&lt;/li>
&lt;li>&lt;strong>useradd&lt;/strong>: Adds a new user to the system.&lt;/li>
&lt;li>&lt;strong>vi .bashrc&lt;/strong>: Opens the &lt;code>.bashrc&lt;/code> file in the vi editor to customize shell settings.&lt;/li>
&lt;li>&lt;strong>UID_MIN 1000&lt;/strong>: The minimum user ID value for normal users (as defined in &lt;code>/etc/login.defs&lt;/code>).&lt;/li>
&lt;li>&lt;strong>UID_MAX 60000&lt;/strong>: The maximum user ID value for normal users (as defined in &lt;code>/etc/login.defs&lt;/code>).&lt;/li>
&lt;li>&lt;strong>groupadd –g 60001 project&lt;/strong>: Creates a new group named &amp;ldquo;project&amp;rdquo; with a GID of 60001.&lt;/li>
&lt;li>&lt;strong>id user4&lt;/strong>: Displays the user ID (UID), group ID (GID), and group memberships of user &amp;ldquo;user4.&amp;rdquo;&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h4 id="etc-directories">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#etc-directories">etc directories&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>
&lt;p>Looking at etc directories relating to Users, Groups and Associated Security&lt;/p>
&lt;pre>&lt;code> /etc/passwd
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>contains essential information about users, including their username, user ID (UID), group ID (GID), home directory, and default shell, with each entry separated by a colon.&lt;/p>
&lt;pre>&lt;code> /etc/group
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>stores group information, listing each group’s name, group ID (GID), and its members, with each entry separated by a colon, allowing users to belong to one or more groups for access control purposes.&lt;/p>
&lt;pre>&lt;code> /etc/shadow
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>contains encrypted password information and related security details for user accounts, such as password aging and expiration&lt;/p>
&lt;pre>&lt;code> /etc/gshadow
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>stores encrypted passwords for group accounts, as well as information about group administrators and members, providing enhanced security for group access by restricting who can modify or access specific group data.&lt;/p>
&lt;pre>&lt;code> /etc/login.defs
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>configuration settings for user account creation and login parameters, such as password aging policies, UID and GID ranges, and the default paths for user home directories, helping to control system-wide authentication behavior.&lt;/p>
&lt;pre>&lt;code> /etc/skel/
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>provides template files that are automatically copied to a new user’s home directory when the user is created, ensuring they have default configuration settings.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="other-interesting-directories">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#other-interesting-directories">Other interesting directories&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Brief Description&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Associated permissions&lt;/p>
&lt;pre>&lt;code> /etc/fstab
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>This file contains information about disk partitions and other block storage devices and how they should be automatically mounted during the boot process.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: Usually -rw-r&amp;ndash;r&amp;ndash; (readable by all users, writable only by the root).&lt;/p>
&lt;pre>&lt;code> /etc/hostname
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>This file stores the system’s hostname, which is a unique identifier for the machine in a network.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: Usually -rw-r&amp;ndash;r&amp;ndash; (readable by all users, writable only by the root).&lt;/p>
&lt;pre>&lt;code> /proc
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>This is a virtual filesystem that provides detailed information about processes and system resources. It does not contain actual files but rather system and process information in real-time.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: dr-xr-xr-x (readable and executable by all users, writable only by root).&lt;/p>
&lt;pre>&lt;code> /boot
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Contains the kernel, initial ramdisk, and bootloader files needed to start the system.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: drwxr-xr-x (readable and executable by all users, writable only by root).&lt;/p>
&lt;pre>&lt;code> /root
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>This is the home directory for the root user (the system administrator).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: drwx&amp;mdash;&amp;mdash; (only root has read, write, and execute permissions).&lt;/p>
&lt;pre>&lt;code> /usr/bin
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>Contains binary executables for user programs.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Permissions: drwxr-xr-x (readable and executable by all users, writable by root).&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="mapping-unknown-infrastructure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#mapping-unknown-infrastructure-">Mapping unknown infrastructure 🗺️🤔&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Objectives:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Map the Internal ProLUG Network (192.168.200.0/24):&lt;/li>
&lt;li>Map the network from one of the rocky nodes.&lt;/li>
&lt;li>Using a template that you build or find from the internet&lt;/li>
&lt;li>Provide a 1 page summary of what you find in the network.&lt;/li>
&lt;/ul>
&lt;h3 id="approach-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#approach-">Approach 🤔&lt;/a>
&lt;/h3>
&lt;h4 id="a-briefing-on-the-infra-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#a-briefing-on-the-infra-">A briefing on the infra. 🔍🖥️&lt;/a>
&lt;/h4>
&lt;p>Het&amp;rsquo; server is unique to me. He uses an injest system that makes a jump to the actual server for security purposes. Within the main server we have a warewulf managed cluster running a series of Rocky Linux VM&amp;rsquo;s. ⛰&lt;/p>
&lt;p>Since we will be doing this from one of the Rocky Nodes within the system, the jump server will not be an issue I recon. 🤔&lt;/p>
&lt;h4 id="mapping-strategy-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#mapping-strategy-">Mapping Strategy 📍🗺️&lt;/a>
&lt;/h4>
&lt;p>So I shouldn&amp;rsquo;t just pop into the server and go willy nilly with scanning commands. This sever is managed by someone who understands security. So it is best to do some &lt;strong>Dead Reckoning&lt;/strong> beforehand.&lt;/p>
&lt;h4 id="the-basic-commands-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#the-basic-commands-">The Basic Commands ⌨️&lt;/a>
&lt;/h4>
&lt;p>Mapping the remote servers open ports with nmap.
nmap stands for Network Mapper. A quick perusal of the man page states it is an exploration tool and security / port scanner. It was designed to rapidly scan large networks. Nmap uses raw IP packets in novel ways to determine what hosts
are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.&lt;/p>
&lt;p>In order to Map the network I am going to use the ip address for the argument/target of the nmap command.&lt;/p>
&lt;pre>&lt;code>nmap &amp;lt;server-ip&amp;gt;
&lt;/code>&lt;/pre>
&lt;p>Checking mounted filesystem&amp;rsquo; with df. stands for &lt;strong>Display Free&lt;/strong> disk space. It is a utility that displays statistics about the amount of free disk space on the specified mounted file system or on the file system of which file is a past.&lt;/p>
&lt;p>I will be using the -h flag for human readable format, which ads unit suffixes eg. Gibibyte (GiB) to the ends of values. There is more to it, but I am mentioning the bread and butter of the flag.&lt;/p>
&lt;pre>&lt;code>df -h
&lt;/code>&lt;/pre>
&lt;h3 id="digging-deeper-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#digging-deeper-">Digging Deeper ⛏️&lt;/a>
&lt;/h3>
&lt;h4 id="getting-to-know-nmap-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#getting-to-know-nmap-">Getting to know nmap 🫶&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>nmap&lt;/strong> is actually a big command, by big I mean the number of options and capabilities are vast. It is quite popular with pen testers and is packaged with Kali Linux &amp;ndash; a security analysis and exploitation focused distribution of Linux, so best believe it is something important. This essentially means I should take some time to get to know it more.&lt;/p>
&lt;h4 id="stealth-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#stealth-">Stealth 🥷&lt;/a>
&lt;/h4>
&lt;p>Beware that &lt;strong>nmap&lt;/strong> can and will trigger detection software like an active firewall, because &lt;strong>nmap&lt;/strong> is conducting &lt;strong>Funny Bizniz&lt;/strong> by way of packet &lt;strong>trickery&lt;/strong> inside a network, both are technical terms. Luckily there is a &lt;strong>stealth&lt;/strong> option ( -s ) that enables the mapping to take place un-detected &amp;ndash;for the most part.&lt;/p>
&lt;p>Contrary to what I assumed, the lower case &lt;strong>s&lt;/strong> does not even stand for stealth, though it still helps as a mnemonic. No, it actually stands for SYN and
SYN stands for Synchronize. It is part of the TCP three-way handshake, which is a process used to establish a reliable connection between two devices on a network and has nothing to do with guys meeting at a bar.&lt;/p>
&lt;p>I thought we were trying to be stealthy, not synchronized 🤔
Well is actually a form of &lt;strong>Funny Bizniz&lt;/strong> wherein SYN is sent and never acknowledged, thustly not completing the handshake process and therefore hiding activity &lt;strong>somehow&lt;/strong>&lt;/p>
&lt;p>but &lt;strong>how?&lt;/strong> Well&amp;hellip; it reduces the chance of being logged by the target system’s monitoring tools, such as firewalls or intrusion detection systems. Now we both know.&lt;/p>
&lt;p>Keep in mind this is only one command option, just imagine how deep the rabbit hole goes.&lt;/p>
&lt;h4 id="important-mapping-command-list">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#important-mapping-command-list">Important Mapping Command List&lt;/a>
&lt;/h4>
&lt;p>Ninjas mark stealthier techniques.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;strong>#&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Command&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>&lt;code>nmap -sS &amp;lt;target&amp;gt;&lt;/code> 🥷&lt;/td>
&lt;td>TCP SYN scan (stealth mode)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>&lt;code>nmap -sT &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>TCP connect scan (full connection)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>&lt;code>nmap -sA &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>ACK scan to detect firewalls&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>&lt;code>nmap -sU &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>UDP scan&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>&lt;code>nmap -sP &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Ping scan to detect live hosts&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>&lt;code>nmap -sV &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Detect service versions on open ports&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>7&lt;/td>
&lt;td>&lt;code>nmap -O &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>OS detection&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>8&lt;/td>
&lt;td>&lt;code>nmap -A &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Aggressive scan (OS, version, scripts)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>9&lt;/td>
&lt;td>&lt;code>nmap -Pn &amp;lt;target&amp;gt;&lt;/code> 🥷&lt;/td>
&lt;td>Disable ping (stealthy, avoid detection)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>10&lt;/td>
&lt;td>&lt;code>nmap -p- &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Scan all 65,535 TCP ports&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>11&lt;/td>
&lt;td>&lt;code>nmap --top-ports 100 &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Scan the top 100 most common ports&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>12&lt;/td>
&lt;td>&lt;code>nmap --script &amp;lt;script&amp;gt; &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Use Nmap scripts for detailed scanning&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>13&lt;/td>
&lt;td>&lt;code>nmap -sC &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Run default NSE scripts&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>14&lt;/td>
&lt;td>&lt;code>nmap -sW &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>TCP window scan&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>15&lt;/td>
&lt;td>&lt;code>nmap -T4 &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Faster scan using timing template T4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>16&lt;/td>
&lt;td>&lt;code>nmap -v &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Enable verbose output&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>17&lt;/td>
&lt;td>&lt;code>nmap -oN scan.txt &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Save output in normal format&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>18&lt;/td>
&lt;td>&lt;code>nmap -oX scan.xml &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Save output in XML format&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>19&lt;/td>
&lt;td>&lt;code>nmap -6 &amp;lt;target&amp;gt;&lt;/code>&lt;/td>
&lt;td>Scan IPv6 targets&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>20&lt;/td>
&lt;td>&lt;code>nmap -D RND:10 &amp;lt;target&amp;gt;&lt;/code> 🥷&lt;/td>
&lt;td>Decoy scan to mask source of scan&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="the-actual-mapping">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#the-actual-mapping">The Actual Mapping&lt;/a>
&lt;/h2>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU5/cnm.png" alt="Network Map">&lt;/p>
&lt;h3 id="-accessing-the-secure-jump-point">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-accessing-the-secure-jump-point">🚀 Accessing the Secure Jump Point&lt;/a>
&lt;/h3>
&lt;p>The network is safely tucked behind a Dynamic Domain Name System (DDNS) running on an Asus Router. This setup allows access from a WAN, in this case, &lt;em>The Internet&lt;/em> (if you’ve heard of it 🌐). It securely gate-keeps the network via login credentials, because let’s be honest, the Internet can be a scary place with bots&amp;hellip; and sometimes people 👀.&lt;/p>
&lt;p>So, what exactly does DDNS do? Well, I’m glad you asked! Most home internet connections don’t offer a static IP address, which makes hosting things tricky because the IP will randomly change. The IP is dynamic for a few reasons, including cost savings and the limited availability of IPv4 addresses. Anyway, I’m getting off track 🛤️. A DDNS monitors this dynamic IP and links it to a stable address that stays fixed.&lt;/p>
&lt;p>&lt;strong>TL;DR&lt;/strong>: DDNS bonds a dynamic IP with a fixed address, offering the added bonus of hiding the internal IP from bad actors, or as I like to call them, &lt;em>the baddies&lt;/em> in London 🕵️‍♂️. So, this network has a DDNS gateway in place for that extra layer of security 🔒.&lt;/p>
&lt;h3 id="-jumping-into-a-node">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-jumping-into-a-node">🎯 Jumping into a Node&lt;/a>
&lt;/h3>
&lt;p>Once a credentialed fellow enters their login while hanging at the gateway, a list of servers appears, like a digital menu 🍽️. From this list, one can choose where to jump to. In my case, I leapt to &lt;em>Rocky12&lt;/em>, a node within a managed cluster. I knew a little about this network thanks to earlier sessions, but most of this can also be discovered by doing some network scanning 🕵️.&lt;/p>
&lt;h3 id="-doing-a-broad-inventory-scan">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-doing-a-broad-inventory-scan">🔍 Doing a Broad Inventory Scan&lt;/a>
&lt;/h3>
&lt;p>This is where the magic of &lt;code>nmap&lt;/code> comes into play! I used two stealthy commands: &lt;strong>nmap -sS&lt;/strong> and &lt;strong>nmap -sT&lt;/strong>. The &lt;code>sT&lt;/code> option scanned a wide range of ports and connections, giving me a detailed list that I piped into &lt;code>less&lt;/code> for easier viewing 📜.&lt;/p>
&lt;h3 id="-doing-targeted-scans">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-doing-targeted-scans">🎯 Doing Targeted Scans&lt;/a>
&lt;/h3>
&lt;p>I grepped all the IP addresses and ran an &lt;strong>-sS SYN Scan&lt;/strong> to gather more details on each node. These scans revealed loads of information about open ports and, in some cases, the hostnames of devices 🎯.&lt;/p>
&lt;h3 id="-identifying-devices">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-identifying-devices">🧩 Identifying Devices&lt;/a>
&lt;/h3>
&lt;p>I quickly identified the &lt;em>warewulf orchestration device&lt;/em> and all of the &lt;em>Rocky nodes&lt;/em>. However, a few mysterious devices needed some detective work 🔎. I noticed &lt;strong>glrpc&lt;/strong> listed as a service while scanning six addresses—three on one IP range and three on another. A quick Google search revealed that &lt;strong>glrpc&lt;/strong> relates to &lt;em>GlusterFS&lt;/em>, a filesystem specific to Red Hat systems. After watching a video explainer on GlusterFS, I figured out that these two IP ranges were likely a RAID or high availability configuration 💾.&lt;/p>
&lt;h3 id="-mapping-with-excalidraw">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-mapping-with-excalidraw">🗺️ Mapping with Excalidraw&lt;/a>
&lt;/h3>
&lt;p>I initially created a highly technical Engineer’s map filled with data and presented it to Het for feedback. He advised me to think about how management would interpret it 🤔. So, back to the drawing board! I focused on improving the visual presentation and labeling, keeping in mind that management doesn’t care about the nitty-gritty; they just need a clear, high-level understanding during briefings 📊.&lt;/p>
&lt;h3 id="-wrapping-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#-wrapping-up">🎉 Wrapping Up&lt;/a>
&lt;/h3>
&lt;p>This concludes my exercise in mapping an unknown network! I learned a lot from this experience and am quite proud of the outcome 💪. It will undoubtedly come in handy when I find myself in future scenarios with many unknowns.&lt;/p>
&lt;hr>
&lt;h2 id="mitre-attck---1-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#mitre-attck---1-">MITRE ATT&amp;amp;CK - &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> 🪚&lt;/a>
&lt;/h2>
&lt;p>is a globally-accessible knowledge base of adversary tactics and techniques based on real-world observations.&lt;/p>
&lt;hr>
&lt;h3 id="somewhat-unfamiliar-terminology-for-me">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#somewhat-unfamiliar-terminology-for-me">Somewhat unfamiliar terminology for me&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Lateral Movement&lt;/li>
&lt;/ul>
&lt;p>Lateral movement in the context of cyber exploitation refers to an attacker’s strategy of moving across a network to gain access to additional systems or sensitive data after initially infiltrating a single point. This involves leveraging compromised credentials, escalating privileges, or exploiting vulnerabilities to navigate between hosts and systems. The objective is often to broaden access within the environment while avoiding detection, eventually targeting critical infrastructure or data.&lt;/p>
&lt;ul>
&lt;li>Exfiltration 🧳🚀&lt;/li>
&lt;/ul>
&lt;p>refers to the unauthorized transfer of data from a target system or network to an external location controlled by an attacker. This can involve methods such as encrypted tunnels, covert channels, or compromised accounts to avoid detection. Exfiltration is typically the final step in a cyberattack, allowing attackers to steal sensitive data, intellectual property, or credentials for further malicious activities.&lt;/p>
&lt;h3 id="security-is-everybodys-issue">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#security-is-everybodys-issue">Security is everybody&amp;rsquo;s issue&lt;/a>
&lt;/h3>
&lt;p>It is important to understand the data on your system regardless of specific responsibility in order to asses risk.&lt;/p>
&lt;h3 id="impact-of-exfiltration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#impact-of-exfiltration">Impact of Exfiltration&lt;/a>
&lt;/h3>
&lt;p>The impacts of data exfiltration can be massive. Given the level of severity an exfiltration incident can entirely destroy an organization or cause financial losses, reputational damage, labour force diversion, data loss and jeopardizing future security.&lt;/p>
&lt;hr>
&lt;h2 id="the-linux-user-environment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#the-linux-user-environment">The Linux User Environment&lt;/a>
&lt;/h2>
&lt;p>The Linux user environment is a customizable space that includes settings like environment variables, shell configurations, and startup scripts, typically defined in files such as .bashrc or .profile. These configurations allow users to tailor command line behavior, automate tasks, and create a personalized and efficient working environment.&lt;/p>
&lt;h3 id="customizations-to-the-user-environment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#customizations-to-the-user-environment">Customizations to the User Environment&lt;/a>
&lt;/h3>
&lt;p>Customizations for the user environment in Linux might include setting up aliases for frequently used commands, configuring environment variables, and adding functions to streamline workflows. These changes can make repetitive tasks faster, improve the command line interface&amp;rsquo;s convenience, and adapt the environment to personal preferences.&lt;/p>
&lt;h4 id="problems-may-arise">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#problems-may-arise">Problems may arise&lt;/a>
&lt;/h4>
&lt;p>Problems around helping users with their dot files often stem from the diverse and sometimes incompatible changes users make to suit their needs. This can lead to issues like conflicting configurations, inconsistent behavior across systems, or difficult debugging when unexpected behaviors arise from custom scripts.&lt;/p>
&lt;hr>
&lt;h2 id="definitionsterminology">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#definitionsterminology">Definitions/Terminology&lt;/a>
&lt;/h2>
&lt;h4 id="footprinting-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#footprinting-">Footprinting 👣&lt;/a>
&lt;/h4>
&lt;p>Footprinting is an essential phase in ethical hacking and system security. It involves gathering information about a computer system, network, or organization to understand its structure and identify potential vulnerabilities. Footprinting is often the first step of a cyberattack or penetration test, allowing attackers or security professionals to map out an environment before deciding how to approach the next steps.&lt;/p>
&lt;h4 id="scanning-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#scanning-">Scanning 🔍&lt;/a>
&lt;/h4>
&lt;p>Scanning is a process of actively probing systems or networks to identify open ports, services, and vulnerabilities. It&amp;rsquo;s used by attackers to gather deeper insights for potential exploitation and by security professionals to assess weaknesses. Common tools include Nmap and Nessus, while defenses include firewalls and IDS/IPS systems.&lt;/p>
&lt;h4 id="enumeration-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#enumeration-">Enumeration 💯&lt;/a>
&lt;/h4>
&lt;p>Enumeration is the process of extracting more detailed information about a target, such as usernames, network shares, and system services, after identifying open ports and active systems. It typically involves active engagement with the target to gain in-depth knowledge that can be used for exploitation.&lt;/p>
&lt;h4 id="system-hacking-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#system-hacking-">System Hacking 🪓&lt;/a>
&lt;/h4>
&lt;p>System hacking is the process of gaining unauthorized access to individual systems or networks by exploiting vulnerabilities. It involves activities such as password cracking, privilege escalation, installing backdoors, and covering tracks. Ethical hackers use these techniques to assess system security and recommend protective measures.&lt;/p>
&lt;h4 id="escalation-of-privilege-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#escalation-of-privilege-">Escalation of Privilege 🥉🥈🥇&lt;/a>
&lt;/h4>
&lt;p>Privilege escalation is the process of gaining higher-level permissions or privileges than initially granted, allowing an attacker to execute commands with elevated authority. This can be achieved through exploiting vulnerabilities or misconfigurations, leading to unauthorized access to restricted resources or system control.&lt;/p>
&lt;h4 id="rule-of-least-privilege-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#rule-of-least-privilege-">Rule of least privilege 🔐&lt;/a>
&lt;/h4>
&lt;p>The Rule of Least Privilege (LoP) is a security principle that states users, applications, and systems should only be granted the minimum level of access or permissions necessary to perform their tasks. This helps reduce the attack surface, limit potential damage from breaches, and mitigate insider threats.&lt;/p>
&lt;h4 id="covering-tracks-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#covering-tracks-">Covering Tracks 🧹👣&lt;/a>
&lt;/h4>
&lt;p>Covering tracks is the process attackers use to hide their unauthorized activities and avoid detection. This involves techniques such as deleting or modifying system logs, using rootkits, and clearing command histories to prevent system administrators or security teams from discovering their presence or actions.&lt;/p>
&lt;h4 id="planting-backdoors-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#planting-backdoors-">Planting Backdoors 🪴🚪&lt;/a>
&lt;/h4>
&lt;p>Planting backdoors involves installing hidden access points in a system, allowing attackers to bypass regular authentication and gain unauthorized access at a later time. Backdoors can be inserted through malicious code, vulnerabilities, or modifications to existing software, making them useful for maintaining persistent control over compromised systems.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu5/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>MITRE | ATT&amp;amp;CK &lt;a href="https://attack.mitre.org/">Site&lt;/a> Knowledge Base.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>GO CLI Utility</title><link>https://trevorsmale.github.io/techblog/post/goclisysutil/</link><pubDate>Tue, 15 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/goclisysutil/</guid><description>&lt;h1 id="making-a-utility-for-linux-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#making-a-utility-for-linux-">Making a Utility for Linux 🚀&lt;/a>
&lt;/h1>
&lt;p>Recently, I was chatting with fellow enthusiasts in the ProLUG group about creating system utilities with Go.&lt;/p>
&lt;p>Between learning about it on my own time and getting input from others, I realized there are so many compelling reasons for using Go as a utility language. 🛠️&lt;/p>
&lt;p>Currently, the idea isn&amp;rsquo;t as prevalent as Python or Bash, but it’s gaining traction. This makes sense since Go was designed with modern, interconnected systems in mind.&lt;/p>
&lt;h2 id="what-is-a-utility-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#what-is-a-utility-">What is a Utility? 🤔&lt;/a>
&lt;/h2>
&lt;p>A system utility streamlines repetitive tasks by offering custom commands tailored to your workflow, boosting efficiency for system administrators and engineers. Work smarter, not harder. 💡&lt;/p>
&lt;h2 id="cli-tool-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#cli-tool-">CLI Tool 🖥️&lt;/a>
&lt;/h2>
&lt;p>Go offers a package called Cobra CLI &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>, which enables the creation of command-line interfaces that take input from the terminal and execute predetermined logic. I’m putting this simply in case you’re unfamiliar with how programs work 😆.&lt;/p>
&lt;p>The CLI is the simplest form of a computer program and is perfect for Linux system folks.&lt;/p>
&lt;h2 id="core-idea-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#core-idea-">Core Idea 🎯&lt;/a>
&lt;/h2>
&lt;p>The core idea of this article is to explain how a Go program can act as a personalized utility that lives on your system or can be deployed across many. Go compiles code into a binary—native computer language. Once built, the binary runs reliably without failure, assuming the program logic is solid. This makes Go ideal for utilities that are called repeatedly to perform simple tasks.&lt;/p>
&lt;h2 id="automate-everything-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#automate-everything-">Automate Everything 🤖&lt;/a>
&lt;/h2>
&lt;p>Managing systems involves a lot of repetitive tasks, and the goal of any sysadmin or engineer is to automate them. Tools like Ansible, Python, and Bash are already well-known for automation. However, there are specific reasons to use Go, which I’ll explore further in a future article titled &lt;em>&amp;ldquo;Why Go?&amp;rdquo;&lt;/em> where I’ll break down why it belongs in your quiver of tools 🏹.&lt;/p>
&lt;hr>
&lt;h3 id="cli-programming-portion-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#cli-programming-portion-">CLI Programming Portion ⚙️&lt;/a>
&lt;/h3>
&lt;h4 id="setup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#setup">Setup&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Install&lt;/strong> Go and Cobra CLI (if not already installed).&lt;/li>
&lt;li>&lt;strong>Initialize&lt;/strong> a new Go project with Cobra CLI.&lt;/li>
&lt;/ol>
&lt;h4 id="cli-logic">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#cli-logic">CLI Logic&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Add commands and flags&lt;/strong> to the Cobra application.&lt;/li>
&lt;li>&lt;strong>Implement utility functions&lt;/strong>, such as disk usage checks or file listings.&lt;/li>
&lt;/ol>
&lt;h3 id="compilation-and-installation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#compilation-and-installation-">Compilation and Installation 🏗️&lt;/a>
&lt;/h3>
&lt;h4 id="compile">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#compile">Compile&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Build&lt;/strong> the Go project into a single x86 Linux binary.&lt;/li>
&lt;li>&lt;strong>Test&lt;/strong> the binary locally to confirm functionality.&lt;/li>
&lt;/ol>
&lt;h4 id="install">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#install">Install&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Move&lt;/strong> the binary to &lt;code>/usr/local/bin&lt;/code> for global access.&lt;/li>
&lt;li>&lt;strong>Set permissions&lt;/strong> on the binary to allow execution.&lt;/li>
&lt;/ol>
&lt;h4 id="add-to-path">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#add-to-path">Add to PATH&lt;/a>
&lt;/h4>
&lt;ol>
&lt;li>&lt;strong>Check&lt;/strong> if &lt;code>/usr/local/bin&lt;/code> is in your PATH.&lt;/li>
&lt;li>If not, &lt;strong>add it&lt;/strong> to your &lt;code>.bashrc&lt;/code> or &lt;code>.bash_profile&lt;/code>.&lt;/li>
&lt;/ol>
&lt;h3 id="testing-portion-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#testing-portion-">Testing Portion 🧪&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>Run&lt;/strong> the utility from any location to confirm it works.&lt;/li>
&lt;li>Optionally, &lt;strong>add help documentation&lt;/strong> or more commands to the CLI.&lt;/li>
&lt;/ol>
&lt;h3 id="packaging-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#packaging-">Packaging 📦&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>Provide installation instructions&lt;/strong> if you plan to share it.&lt;/li>
&lt;li>&lt;strong>Upload&lt;/strong> the binary or source code to GitHub for distribution.&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="learning-resources">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#learning-resources">Learning Resources&lt;/a>
&lt;/h2>
&lt;p>Ok this was just a simple outline you say. Yes, I am trying to convey information simply for sanities sake, this is how I process things anyway.&lt;/p>
&lt;p>In order to make your own utility you will have to go off on your own learning adventure. Below I am giving you some resources for getting started.&lt;/p>
&lt;h3 id="getting-up-and-running-with-go">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#getting-up-and-running-with-go">Getting up and running with GO&lt;/a>
&lt;/h3>
&lt;h4 id="brief-intro-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#brief-intro-2">Brief Intro &lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/a>
&lt;/h4>
&lt;h4 id="for-the-impatient-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#for-the-impatient-3">For the impatient &lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/a>
&lt;/h4>
&lt;p>There are many ways to get this done. For the clever and impatient, I suggest finding a pre-made CLI application that you can deconstruct. &lt;sup id="fnref1:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/p>
&lt;h4 id="for-the-patient-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#for-the-patient-4">For the Patient &lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/a>
&lt;/h4>
&lt;p>For those who like to build a foundation of understanding, I suggest watching a lecture followed by a tutorial and finally doing the project. &lt;sup id="fnref1:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/p>
&lt;h2 id="conclusion">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#conclusion">Conclusion&lt;/a>
&lt;/h2>
&lt;p>I try to keep things simple and succinct, so this is where I ride off into the sunset. Good luck and happy learning.&lt;/p>
&lt;hr>
&lt;h2 id="footnotes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/goclisysutil/#footnotes-">Footnotes ⛓️&lt;/a>
&lt;/h2>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Cobra CLI Source Code &lt;a href="https://github.com/spf13/cobra">GitHub Repository&lt;/a> User: spf13, Current.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>GO in 100 Seconds &lt;a href="https://www.youtube.com/watch?v=446E-r0rXHI">Youtube Video&lt;/a> Channel: Fireship, 2021.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Cobra CLI Samples &lt;a href="https://github.com/Adron/cobra-cli-samples">GitHub Repository&lt;/a> User: Adron, 2022.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>Golang Tutorial Series Playlist &lt;a href="https://www.youtube.com/watch?v=etSN4X_fCnM&amp;amp;list=PL4cUxeGkcC9gC88BEo9czgyS72A3doDeM">Youtube Channel&lt;/a> Channel: Net Ninja, 2021.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG Admin Course Capstone Submission Requirements 🐧</title><link>https://trevorsmale.github.io/techblog/post/paccp0/</link><pubDate>Sun, 06 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/paccp0/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>To complete the Professional Linux User Group (ProLUG) Professional Administrator Course (PAC), we are required to submit a final Capstone Project.&lt;/p>
&lt;p>This article is a bit out of order, as I proactively chose a project topic before it was formally introduced. The purpose of this article is to document the project requirements as set out by our instructor.&lt;/p>
&lt;p>Of course, I like to make slight modifications to ensure everything is neatly formatted and grouped—with plenty of emoji usage for extra flair! 😉&lt;/p>
&lt;h2 id="step-1select-a-topic-and-do-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-1select-a-topic-and-do-">Step 1.Select a topic and do 📌&lt;/a>
&lt;/h2>
&lt;h4 id="a-write-a-brief-intro-to-the-project">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-write-a-brief-intro-to-the-project">A) Write a brief intro to the project&lt;/a>
&lt;/h4>
&lt;h4 id="b-outline-technologies">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-outline-technologies">B) Outline Technologies&lt;/a>
&lt;/h4>
&lt;h4 id="c-propose-idea-to-instructor">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-propose-idea-to-instructor">C) Propose idea to Instructor&lt;/a>
&lt;/h4>
&lt;h2 id="step-2research-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-2research-">Step 2.Research 🤓&lt;/a>
&lt;/h2>
&lt;h4 id="a-confirm-this-is-doable">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-confirm-this-is-doable">A) Confirm this is doable&lt;/a>
&lt;/h4>
&lt;h4 id="b-estimate-time">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-estimate-time">B) Estimate time&lt;/a>
&lt;/h4>
&lt;h4 id="c-find-snippets-manuals">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-find-snippets-manuals">C) Find snippets, manuals&lt;/a>
&lt;/h4>
&lt;h2 id="step-3plan-project-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-3plan-project-">Step 3.Plan Project 📍&lt;/a>
&lt;/h2>
&lt;h4 id="a-find-comparables">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-find-comparables">A) Find Comparables&lt;/a>
&lt;/h4>
&lt;h4 id="b-document-procedure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-document-procedure">B) Document Procedure&lt;/a>
&lt;/h4>
&lt;h4 id="c-diagram-project">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-diagram-project">C) Diagram Project&lt;/a>
&lt;/h4>
&lt;h2 id="step-4diagram-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-4diagram-">Step 4.Diagram ⧄&lt;/a>
&lt;/h2>
&lt;h4 id="a-create-a-system-diagram-excalidraw">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-create-a-system-diagram-excalidraw">A) Create a System Diagram (ExcaliDraw)&lt;/a>
&lt;/h4>
&lt;h4 id="b-combine-with-documentation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-combine-with-documentation">B) Combine with Documentation&lt;/a>
&lt;/h4>
&lt;h4 id="c-export-for-use-in-keynote">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-export-for-use-in-keynote">C) Export for use in Keynote&lt;/a>
&lt;/h4>
&lt;h2 id="step-5build-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-5build-">Step 5.Build 🛠️&lt;/a>
&lt;/h2>
&lt;h4 id="a-document-process">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-document-process">A) Document Process&lt;/a>
&lt;/h4>
&lt;h4 id="b-create-demo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-create-demo">B) Create Demo&lt;/a>
&lt;/h4>
&lt;h4 id="c-essential-truth">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-essential-truth">C) Essential Truth&lt;/a>
&lt;/h4>
&lt;h2 id="step-6-documentation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-6-documentation-">Step 6. Documentation 📕&lt;/a>
&lt;/h2>
&lt;h4 id="a-create-redline-documentation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-create-redline-documentation">A) Create Redline Documentation&lt;/a>
&lt;/h4>
&lt;h4 id="b-format-in-a-comprehensible-way">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-format-in-a-comprehensible-way">B) Format in a comprehensible way&lt;/a>
&lt;/h4>
&lt;h4 id="c-organize-logically">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#c-organize-logically">C) Organize logically&lt;/a>
&lt;/h4>
&lt;h2 id="step-7-prepare--present-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#step-7-prepare--present-">Step 7. Prepare &amp;amp; Present 👨🏻‍🏫&lt;/a>
&lt;/h2>
&lt;h4 id="a-volunteer-to-present">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#a-volunteer-to-present">A) Volunteer to Present&lt;/a>
&lt;/h4>
&lt;h4 id="b-create-keynote-15-20-slides">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#b-create-keynote-15-20-slides">B) Create Keynote (15-20) Slides&lt;/a>
&lt;/h4>
&lt;h4 id="i-project-purpose">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#i-project-purpose">i. project Purpose&lt;/a>
&lt;/h4>
&lt;h4 id="ii-diagram">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#ii-diagram">ii. Diagram&lt;/a>
&lt;/h4>
&lt;h4 id="iii-build-process">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#iii-build-process">iii. Build Process&lt;/a>
&lt;/h4>
&lt;h4 id="iv-what-did-you-learn">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#iv-what-did-you-learn">iv. What did you learn?&lt;/a>
&lt;/h4>
&lt;h4 id="v-what-transferable-skills-did-you-gain">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#v-what-transferable-skills-did-you-gain">v. What transferable skills did you gain?&lt;/a>
&lt;/h4>
&lt;hr>
&lt;h1 id="deliverables-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#deliverables-">Deliverables 🔑&lt;/a>
&lt;/h1>
&lt;h3 id="-1-comprehensive-documentation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#-1-comprehensive-documentation-">✔️ 1. Comprehensive Documentation 📕&lt;/a>
&lt;/h3>
&lt;h3 id="-2-system-diagram-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#-2-system-diagram-">✔️ 2. System Diagram ⧄&lt;/a>
&lt;/h3>
&lt;h3 id="-3-communicative-examples-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#-3-communicative-examples-">✔️ 3. Communicative Examples 📸&lt;/a>
&lt;/h3>
&lt;h3 id="-4-keynote-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#-4-keynote-">✔️ 4. Keynote 👨🏻‍🏫&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp0/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 4 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu4/</link><pubDate>Sat, 05 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu4/</guid><description>&lt;h1 id="operating-running-systems-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#operating-running-systems-">Operating Running Systems ♺&lt;/a>
&lt;/h1>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/sudo.png" alt="Sodoer Power">&lt;/p>
&lt;h2 id="introduction">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#introduction">Introduction&lt;/a>
&lt;/h2>
&lt;p>In this week&amp;rsquo;s Brown Bag session, we discussed the operation of running systems. This refers to when systems are live and possibly being accessed by users. During this time, we inspect settings, configurations, logs, and monitor running processes.&lt;/p>
&lt;h3 id="purpose">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#purpose">Purpose&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Identify anomalies 🔍&lt;/li>
&lt;li>Monitor users for incorrect usage 👥&lt;/li>
&lt;li>Detect nefarious behavior ⚠️&lt;/li>
&lt;li>Ensure processes have adequate resources ⚙️&lt;/li>
&lt;li>Check logs for faults or failures 📝&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="class-notes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#class-notes">Class Notes&lt;/a>
&lt;/h1>
&lt;p>A project wherein a file name was not being recognized, but the uuid was. Once the uuid was placed in fstab, everything worked fine.&lt;/p>
&lt;h2 id="grey-beard-wisdom-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#grey-beard-wisdom-">Grey Beard Wisdom 🧙‍♂️&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Make sure ports are &lt;strong>open&lt;/strong> &amp;amp; server is &lt;strong>on&lt;/strong>&lt;/li>
&lt;li>Rebuild Backups in a Test Environment to ensure integrity&lt;/li>
&lt;li>Write Stuff that can be supported by your team&lt;/li>
&lt;li>Whats the AI policy for the company?&lt;/li>
&lt;/ul>
&lt;h2 id="useful-toolsresourcescommands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#useful-toolsresourcescommands">Useful Tools/Resources/Commands:&lt;/a>
&lt;/h2>
&lt;p>Tripwire - &lt;a href="https://www.tripwire.com/">Sourceforge&lt;/a>
Grubby - &lt;a href="https://software.opensuse.org/package/grubby">https://software.opensuse.org/package/grubby&lt;/a>
SANS.org
srq trigger&lt;/p>
&lt;hr>
&lt;h1 id="lab-notes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#lab-notes-">Lab Notes 🧪&lt;/a>
&lt;/h1>
&lt;h2 id="server-checks">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#server-checks">Server Checks&lt;/a>
&lt;/h2>
&lt;h3 id="warm-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#warm-up">Warm Up&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>cd ~ # Change Directory to Home
ls # list
mkdir unit4 # Create a Directory named unit4
mkdir unit4/test/round6 # This fails 🙅, because the -p option is not invoked
mkdir -p unit4/test/round6 # This works because the Parent option -p is enables allowing for sub directories ✅
cd unit4 # Change to unit4 directory
man ps # View the manual for the ps command 👀
ps -ef # -e Display information about other users processes, including those without controlling terminals. -f Display the uid, pid, parent pid, recent CPU
ps -ef | grep -i root #PID 0, the process ID is zero
ps -ef | grep -i root | wc -L #this command could be helpful because within the root processes it finds the process with the longest line. This could help with finding resource heavy processes or identifying complex commands
top
&lt;/code>&lt;/pre>
&lt;h3 id="pre-lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#pre-lab-">Pre-Lab 🥪&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>rpm -qa | grep -i iostat #should find nothing 👍
dnf iostat #This automatically invoke an install response 🪄
Install package 'sysstat' to provide command 'iostat'? [N/y] y
&lt;/code>&lt;/pre>
&lt;h4 id="confirming-that-sysstat-is-installed-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#confirming-that-sysstat-is-installed-">Confirming that Sysstat is installed 👍&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/sysstat.png" alt="iostat screenshot">&lt;/p>
&lt;pre>&lt;code>rpm –qa | grep –i sysstat # sysstat-12.5.4-8.el9_4.x86_64
dnf install sysstat # Unnessecary 👎
rpm –qa | grep –I sysstat # Didn't work 😐
rpm –qi sysstat&amp;lt;version&amp;gt; # Didn't work 'unexpected token newline'
&lt;/code>&lt;/pre>
&lt;h4 id="confirming-that-vim-is-installed-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#confirming-that-vim-is-installed-">Confirming that Vim is installed 👍&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>rpm -qa | grep -i vim # vim-minimal-8.2.2637-20.el9_l.x86_64 ✅
&lt;/code>&lt;/pre>
&lt;h3 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#lab-">Lab 🥼🧪&lt;/a>
&lt;/h3>
&lt;h4 id="gathering-system-release-and-kernel-info-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#gathering-system-release-and-kernel-info-">Gathering System release and kernel info 🌽&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>cat/etc/*release
&lt;/code>&lt;/pre>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/etcrelease.png" alt="cat /etc/*release screenshot">&lt;/p>
&lt;pre>&lt;code>uname #Linux
uname -a #Show all
uname -r #release
rpm -qa | grep -i kernel
&lt;/code>&lt;/pre>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/kernelinfo.png" alt="rpm -qa | grep -i kernel ouput">&lt;/p>
&lt;h4 id="check-the-number-of-disks-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-the-number-of-disks-">Check the number of &lt;strong>Disks&lt;/strong> 💾&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>fdisk -l #list partition tables
ls /dev/sd* #lists disks, with a wildcard at the end
pvs #physical volumes, Volume group and format
vgs #Volumes Groups
lvs #Logical Volumes
pvdisplay # More Comprehensive listing of Physical Volumes
vgdisplay # More Comprehensive listing of Volume Groups
lvdisplay # More Comprehensive listing of Logical Volumes
&lt;/code>&lt;/pre>
&lt;h4 id="check-disk-statistics-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-disk-statistics-">Check &lt;strong>Disk&lt;/strong> Statistics 💾&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>iostat -d # Displays only device statistics
iostat -d 2 # Displays only device statistics in 2 second increments
iostat -d 2 5 # Displays only device statistics in 2 second increments for a total of 5 seconds
&lt;/code>&lt;/pre>
&lt;h4 id="check-the-amount-of-ram-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-the-amount-of-ram-">Check the amount of RAM 🍪&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>cat /proc/meminfo # a very comprehensive listing of memory info that spans multiple pages
free # Displays **Memory** and **Swap** Space usage
free -m # Diplays **Memory** usage in Mebibytes 1024 bytes MiB
🍼 I was today years old when I learned what a Mebibyte is 😄
&lt;/code>&lt;/pre>
&lt;h4 id="checking--of-processors-and-processor-info">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#checking--of-processors-and-processor-info">Checking # of processors and processor info&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>cat /proc/cpuinfo
cat /proc/cpuinfo | grep proc | wc –l
iostat -c
iostat -c 2 # Runs CPU options in 2 second intervals.
iostat -c 2 5 # I had run this command before, in two second intervals for a total of 5 seconds
&lt;/code>&lt;/pre>
&lt;h4 id="check-system-uptime">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-system-uptime">Check system uptime&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>uptime # 16:40 up 2 days, 17:38, 2 users, load averages: 2.81 2.46 2.30
man uptime # show how long system has been running for 1 min 2 min 15 mins
&lt;/code>&lt;/pre>
&lt;h4 id="check-recent-logins">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-recent-logins">Check Recent Logins&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>last # vertical list of users ttys
last | more # more allows me to scroll through
w # Display detailed info about currently logged in users
who # Prints basic info about users currently logged in
whoami # Just lists your user name
&lt;/code>&lt;/pre>
&lt;h5 id="difference-between-w--who-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#difference-between-w--who-">Difference between w / who 🧐&lt;/a>
&lt;/h5>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Command&lt;/th>
&lt;th>Information Provided&lt;/th>
&lt;th>Key Focus&lt;/th>
&lt;th>Use Case&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>who&lt;/code>&lt;/td>
&lt;td>Basic info about logged-in users (username, terminal, login time, remote host)&lt;/td>
&lt;td>Simple listing of users currently logged in&lt;/td>
&lt;td>Quick check on who is logged in&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>w&lt;/code>&lt;/td>
&lt;td>Detailed info about logged-in users, system load, idle time, and active processes&lt;/td>
&lt;td>Who is logged in and what they are doing, with system load info&lt;/td>
&lt;td>System monitoring and activity tracking&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="check-running-processes-and-services">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-running-processes-and-services">Check running processes and services&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>ps -aux | more # sending all listed processes to more
ps -ef | more # list every process
ps -ef | wc -l # counts the number of lines from a full format listing
&lt;/code>&lt;/pre>
&lt;h4 id="looking-at-historical-system-usage">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#looking-at-historical-system-usage">Looking at Historical System Usage&lt;/a>
&lt;/h4>
&lt;p>sar - Collect, report, or save system activity information.&lt;/p>
&lt;pre>&lt;code>sar | more # check processing for the last day
sar -r | more # check all processes
&lt;/code>&lt;/pre>
&lt;h4 id="sar-was-not-working-so-i-had-to-figure-it-out">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#sar-was-not-working-so-i-had-to-figure-it-out">Sar was not working, so I had to figure it out&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>sudo dnf install sysstat 👍
sudo systemctl enable --now sysstat ✅
sudo systemctl start sysstat ✅
sudo systemctl status sysstat ✅
sudo vim /etc/sysconfig/sysstat ✅
ENABLED=&amp;quot;true&amp;quot; ✅
sudo systemctl restart sysstat ♺
sar # 👍 Works Now!
&lt;/code>&lt;/pre>
&lt;h4 id="ok-back-on-course-with-sar">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#ok-back-on-course-with-sar">Ok back on course with sar&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>sar 2 # runs sar every 2 seconds
sar 2 5 # runs sar every 2 seconds for a total duration of 5 seconds
&lt;/code>&lt;/pre>
&lt;h4 id="check-sar-logs-for-previous-daily-usage">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#check-sar-logs-for-previous-daily-usage">Check sar logs for previous daily usage&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>cd var/log/sa/
# ls
&lt;/code>&lt;/pre>
&lt;h4 id="interesting-sar-logs-are-store-in-varlog-whod-a-thunk-it">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#interesting-sar-logs-are-store-in-varlog-whod-a-thunk-it">Interesting, sar logs are store in var/log/ who&amp;rsquo;d a thunk it&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>sar -f sa03 | head
&lt;/code>&lt;/pre>
&lt;h3 id="exploring-cron">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#exploring-cron">Exploring Cron&lt;/a>
&lt;/h3>
&lt;p>Calm down snoop, this is job related 💩&lt;/p>
&lt;h4 id="there-is-a-daemon-running-my-cron-thank-god-i-can-check-in-on-it-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#there-is-a-daemon-running-my-cron-thank-god-i-can-check-in-on-it-">There is a daemon running my cron, thank god I can check in on it 😈&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>ps -ef | grep -i cron
systemctl status crond
/var/spool/cron
ls -ld /etc/cron*
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h1 id="an-operations-bridge">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#an-operations-bridge">An Operations Bridge&lt;/a>
&lt;/h1>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/opbridge.webp" alt="Abstract Operations Bridge Dashboard">&lt;/p>
&lt;blockquote>
&lt;p>A centralized platform that provides real-time visibility and control over an organization&amp;rsquo;s IT infrastructure and services.&lt;br>
— CIO WIKI&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;/blockquote>
&lt;h2 id="essentially-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#essentially-">Essentially 🧪&lt;/a>
&lt;/h2>
&lt;p>A unified view of operations, consolidating and correlating data from various sources.&lt;/p>
&lt;h2 id="general-purpose">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#general-purpose">General Purpose&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>Streamline IT operations ⚡&lt;/li>
&lt;li>Improve service availability 📈&lt;/li>
&lt;li>Enhance incident response and resolution 🔍&lt;/li>
&lt;/ul>
&lt;h2 id="general-features">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#general-features">General Features&lt;/a>
&lt;/h2>
&lt;h3 id="event-management-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#event-management-">Event Management 🔔&lt;/a>
&lt;/h3>
&lt;p>Collects and consolidates events and alerts from network devices, servers, applications, and security systems. Applies correlation and filtering to identify meaningful incidents and prioritize them based on service impact.&lt;/p>
&lt;h3 id="performance-monitoring-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#performance-monitoring-">Performance Monitoring 🏎️&lt;/a>
&lt;/h3>
&lt;p>Monitors key performance indicators (KPIs) for infrastructure, applications, and services. Identifies performance bottlenecks, trends, and anomalies, enabling proactive optimization.&lt;/p>
&lt;h3 id="incident-management-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#incident-management-">Incident Management 🚨&lt;/a>
&lt;/h3>
&lt;p>Captures, tracks, and escalates incidents. Facilitates collaboration and prioritization, ensuring timely resolution with historical insights and knowledge base integration for faster fixes.&lt;/p>
&lt;h3 id="root-cause-analysis-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#root-cause-analysis-">Root Cause Analysis 🦷&lt;/a>
&lt;/h3>
&lt;p>Analyzes events, performance data, and logs to uncover the root causes of incidents. Uses data analytics to correlate related events and identify underlying issues affecting service availability.&lt;/p>
&lt;h3 id="dashboards-and-reporting-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#dashboards-and-reporting-">Dashboards and Reporting 📊&lt;/a>
&lt;/h3>
&lt;p>Provides customizable dashboards and reports to visualize the health, performance, and availability of IT systems. Allows stakeholders to monitor key metrics, track service-level agreements (SLAs), and gain insights into overall system performance.&lt;/p>
&lt;h3 id="automation-and-orchestration-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#automation-and-orchestration-">Automation and Orchestration ⚙️&lt;/a>
&lt;/h3>
&lt;p>Includes automation capabilities for routine IT tasks like system restarts, service provisioning, and configuration changes. Reduces manual effort, increases efficiency, and minimizes human errors.&lt;/p>
&lt;h2 id="potential-challenges">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#potential-challenges">Potential Challenges&lt;/a>
&lt;/h2>
&lt;h3 id="initial-setup-and-configuration-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#initial-setup-and-configuration-">Initial Setup and Configuration 🛠️&lt;/a>
&lt;/h3>
&lt;p>Can be complex and may require specialized expertise and significant manpower.&lt;/p>
&lt;h3 id="integration-with-multiple-systems-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#integration-with-multiple-systems-">Integration with Multiple Systems 🧩&lt;/a>
&lt;/h3>
&lt;p>As the system grows in complexity, there’s an increased chance of failure and maintenance challenges.&lt;/p>
&lt;h3 id="training-and-skill-development-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#training-and-skill-development-">Training and Skill Development 📚&lt;/a>
&lt;/h3>
&lt;p>Users may need training to effectively manage and operate the platform. Integrating disparate systems requires time and expertise.&lt;/p>
&lt;h3 id="ongoing-maintenance-and-updates-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#ongoing-maintenance-and-updates-">Ongoing Maintenance and Updates 🔄&lt;/a>
&lt;/h3>
&lt;p>Frequent updates to data sources can disrupt connections, making regular maintenance essential. It’s not a turnkey solution.&lt;/p>
&lt;h2 id="personal-take">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#personal-take">Personal Take&lt;/a>
&lt;/h2>
&lt;h3 id="the-term">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#the-term">The Term&lt;/a>
&lt;/h3>
&lt;p>The term &lt;em>Operations Bridge&lt;/em> is relatively new to me. I would’ve called this a &lt;em>Unified Dashboard&lt;/em>. The idea of bridging operations by consolidating and unifying data makes sense, but it’s a bit more complex than just a simple dashboard.&lt;/p>
&lt;h2 id="outstanding-feature">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#outstanding-feature">Outstanding Feature&lt;/a>
&lt;/h2>
&lt;p>The dashboard and reporting capabilities are the most critical. Seeing everything at a glance is invaluable. Other features can often be achieved using smaller tools like Cron jobs, Ansible, Bash, or Prometheus.&lt;/p>
&lt;h2 id="complexity-as-a-weakness">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#complexity-as-a-weakness">Complexity as a Weakness&lt;/a>
&lt;/h2>
&lt;p>The complexity is a major drawback. Constant tweaking seems inevitable in the ever-changing IT landscape. Large organizations with stable, long-term systems may benefit most, but the potential for cascading errors, like in Chernobyl, comes to mind when a single feedback loop causes widespread failures.&lt;/p>
&lt;hr>
&lt;h1 id="-incident-response-scenario-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#-incident-response-scenario-">🚨 Incident Response Scenario 🚨&lt;/a>
&lt;/h1>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU4/ircheat.png" alt="Incident Response CheatSheet Screenshot">&lt;/p>
&lt;blockquote>
&lt;p>— Incident Response Cheatsheet&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/p>
&lt;/blockquote>
&lt;h2 id="scenario-outline">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#scenario-outline">Scenario Outline&lt;/a>
&lt;/h2>
&lt;p>Your team lacks documentation on how to check out a server during an incident.&lt;br>
Develop a procedure detailing what an operations person should do when a system is suspected of malfunctioning.&lt;/p>
&lt;h3 id="key-points">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#key-points">Key Points&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Undocumented server 🛠️&lt;/li>
&lt;li>Server malfunctioning 🚫&lt;/li>
&lt;li>Need for procedural diagnosis 🧑‍💻&lt;/li>
&lt;/ul>
&lt;h2 id="incident-response-cycle">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#incident-response-cycle">Incident Response Cycle&lt;/a>
&lt;/h2>
&lt;ol>
&lt;li>Detect&lt;/li>
&lt;li>Respond&lt;/li>
&lt;li>Mitigate&lt;/li>
&lt;li>Report&lt;/li>
&lt;li>Recover&lt;/li>
&lt;li>Remediate&lt;/li>
&lt;li>Lessons&lt;/li>
&lt;/ol>
&lt;h2 id="custom-incident-procedure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#custom-incident-procedure">Custom Incident Procedure&lt;/a>
&lt;/h2>
&lt;h3 id="1-detect--observe">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#1-detect--observe">1. Detect / Observe&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Check process logs&lt;/li>
&lt;li>Check security logs&lt;/li>
&lt;li>Check application logs&lt;/li>
&lt;/ul>
&lt;h3 id="2-respond">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#2-respond">2. Respond&lt;/a>
&lt;/h3>
&lt;h4 id="snapshot-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#snapshot-">Snapshot 📸&lt;/a>
&lt;/h4>
&lt;p>If possible, take a snapshot of the current system. Treat it like a crime scene—nothing should be disturbed or altered. This snapshot is crucial for forensic analysis of the system&amp;rsquo;s state.&lt;/p>
&lt;h4 id="triage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#triage-">Triage 🩺&lt;/a>
&lt;/h4>
&lt;p>Scan the system for symptoms. Determine if it&amp;rsquo;s a &lt;strong>security incident&lt;/strong> or a &lt;strong>bug&lt;/strong>.&lt;/p>
&lt;h5 id="examine-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#examine-">Examine 🩻&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>Network configuration&lt;/li>
&lt;li>DNS settings&lt;/li>
&lt;li>Hosts file&lt;/li>
&lt;li>Autostart processes&lt;/li>
&lt;li>Scheduled jobs&lt;/li>
&lt;/ul>
&lt;h5 id="list-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#list-">List 📝&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>Active network connections&lt;/li>
&lt;li>System users&lt;/li>
&lt;li>Running processes&lt;/li>
&lt;li>Recently modified files&lt;/li>
&lt;/ul>
&lt;h5 id="verify-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#verify-">Verify ✔&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>Integrity of installed packages&lt;/li>
&lt;/ul>
&lt;h3 id="3-mitigate">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#3-mitigate">3. Mitigate&lt;/a>
&lt;/h3>
&lt;p>After triaging, identify the nature of the issue. If it&amp;rsquo;s a:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Security Incident&lt;/strong> 🚨 — Follow the [Crisis Management Procedure]&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/li>
&lt;li>&lt;strong>Bug&lt;/strong> 🪲 — Proceed with the steps below&lt;/li>
&lt;/ol>
&lt;h3 id="4-report--declare-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#4-report--declare-">4. Report / Declare 📣&lt;/a>
&lt;/h3>
&lt;p>Inform the team and supervisors that the incident has been triaged, diagnosed, documented, and mitigated.&lt;/p>
&lt;h3 id="5-recover-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#5-recover-">5. Recover 🛠️&lt;/a>
&lt;/h3>
&lt;p>Develop or follow a recovery plan to restore the system to normal operation. Document the recovery steps for future reference.&lt;/p>
&lt;h3 id="6-remediate--repair-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#6-remediate--repair-">6. Remediate / Repair 🛠️&lt;/a>
&lt;/h3>
&lt;p>Fix the issue based on its nature. This could involve:&lt;/p>
&lt;ul>
&lt;li>Reconfiguration&lt;/li>
&lt;li>Patching&lt;/li>
&lt;li>Blocking/Banning&lt;/li>
&lt;li>Restoration&lt;/li>
&lt;li>Allocating new resources&lt;/li>
&lt;li>Turning it off and on 😁&lt;/li>
&lt;/ul>
&lt;h3 id="7-document--lessons-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#7-document--lessons-">7. Document / Lessons 📝&lt;/a>
&lt;/h3>
&lt;p>Write a report detailing the problem, its cause, and the steps taken to resolve it. Include a &lt;strong>lessons learned&lt;/strong> section to improve future responses.&lt;/p>
&lt;h3 id="8-bask-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#8-bask-">8. Bask ☕️&lt;/a>
&lt;/h3>
&lt;p>Once resolved, lean back, nod in satisfaction, and enjoy your coffee. Every resolution deserves a small moment of celebration.&lt;/p>
&lt;hr>
&lt;h1 id="the-battle-drill---4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#the-battle-drill---4">The Battle Drill ⚔️ &lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/a>
&lt;/h1>
&lt;p>A &lt;strong>Battle Drill&lt;/strong> is a standard operating procedure used in infantry training. It’s based on common scenarios that require rapid, collective action. By practicing battle drills, a team can react quickly and efficiently to dangerous situations without the need for complex decision-making.&lt;/p>
&lt;p>Battle drills prepare infantry for swift, organized, and aggressive responses to high-stress situations such as explosions, direct fire, flashing lights, chemical exposure, or sudden assaults.&lt;/p>
&lt;blockquote>
&lt;p>Battle Drills are for those moments when everything is going wrong and you need a reactionary response.&lt;!-- raw HTML omitted -->
— &lt;!-- raw HTML omitted -->Scott Champine&lt;!-- raw HTML omitted -->&lt;/p>
&lt;/blockquote>
&lt;p>⏱️ &lt;strong>Reaction time and mental readiness&lt;/strong> are key to success.&lt;/p>
&lt;h2 id="application-to-operational-incidents-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#application-to-operational-incidents-">Application to Operational Incidents 🛠️&lt;/a>
&lt;/h2>
&lt;p>The principles behind battle drills can easily be applied to system operations, where rapid group responses to incidents are critical.&lt;/p>
&lt;h3 id="documentation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#documentation-">Documentation 📝&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Procedures must be &lt;strong>well-documented&lt;/strong> and easy to understand for all possible scenarios.&lt;/li>
&lt;/ul>
&lt;h3 id="clear-objectives-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#clear-objectives-">Clear Objectives 🎯&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Leadership communicates &lt;strong>simple and clear objectives&lt;/strong> to the team for each scenario.&lt;/li>
&lt;/ul>
&lt;h3 id="drilling--testing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#drilling--testing-">Drilling / Testing 🧑‍💻&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Teams &lt;strong>practice scenarios together&lt;/strong>, following the documented procedure and maintaining effective communication.&lt;/li>
&lt;/ul>
&lt;h3 id="known-procedure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#known-procedure-">Known Procedure 👥&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Through &lt;strong>review and practice&lt;/strong>, everyone knows their role and objectives in the group, ensuring a unified response in any scenario.&lt;/li>
&lt;/ul>
&lt;h2 id="the-importance-of-drilling-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#the-importance-of-drilling-">The Importance of Drilling 🔄&lt;/a>
&lt;/h2>
&lt;p>In real incidents, there’s often no time to plan a response. For regular operations, we have the luxury of preparation and research, but in high-stress, mission-critical situations, the pressure can become overwhelming, potentially leading to paralysis. &lt;strong>Preparedness through practice&lt;/strong> is essential.&lt;/p>
&lt;h2 id="knowing-your-tools-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#knowing-your-tools-">Knowing Your Tools 🧰&lt;/a>
&lt;/h2>
&lt;p>In the infantry, this means knowing how to load, reload, field-strip, and fire a weapon, or apply first aid using a trauma kit to save a fellow soldier.&lt;/p>
&lt;p>These concepts are equally valuable in system operations. Knowing how to run basic commands, troubleshoot issues, break down problems, and write scripts all fall under &lt;strong>knowing your tools&lt;/strong>. Just as a soldier must be able to handle their equipment with their eyes closed, an operator must be fluent in the commands, tools, and procedures they rely on daily. This level of expertise comes from &lt;strong>memorizing commands, knowing paths, and practicing scripting&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h3 id="detection">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#detection">Detection&lt;/a>
&lt;/h3>
&lt;h3 id="response">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#response">Response&lt;/a>
&lt;/h3>
&lt;h3 id="mitigation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#mitigation">Mitigation&lt;/a>
&lt;/h3>
&lt;h3 id="reporting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#reporting">Reporting&lt;/a>
&lt;/h3>
&lt;h3 id="recovery">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#recovery">Recovery&lt;/a>
&lt;/h3>
&lt;h3 id="remediation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#remediation">Remediation&lt;/a>
&lt;/h3>
&lt;h3 id="lessons-learned">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#lessons-learned">Lessons Learned&lt;/a>
&lt;/h3>
&lt;h3 id="after-action-review">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#after-action-review">After action review&lt;/a>
&lt;/h3>
&lt;h3 id="operations-bridge">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#operations-bridge">Operations Bridge&lt;/a>
&lt;/h3>
&lt;hr>
&lt;h1 id="reflecting-upon-unit-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#reflecting-upon-unit-4">Reflecting upon Unit #4&lt;/a>
&lt;/h1>
&lt;ol>
&lt;li>What questions do you still have about this week?&lt;/li>
&lt;/ol>
&lt;h2 id="note-taking-improvements">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#note-taking-improvements">Note-Taking Improvements&lt;/a>
&lt;/h2>
&lt;p>A few months before this course, I realized that to deepen my understanding of systems, I needed to take extensive notes I could easily refer back to. After doing thorough research on different note-taking systems, I concluded that LogSeq&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup> was the best fit for my needs.&lt;/p>
&lt;p>I chose LogSeq&lt;sup id="fnref1:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup> because:&lt;/p>
&lt;ul>
&lt;li>It’s open source&lt;/li>
&lt;li>Local-first&lt;/li>
&lt;li>Supports tags&lt;/li>
&lt;li>Uses Markdown&lt;/li>
&lt;li>Works across all platforms&lt;/li>
&lt;/ul>
&lt;p>Since adopting LogSeq, I’ve taken an immense amount of notes. I&amp;rsquo;ve also created a lot of cheat sheets and references, thanks to LLMs and various GitHub repositories. Let’s just say my note-taking game has been strong.&lt;/p>
&lt;p>When this course started, I knew that note-taking would be a big component. Most of my notes are private since I prefer to write candidly, sometimes using strong language. To share more polished, public-friendly notes, I created this HUGO blog. I’m a stickler for clean layouts, typesetting, and readability, so filling out pre-formatted documents isn’t my style.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu4/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Operations Bridge &lt;a href="https://cio-wiki.org/wiki/Operations_Bridge">Wiki&lt;/a> CIO-WIKI, 2024.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Incident Response Cheatsheet Version 1.8 &lt;a href="https://zeltser.com/media/docs/security-incident-survey-cheat-sheet.pdf?msc=Cheat+Sheet+Blog">PDF Reference&lt;/a> Lenny Zeltser, 2024.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>Detailed Crisis Management Procedure &lt;a href="https://trevorsmale.github.io/techblog/PACU4">Blog&lt;/a> Trevor Smale, 2024.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>Battle Drill &lt;a href="https://en.wikipedia.org/wiki/Battle_drill">Wiki&lt;/a> Wikipedia.org, 2024.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5">
&lt;p>Note Taking &lt;a href="https://logseq.com/">Software&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&amp;#160;&lt;a href="#fnref1:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>Why Btrfs 🤔</title><link>https://trevorsmale.github.io/techblog/post/btrfs/</link><pubDate>Thu, 03 Oct 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/btrfs/</guid><description>&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Btrfs/btrfslogo.png" alt="Custom Btrfs Banner">&lt;/p>
&lt;h1 id="btrfs-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#btrfs-">Btrfs 💾&lt;/a>
&lt;/h1>
&lt;p>Btrfs stands for &lt;strong>B-tree File System&lt;/strong>, not &amp;ldquo;Better File System,&amp;rdquo; though it’s easy to see why people might think that. I believe Btrfs is the future for both small and large-scale projects, as it reduces the need for manual and automated maintenance, while simplifying backup and restoration processes.&lt;/p>
&lt;p>This article aims to shed light on the history and motivation behind creating Btrfs, its core functionality, and the standout features that set it apart from the competition.&lt;/p>
&lt;h2 id="history">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#history">History&lt;/a>
&lt;/h2>
&lt;h3 id="motivation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#motivation">Motivation&lt;/a>
&lt;/h3>
&lt;p>The idea for Btrfs was first proposed by IBM researcher and bioinformatician &lt;strong>Ohad Rodeh&lt;/strong> at a USENIX conference in 2007. The goal was to develop a &lt;strong>copy-on-write (COW)&lt;/strong>-friendly B-tree algorithm, which would allow for efficient data storage and retrieval without the overhead typical of other file systems.&lt;/p>
&lt;p>As Valerie Aurora explained:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;To start with, B-trees in their native form are wildly incompatible with COW. The leaves of the tree are linked together, so when the location of one leaf changes (via a write—which implies a copy to a new block), the link in the adjacent leaf changes, which triggers another copy-on-write and location change, which changes the link in the next leaf&amp;hellip; The result is that the entire B-tree, from top to bottom, has to be rewritten every time one leaf is changed.&amp;rdquo;&lt;br>
– Valerie Aurora&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>Chris Mason&lt;/strong>, a core developer of the &lt;strong>Reiser Filesystem&lt;/strong>, liked the idea and saw an opportunity to move beyond Reiser, which used B-trees but wasn’t optimized for COW. Mason brought the idea to his new job at Oracle, where development of Btrfs began in earnest.&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;I started Btrfs soon after joining Oracle. I had a unique opportunity to take a detailed look at the features missing from Linux, and felt that Btrfs was the best way to solve them.&amp;rdquo;&lt;br>
– Chris Mason&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/p>
&lt;/blockquote>
&lt;p>In collaboration with Oracle colleague &lt;strong>Zach Brown&lt;/strong>, they drafted the initial version of Btrfs.&lt;/p>
&lt;h3 id="rapid-development-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#rapid-development-">Rapid Development ⏱️&lt;/a>
&lt;/h3>
&lt;p>Thanks to corporate backing and a team of experienced developers, Btrfs moved through an aggressive development cycle. Within two years of the technical proposal, a working 1.0 version of Btrfs was released in late 2008.&lt;/p>
&lt;p>Shortly after its introduction, Btrfs was merged into the &lt;strong>mainline Linux kernel&lt;/strong>. Despite the conservative nature of file system adoption—where admins, systems engineers, and software engineers prefer proven, stable systems—Btrfs quickly gained traction.&lt;/p>
&lt;p>In 2015, &lt;strong>SUSE Linux Enterprise Server (SLES)&lt;/strong> became the first major Linux distribution to adopt Btrfs as its default file system, citing it as the future of Linux storage solutions.&lt;/p>
&lt;h3 id="enterprise-adoption-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#enterprise-adoption-">Enterprise Adoption 📊&lt;/a>
&lt;/h3>
&lt;p>Today, Btrfs is the default file system for several major enterprise Linux distributions, including &lt;strong>SUSE&lt;/strong>, &lt;strong>Fujitsu Linux&lt;/strong>, &lt;strong>Ubuntu&lt;/strong>, &lt;strong>Oracle Linux&lt;/strong>, and popular user distributions like &lt;strong>Fedora&lt;/strong>, &lt;strong>Arch&lt;/strong>, and &lt;strong>Gentoo&lt;/strong>.&lt;/p>
&lt;p>In fact, &lt;strong>Meta&lt;/strong> (formerly Facebook) uses Btrfs to manage their large, dynamic data sets. According to core developer &lt;strong>Josef Bacik&lt;/strong>, using Btrfs at Meta has significantly reduced access times and contributed to cost reductions in production environments.&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/p>
&lt;h2 id="how-btrfs-works-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#how-btrfs-works-">How Btrfs Works ⚙️&lt;/a>
&lt;/h2>
&lt;h3 id="the-b-tree-algorithm-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#the-b-tree-algorithm-">The B-Tree+ Algorithm 🌳&lt;/a>
&lt;/h3>
&lt;p>At its core, Btrfs relies on a &lt;strong>B-tree&lt;/strong>, a type of data structure designed to organize and store data efficiently.&lt;/p>
&lt;p>Here is a basic diagram of a B-tree, though in file systems, it gets more complex:&lt;/p>
&lt;p>&lt;img src="https://raw.github.com/alexeygrigorev/wiki-figures/master/ulb/dbsa/ind/btree-ex.png" alt="B-Tree Diagram">&lt;/p>
&lt;p>A B-tree consists of &lt;strong>nodes&lt;/strong> and &lt;strong>links&lt;/strong> (sometimes referred to as &lt;strong>keys&lt;/strong> and &lt;strong>pointers&lt;/strong> or &lt;strong>leaves&lt;/strong> and &lt;strong>branches&lt;/strong>), which drastically reduce seek time. This ensures that, no matter how much data you store, finding the right file is quick and doesn’t require searching through everything.&lt;/p>
&lt;p>The &lt;strong>root node&lt;/strong> is a type of index stored in a fixed location on the disk. It serves as the starting point for a rapid search called &lt;strong>fanning out&lt;/strong>.&lt;/p>
&lt;p>This structure reduces disk access time and, in turn, improves overall system efficiency. The relationship between the depth of nodes and the breadth of data is known as the &lt;strong>fan-out factor&lt;/strong>. Tuning this ratio can either speed up searches (with a wider spread) or reduce write size for smaller segments.&lt;/p>
&lt;h3 id="copy-on-write-cow-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#copy-on-write-cow-">Copy-on-Write (COW) 🐄&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Copy-on-Write (COW)&lt;/strong> is a method where data and metadata are not overwritten in place. Instead, they are copied to a new location before the update is finalized. Btrfs employs COW in conjunction with its B-tree algorithm to maintain data integrity.&lt;/p>
&lt;p>Btrfs also uses &lt;strong>delayed allocation&lt;/strong>, where metadata is updated first, linking it to new data before the actual data is copied &lt;strong>Persistant Pre Allocation&lt;/strong> to a new location. This delay allows the file system to organize sector placement called &lt;strong>Extent Base Allocation&lt;/strong> and optimize metadata before the actual write &lt;strong>Multi-Block Allocation&lt;/strong>, reducing unnecessary reads and writes.&lt;/p>
&lt;p>This delayed allocation process supports &lt;strong>wear leveling&lt;/strong> (also known as &lt;strong>TRIM&lt;/strong>) on SSDs, where data is written to new sectors to avoid repeatedly writing to the same location, thus extending the lifespan of the drive.&lt;/p>
&lt;h3 id="snapshots-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#snapshots-">Snapshots 📸&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Snapshots&lt;/strong> are one of Btrfs&amp;rsquo;s standout features. They use COW to create lightweight, efficient snapshots of data at any given time.&lt;/p>
&lt;p>Unlike traditional Linux filesystems, which only allow snapshots of &lt;strong>logical volumes&lt;/strong>, Btrfs can snapshot both &lt;strong>volumes&lt;/strong> and &lt;strong>subvolumes&lt;/strong>. This means that the entire data set—down to the subvolume level—can be efficiently snapshotted. Snapshots in Btrfs do not require duplication of data, only tracking changes made after the snapshot was taken.&lt;/p>
&lt;h3 id="cloning-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#cloning-">Cloning 🐑🐑&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Cloning&lt;/strong> in Btrfs allows you to create &lt;strong>writeable copies&lt;/strong> of subvolumes or snapshots, which share the same data blocks until changes are made. Unlike traditional file copying, cloning doesn&amp;rsquo;t duplicate the original data, making it fast and storage-efficient. When modifications are made, only the changed blocks are copied, leaving the rest shared between the clone and the original.&lt;/p>
&lt;p>This makes cloning in Btrfs ideal for use cases where multiple environments or datasets need to be derived from the same base system, without significant storage overhead.&lt;/p>
&lt;h3 id="dynamic-online-storage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#dynamic-online-storage-">Dynamic Online Storage 📈📉&lt;/a>
&lt;/h3>
&lt;p>Btrfs allows you to manage storage pools dynamically with &lt;strong>online resizing&lt;/strong> and device management, meaning that you can expand and shrink file systems while they are mounted and in use. This flexibility helps reduce downtime and allows systems to scale easily with growing storage needs.&lt;/p>
&lt;h4 id="expanding-disk-pools-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#expanding-disk-pools-">Expanding Disk Pools 🏊‍♂️🏊‍♂️🏊‍♂️&lt;/a>
&lt;/h4>
&lt;p>You can add new disks to a Btrfs file system without stopping the system. With a simple command, Btrfs integrates the new storage into the existing pool, redistributing data across devices if necessary. This feature makes Btrfs highly scalable, especially in environments where storage demands can grow unpredictably.&lt;/p>
&lt;h4 id="resizeable-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#resizeable-">Resizeable 📏&lt;/a>
&lt;/h4>
&lt;p>Btrfs volumes can be &lt;strong>expanded or shrunk&lt;/strong> online, without unmounting the file system. Expanding is as simple as adding more storage, while shrinking requires no special process apart from the resizing command. This dynamic resizing means you can adjust the size of your file system to suit your current storage needs.&lt;/p>
&lt;h4 id="self-healing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#self-healing-">Self-Healing ❤️‍🩹&lt;/a>
&lt;/h4>
&lt;p>Btrfs provides &lt;strong>self-healing&lt;/strong> capabilities when used in a redundant RAID setup. Through &lt;strong>data and metadata checksumming&lt;/strong>, Btrfs can detect corrupted blocks and automatically fix them using redundant copies of the data. This ensures data integrity without user intervention, particularly useful for critical data environments.&lt;/p>
&lt;h3 id="compression-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#compression-">Compression 🪗&lt;/a>
&lt;/h3>
&lt;p>Btrfs supports &lt;strong>transparent compression&lt;/strong>, which means files can be compressed as they are written to disk, saving space without requiring manual compression. It supports multiple algorithms like &lt;strong>LZO&lt;/strong>, &lt;strong>Zlib&lt;/strong>, and &lt;strong>Zstandard (ZSTD)&lt;/strong>, each with different balances of speed and compression ratio. This feature helps save storage space and can improve performance, especially when working with large datasets.&lt;/p>
&lt;h3 id="technical-feature-list-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#technical-feature-list-">Technical Feature List: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Journaling&lt;/strong>: Keeps track of changes before they are committed, helping with data recovery in case of a crash.&lt;/li>
&lt;li>&lt;strong>Extent Base Allocation&lt;/strong>: Allocates large, contiguous blocks of storage to reduce fragmentation.&lt;/li>
&lt;li>&lt;strong>Persistent Pre-allocation&lt;/strong>: Reserves space for a file at creation to prevent fragmentation and improve performance.&lt;/li>
&lt;li>&lt;strong>Delayed Allocation&lt;/strong>: Delays the allocation of disk space until data is written, optimizing space management.&lt;/li>
&lt;li>&lt;strong>Multi-block Allocation&lt;/strong>: Allocates multiple blocks at once to increase efficiency, especially for large files.&lt;/li>
&lt;li>&lt;strong>Stripe-aware Allocation&lt;/strong>: Optimizes block allocation for RAID systems by aligning data with RAID stripes.&lt;/li>
&lt;li>&lt;strong>Resizeable with resize2fs&lt;/strong>: Can be resized (grown or shrunk) using the resize2fs tool.&lt;/li>
&lt;li>&lt;strong>B-tree Balancing Algorithm - Different from XFS (COW B Tree)&lt;/strong>: Uses a specific B-tree balancing algorithm for efficient file system organization and copy-on-write operations.&lt;/li>
&lt;li>&lt;strong>Copy-on-Write (COW)&lt;/strong>: Writes modified data to new locations rather than overwriting existing data, preventing data corruption.&lt;/li>
&lt;li>&lt;strong>Snapshots and Clones&lt;/strong>: Creates point-in-time copies of data (snapshots) and allows for duplication (clones) without full data replication.&lt;/li>
&lt;li>&lt;strong>Built-in RAID Support&lt;/strong>: Provides native support for RAID configurations, improving data redundancy and performance.&lt;/li>
&lt;li>&lt;strong>Data and Metadata Checksumming&lt;/strong>: Ensures data integrity by verifying both data and metadata through checksums.&lt;/li>
&lt;li>&lt;strong>Self-Healing&lt;/strong>: Automatically repairs corrupted data using mirrored or parity blocks in RAID configurations.&lt;/li>
&lt;li>&lt;strong>Dynamic Subvolumes&lt;/strong>: Supports the creation of isolated subvolumes within the same file system for better data management.&lt;/li>
&lt;li>&lt;strong>Online Resizing&lt;/strong>: Allows the file system to be resized while it&amp;rsquo;s still mounted and in use.&lt;/li>
&lt;li>&lt;strong>Compression (LZO, ZLIB, ZSTD)&lt;/strong>: Offers various compression algorithms to reduce storage space usage.&lt;/li>
&lt;li>&lt;strong>Deduplication&lt;/strong>: Eliminates duplicate copies of repeating data to save space.&lt;/li>
&lt;/ul>
&lt;h2 id="core-commands-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#core-commands-">Core Commands 🪨&lt;/a>
&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mkfs.btrfs&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Creates a new Btrfs file system on a specified device or partition.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs subvolume create&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Creates a new subvolume within an existing Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs subvolume delete &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Deletes a specified subvolume from the Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs subvolume list &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Lists all subvolumes within a Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs filesystem show &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Displays detailed information about the Btrfs file systems on all mounted devices.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs filesystem df &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Shows disk space usage, including metadata and data, for a Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs balance start &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Begins a balancing operation to redistribute data and metadata across the Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs balance cancel &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Cancels an ongoing balancing operation.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs scrub start &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Initiates a scrub operation to verify data integrity on a Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs scrub status &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Shows the status of an ongoing scrub operation.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs device add &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Adds a new device to an existing Btrfs file system, allowing for dynamic storage expansion.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs device delete&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Removes a specified device from a Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs device stats &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Displays statistics and error information about devices in a Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs check &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Checks the integrity of a Btrfs file system, often used for troubleshooting.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs rescue chunk-recover &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Attempts to recover data chunks from a damaged Btrfs file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs filesystem resize &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Resizes a Btrfs file system, either expanding or shrinking it dynamically.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs snapshot &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Creates a read-only or read-write snapshot of a subvolume or file system.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs property set&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Modifies properties of a Btrfs file system or its subvolumes (e.g., enabling compression).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs quota enable&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Enables quota enforcement on a Btrfs file system to limit space usage.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">btrfs quota rescan&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Rescans the file system to enforce or update quota limits.&lt;/p>
&lt;h2 id="conclusion">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#conclusion">Conclusion&lt;/a>
&lt;/h2>
&lt;p>Well I hope that has opened your eyes to the benefits of Btrfs. Researching for this article has helped me to learn some more about the subject.
If will definitely add to the article as I learn more about the subject, so consider this evergreen information 🌲&lt;/p>
&lt;hr>
&lt;h3 id="helpful-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/btrfs/#helpful-links-">Helpful Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Btrfs">https://en.wikipedia.org/wiki/Btrfs&lt;/a>
&lt;a href="https://docs.kernel.org/filesystems/btrfs.html">https://docs.kernel.org/filesystems/btrfs.html&lt;/a>
Footnotes&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>The above quote is excerpted from Valerie Aurora &lt;a href="https://lwn.net/Articles/342892/">Article&lt;/a> lwn.net, 2009.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Chris Mason &lt;a href="https://www.youtube.com/watch?v=oSgGVX2CGOQ">Interview&lt;/a> during LF Collaboration Summit, 2009.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>The above reference is to the first proposal for the Btrfs file system &lt;a href="https://www.youtube.com/watch?v=PAAkCSZUG1c">Technical Proposal&lt;/a> during Gopherfest, Tues, June 12th, 2017.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG Admin Course Capstone Project Stage 3 🐧</title><link>https://trevorsmale.github.io/techblog/post/paccp3/</link><pubDate>Mon, 30 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/paccp3/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>A progress update regarding the ProLUG website that improve useability&lt;/p>
&lt;hr>
&lt;h2 id="info-pop-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#info-pop-up">Info Pop-up&lt;/a>
&lt;/h2>
&lt;p>I wanted to add additional information to the site while maintaining a clean layout, predictable and comprehensible design. This is not only my personal aesthetic taste, this is a feature of accessibility. Websites with tons of information, many levels of contrast and or layouts are not only difficult for the visually impaired, but confusing for people suffering from cognitive impairment. I try to use inclusive design in accordance with WCAG guidelines on any project I am working on. So this leads me to the objective, to create a pop up design with additional information. I started with one of the more confusing features of the site, the verification input. When getting started, I wasn&amp;rsquo;t sure if it would be possible to accomplish this with TailwindCSS, so it took a bit of reading to confirm. It turns out this is completely possible using tailwind as evidence by the code snippet.&lt;/p>
&lt;h2 id="design-details">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#design-details">Design Details&lt;/a>
&lt;/h2>
&lt;p>I would like to convey about the design choices as&lt;/p>
&lt;ul>
&lt;li>Simple prominent button with high contrast.&lt;/li>
&lt;li>Semi transparent background to denote this is a temporary overlay&lt;/li>
&lt;li>Large text&lt;/li>
&lt;li>Short, straightforward descriptions&lt;/li>
&lt;li>Differing colors for open and close to further indicate the state.&lt;/li>
&lt;/ul>
&lt;h4 id="verification-entry-box-with-question-mark-button">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#verification-entry-box-with-question-mark-button">Verification entry box with question mark button&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACCP3/?.png" alt="Capture of Verification Screen Question Button">&lt;/p>
&lt;h4 id="associated-pop-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#associated-pop-up">Associated pop-up&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACCP3/pu.png" alt="Capture of additional info pop-up">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-html" data-lang="html">&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">details&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;open&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c">&amp;lt;!-- Button to be visible --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">summary&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;bg-blue-300 rounded-xl inline-block px-4 py-2 text-xl hover:bg-blue-500 hover:duration-300 hover:text-white cursor-pointer&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ?
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">summary&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c">&amp;lt;!-- Content will be hidden until the user clicks on the summary button. --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">div&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;bg-white bg-opacity-50 backdrop-blur-md rounded-sm w-[100%] h-[100%] max-w-[600px] max-h-[700px] my-auto mx-auto absolute inset-0 text-gray-600 p-4&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">h1&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;text-2xl font-bold&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>Information&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">h1&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">div&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;m-8&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&amp;lt;&lt;/span>&lt;span class="nt">h2&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;text-xl font-bold&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>How this works&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">h2&lt;/span>&lt;span class="p">&amp;gt;&amp;lt;&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>Each ProLUG certificate has a unique ID link. This ID belongs only to the person who earned the certificate. When the ID is checked, the certificate information should match the person’s details. &lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">h2&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;text-xl font-bold&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>Does not Match&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">h2&lt;/span>&lt;span class="p">&amp;gt;&amp;lt;&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>If the certificate information does not match what the verifier provided, the certificate is likely to be fake.&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">h2&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;text-xl font-bold&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>Why Verify?&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">h2&lt;/span>&lt;span class="p">&amp;gt;&amp;lt;&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>ProLUG values the hard work graduates put into earning their certification. We work to stop shortcuts and forgery to protect that effort.&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">p&lt;/span>&lt;span class="p">&amp;gt;&amp;lt;/&lt;/span>&lt;span class="nt">div&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c">&amp;lt;!-- Close button positioned at the bottom and centered --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">div&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;absolute bottom-4 left-1/2 transform -translate-x-1/2&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">button&lt;/span> &lt;span class="na">class&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-700&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="na">onclick&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;this.closest(&amp;#39;details&amp;#39;).removeAttribute(&amp;#39;open&amp;#39;);&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span> Close &lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">button&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">div&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">div&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;/&lt;/span>&lt;span class="nt">details&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h3 id="todo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#todo">Todo&lt;/a>
&lt;/h3>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp3/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 3 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu3/</link><pubDate>Mon, 30 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu3/</guid><description>&lt;h1 id="storage--logical-volume-management-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#storage--logical-volume-management-">Storage &amp;amp; Logical Volume Management 🧠💾&lt;/a>
&lt;/h1>
&lt;h2 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#intro">Intro&lt;/a>
&lt;/h2>
&lt;p>Ok, Week 3 / Unit 3. This week we are working on Logical Volume Management (LVM) and RAID. Fortunately I was able to listen to the entire lecture and read most of the chats which is always helpful.&lt;/p>
&lt;hr>
&lt;h1 id="lab-notes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lab-notes-">Lab Notes 🧪&lt;/a>
&lt;/h1>
&lt;h2 id="warmup">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#warmup">Warmup&lt;/a>
&lt;/h2>
&lt;h3 id="redirects-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#redirects-">Redirects ✉️&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>cd ~ # Change Directory to Home
mkdir lvm_lab # Create a Directory called lvm_lab
cd lvm_lab # Change location into the lvm_lab directory
touch somefile # create an empty file called somefile
echo &amp;quot;this is a string of text&amp;quot; &amp;gt; somefile # This sends the output of echo into the file
cat somefile # concatenates and displays what is in the file
echo &amp;quot;this is a sting of text&amp;quot; &amp;gt; somefile # Overwrites the line with the same text
echo &amp;quot;this is a sting of text&amp;quot; &amp;gt; somefile
echo &amp;quot;this is a sting of text&amp;quot; &amp;gt; somefile
cat somefile # We are left with one line of text after repeating this action because this
action overwrites.
echo &amp;quot;This is a string of text&amp;quot; &amp;gt;&amp;gt; somefile # The double arrow is redirect append
echo &amp;quot;This is a string of text&amp;quot; &amp;gt;&amp;gt; somefile # this adds a second line
echo &amp;quot;This is a string of text&amp;quot; &amp;gt;&amp;gt; somefile # this adds a third line
cat somefile # The concatenated output would be 3 line of &amp;quot;This is a string of text&amp;quot;
echo &amp;quot;this is our other test text&amp;quot; &amp;gt;&amp;gt; somefile
echo &amp;quot;this is our other test text&amp;quot; &amp;gt;&amp;gt; somefile
echo &amp;quot;this is our other test text&amp;quot; &amp;gt;&amp;gt; somefile
cat somefile | nl # This adds numbering to each line in the file
cat somefile | nl | grep test # This does nothing as there is no text within the file that
contains the string nothing
cat somefile | grep test | nl # Also nothing
cat somefile | nl | other # Gives us our last 3 lines and associated line number
always | nl | before your grep
&lt;/code>&lt;/pre>
&lt;h2 id="lab-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lab-">Lab 🥼🧪&lt;/a>
&lt;/h2>
&lt;h3 id="disk-speed-tests-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#disk-speed-tests-">Disk Speed Tests ⏱️&lt;/a>
&lt;/h3>
&lt;p>This is on my own virtual machine, so figuring out the unique commands took a bit of extra work.&lt;/p>
&lt;pre>&lt;code>lsblk /dev/sda2
p #print to see partitions
d #delete partitions or information
w #Write out the changes to the disk.
&lt;/code>&lt;/pre>
&lt;h3 id="write-tests-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#write-tests-">Write tests 💾&lt;/a>
&lt;/h3>
&lt;h4 id="saving-off-write-data--rename-tmpfile-each-time">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#saving-off-write-data--rename-tmpfile-each-time">saving off write data – rename /tmp/file each time&lt;/a>
&lt;/h4>
&lt;p>Checking /dev/sda2 for a filesystem&lt;/p>
&lt;pre>&lt;code>blkid /dev/sda2 👍
&lt;/code>&lt;/pre>
&lt;p>If no filesystem, make one&lt;/p>
&lt;pre>&lt;code>mkfs.ext4 /dev/sda2
mkdir space
mount /dev/xvda space ?
&lt;/code>&lt;/pre>
&lt;h3 id="write-speed-test-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#write-speed-test-">Write Speed Test 💾🏎️&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>for i in 'seq 1 10';do time dd if=/dev/zero of=/space/testfile$ bs=1024k count=1000 | tee -a /tmp/speedtest1basiclvm
&lt;/code>&lt;/pre>
&lt;h4 id="write-test-result">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#write-test-result">Write Test Result&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>real 0m0.003s
user 0m0.000s
sys 0m0.002s
&lt;/code>&lt;/pre>
&lt;h4 id="read-test-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#read-test-">Read Test 👓💾&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>for i in 'seq 1 10';do time dd if=/space/testfile$i of=/dev/null;done
&lt;/code>&lt;/pre>
&lt;h4 id="read-test-result">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#read-test-result">Read Test Result&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>real 0m0.001s
user 0m0.001s
sys 0m0.001s
&lt;/code>&lt;/pre>
&lt;h4 id="cleanup-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#cleanup-">Cleanup 🧹&lt;/a>
&lt;/h4>
&lt;pre>&lt;code>for i in 'seq 1 10'; do rm -rf/space/testfile$i;done
&lt;/code>&lt;/pre>
&lt;h3 id="lvm-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lvm-">LVM 🧠💾&lt;/a>
&lt;/h3>
&lt;pre>&lt;code>start in root (#); cd /root
&lt;/code>&lt;/pre>
&lt;p>Check physical volumes on your server (my output may vary)&lt;/p>
&lt;pre>&lt;code>[root@rocky1 ~]#fdisk -l | grep -i sda
&lt;/code>&lt;/pre>
&lt;p>output:&lt;/p>
&lt;pre>&lt;code>Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
/dev/sda1 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 67108863 65009664 31G 8e Linux LVM
&lt;/code>&lt;/pre>
&lt;h4 id="basic-lvm-listings">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#basic-lvm-listings">Basic LVM listings&lt;/a>
&lt;/h4>
&lt;h5 id="pvs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#pvs">pvs&lt;/a>
&lt;/h5>
&lt;p>output:&lt;/p>
&lt;pre>&lt;code>PV VG Fmt Attr PSize PFree
/dev/sda2 rl_localhost-live lvm2 a-- &amp;lt;31.00g 0
&lt;/code>&lt;/pre>
&lt;h5 id="vgs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#vgs">vgs&lt;/a>
&lt;/h5>
&lt;p>output:&lt;/p>
&lt;pre>&lt;code>VG #PV #LV #SN Attr VSize VFree
rl_localhost-live 1 2 0 wz--n- &amp;lt;31.00g 0
&lt;/code>&lt;/pre>
&lt;p>output:&lt;/p>
&lt;h5 id="lvs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lvs">lvs&lt;/a>
&lt;/h5>
&lt;pre>&lt;code>LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root rL_localhost-live -wi-ao---- 27.79g
swap rL_localhost-live -wi-ao---- 3.20g
&lt;/code>&lt;/pre>
&lt;h5 id="pvdisplay-needs-sudo-or-root">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#pvdisplay-needs-sudo-or-root">pvdisplay (Needs SUDO or Root)&lt;/a>
&lt;/h5>
&lt;p>output:&lt;/p>
&lt;pre>&lt;code>PV Name /dev/sda2
VG Name rl_localhost-live
PV Size &amp;lt;31.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE 4.00 MiB
Total PE 7935
Free PE 0
Allocated PE 7935
PV UUID gMVNd5-peB1-uUX6-Rw28-4Ncb-mi1b-rDJR38
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>PV Name&lt;/strong>: &lt;code>/dev/sda2&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This is the physical volume (PV) name, which indicates the device or partition that has been initialized as a physical volume for use in LVM (Logical Volume Manager).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>VG Name&lt;/strong>: &lt;code>rl_localhost-live&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This is the volume group (VG) name to which this physical volume belongs. A volume group is a collection of physical volumes that create a pool of storage space from which logical volumes (LVs) are allocated.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>PV Size&lt;/strong>: &lt;code>&amp;lt;31.00 GiB / not usable 3.00 MiB&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The size of the physical volume is 31.00 GiB, but 3.00 MiB is not usable, likely due to overhead or alignment issues within the physical volume.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Allocatable&lt;/strong>: &lt;code>yes (but full)&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This indicates whether the physical volume is available for allocation into logical volumes. It is set to &amp;ldquo;yes,&amp;rdquo; but the &amp;ldquo;full&amp;rdquo; remark means that all available physical extents (PEs) are already allocated.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>PE Size&lt;/strong>: &lt;code>4.00 MiB&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This shows the size of a physical extent (PE), which is the smallest chunk of data that LVM manages. In this case, each PE is 4.00 MiB.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Total PE&lt;/strong>: &lt;code>7935&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The total number of physical extents on this physical volume. This is calculated based on the size of the physical volume and the size of each PE.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Free PE&lt;/strong>: &lt;code>0&lt;/code>&lt;/p>
&lt;ul>
&lt;li>This shows the number of free physical extents on the physical volume. In this case, there are no free extents left, meaning all available space has been allocated.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Allocated PE&lt;/strong>: &lt;code>7935&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The number of allocated physical extents, which are being used by logical volumes. Since all available extents are allocated, this number matches the total number of PEs.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>PV UUID&lt;/strong>: &lt;code>gMVNd5-peB1-uUX6-Rw28-4Ncb-mi1b-rDJR38&lt;/code>&lt;/p>
&lt;ul>
&lt;li>The unique identifier for this physical volume, which is used internally by LVM to track physical volumes across different systems or reboots.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h5 id="vgdisplay-needs-sudo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#vgdisplay-needs-sudo">vgdisplay: needs sudo&lt;/a>
&lt;/h5>
&lt;p>example output:&lt;/p>
&lt;pre>&lt;code> --- Volume group ---
VG Name vg_data
System ID
Format lvm2
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 99.99 GiB
PE Size 4.00 MiB
Total PE 25599
Alloc PE / Size 12800 / 50.00 GiB
Free PE / Size 12799 / 49.99 GiB
VG UUID hFwi0D-GTlv-NFjp-O2he-x8Yw-kfIa-c3QqX6
&lt;/code>&lt;/pre>
&lt;h5 id="lvdisplay-needs-sudo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lvdisplay-needs-sudo">lvdisplay: needs sudo&lt;/a>
&lt;/h5>
&lt;p>example output:&lt;/p>
&lt;pre>&lt;code> --- Logical volume ---
LV Path /dev/vg_data/lv_backup
LV Name lv_backup
VG Name vg_data
LV UUID B1q8Iq-0tWz-Fk0P-xwQ7-0T5T-QC3c-XcK5T1
LV Write Access read/write
LV Creation host, time hostname, 2024-10-08 12:00:00 +0000
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
&lt;/code>&lt;/pre>
&lt;h3 id="creating--carving-lvm">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#creating--carving-lvm">Creating &amp;amp; Carving LVM&lt;/a>
&lt;/h3>
&lt;h4 id="a-little-struggle-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#a-little-struggle-">A little struggle 😣&lt;/a>
&lt;/h4>
&lt;p>So I ran into several hurdles when putting this into practice with Proxmox.&lt;/p>
&lt;p>📍 Since I was using Proxmox the storage was already an LVM on account of it being a virtualized disk
Solution: I created a second storage volume in addition to sda, sdb was emulated as an SSD and RAW storage. Once this was set up I was able to initialize the process.&lt;/p>
&lt;p>📍 The demonstration lab suggested using /dev/xvd$disk the &amp;lsquo;x&amp;rsquo; relates to xcp-ng, a virtualization technology that differs from mine. I am using KVM and VirtIO on Proxmox so the naming convention would differ. so vdb would be a naming convention akin to this system.&lt;/p>
&lt;p>Ultimately, once I created this RAW SSD emulated storage I was able to move on.&lt;/p>
&lt;h4 id="the-steps">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-steps">The steps&lt;/a>
&lt;/h4>
&lt;h5 id="1-provisioning-the-physical-volume-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#1-provisioning-the-physical-volume-">1. Provisioning the Physical Volume ✅&lt;/a>
&lt;/h5>
&lt;p>sudo pvcreate /dev/sdb&lt;/p>
&lt;p>Output:
Physical volume &amp;ldquo;/dev/sdb&amp;rdquo; successfully created.&lt;/p>
&lt;p>Confirmed with: lsblk&lt;/p>
&lt;h5 id="2-provisioning-the-volume-group-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#2-provisioning-the-volume-group-">2. Provisioning the Volume Group ✅&lt;/a>
&lt;/h5>
&lt;p>sudo vgcreate examplegroup /dev/sdb&lt;/p>
&lt;p>Output:
Volume group &amp;ldquo;examplegroup&amp;rdquo; successfully created&lt;/p>
&lt;p>Confirmed with: vgdisplay&lt;/p>
&lt;h5 id="3-provisioning-the-actual-logical-volume-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#3-provisioning-the-actual-logical-volume-">3. Provisioning the actual Logical Volume ✅&lt;/a>
&lt;/h5>
&lt;p>sudo lvcreate -L 1G -n lv1 examplegroup&lt;/p>
&lt;pre>&lt;code> Logical volume &amp;quot;lv1&amp;quot; created.
&lt;/code>&lt;/pre>
&lt;p>Confirmed with: lvdisplay&lt;/p>
&lt;h6 id="4-formatting-a-logical-volume-with-a-fs--">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#4-formatting-a-logical-volume-with-a-fs--">4. Formatting a Logical Volume with a FS 💾 ✅&lt;/a>
&lt;/h6>
&lt;p>mkfs.ext4 /dev/mapper/lv1&lt;/p>
&lt;pre>&lt;code> mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 262144 4k blocks and 65536 inodes
filesystem UUID: a1b2c3d4-e5f6-789a-bcde-123456789abc
Superblock backups stored on blocks:
32768, 98304
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
&lt;/code>&lt;/pre>
&lt;h3 id="checking-remaining-vg-space">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#checking-remaining-vg-space">Checking remaining VG Space&lt;/a>
&lt;/h3>
&lt;p>Broadly:&lt;/p>
&lt;p>the &lt;strong>VGS&lt;/strong> command provides a summary of all Volume Groups and includes information about the free space.&lt;/p>
&lt;p>Looks like this:&lt;/p>
&lt;pre>&lt;code> VG #PV #LV #SN Attr VSize VFree
vg_data 2 3 0 wz--n- 199.99g 49.99g
&lt;/code>&lt;/pre>
&lt;p>More Specifically:&lt;/p>
&lt;p>The vgdisplay command will show this info as it pertains to a particular pv 👍&lt;/p>
&lt;h4 id="ultimately">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#ultimately">Ultimately&lt;/a>
&lt;/h4>
&lt;p>Thanks to putting our heads together in a studygroup, I was able to get through the completed process several times. I ended carving of a Volume Group into Logical Volumes. Some of which were formatted in Ext4 and some were formatted to XFS using MKFS. 😁&lt;/p>
&lt;p>The process was a little bit long with many tangential learning, ultimately I think this experience has deeply ingrained the process in my psyche, pushing out childhood memories of finger painting.&lt;/p>
&lt;h3 id="fstab">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#fstab">Fstab&lt;/a>
&lt;/h3>
&lt;p>I would like to return to Fstab and learn more about it. I ran into some issues mounting LVM&amp;rsquo;s with Fstab&lt;/p>
&lt;h3 id="lvs-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lvs-1">LVS&lt;/a>
&lt;/h3>
&lt;p>Logical Volume Summary provides a summary as the name implies of all logical volumes present in the system. I wish I had known this command earlier as I was using the other commands listed above 😄&lt;/p>
&lt;p>Example output:&lt;/p>
&lt;pre>&lt;code> LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_backup vg_data -wi-a----- 50.00g
lv_home vg_data -wi-ao---- 20.00g
lv_root vg_system -wi-ao---- 30.00g
&lt;/code>&lt;/pre>
&lt;h3 id="raid-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#raid-">RAID 💾💾💾&lt;/a>
&lt;/h3>
&lt;p>RAID stands for Redundant Array of Independent Disks, more on that below.&lt;/p>
&lt;p>Raw notes:&lt;/p>
&lt;p>Created a proxmox vm with rocky 9.4 minimal with 3 x raw ssd emulated disks&lt;/p>
&lt;p>MDADM&lt;/p>
&lt;hr>
&lt;h1 id="lecture-thoughts-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lecture-thoughts-">Lecture thoughts 🪩&lt;/a>
&lt;/h1>
&lt;h2 id="everything-is-a-file-after-all">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#everything-is-a-file-after-all">Everything &amp;lsquo;is&amp;rsquo; a file after all&lt;/a>
&lt;/h2>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU3/ahb.png" alt="Always has been a file">&lt;/p>
&lt;p>this past Saturday. During that lecture I had a major awakening in regards to how unix works. I have heard the &amp;rsquo;everything is a file&amp;rsquo; mantra on several occasions. However, sometimes hearing is not fully understanding. My moment of understanding came when we checked running processes and opened one as a file. I knew that everything under the hood was a file, but ephemeral things like processes were not part of the picture. That truly blew my mind 🤯&lt;/p>
&lt;h2 id="uuids-go-beyond-a-block-storage-device">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#uuids-go-beyond-a-block-storage-device">UUID&amp;rsquo;s go beyond a block storage device&lt;/a>
&lt;/h2>
&lt;p>It turns out that logical volumes are assigned UUIDs. UUIDs are unique strings that can be used to reference or link reliably to storage device. So logical volumes attain the same respect as physical volume.&lt;/p>
&lt;p>if I were to run&lt;/p>
&lt;ul>
&lt;li>&lt;code>bash blkid&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>or&lt;/p>
&lt;ul>
&lt;li>&lt;code>bash lvddisplay&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>one would see a string like this:&lt;/p>
&lt;p>f4d12857-93c3-4d6f-91e5-bb379f02e1d1&lt;/p>
&lt;p>More on this later, I went down a rabbit hole. 🐇&lt;/p>
&lt;hr>
&lt;h1 id="logical-volumes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#logical-volumes-">Logical Volumes 🧠💼&lt;/a>
&lt;/h1>
&lt;p>Logical Volumes (LVs) offer a flexible way to manage disk storage in Linux. With LVs, users can create, resize, and move storage volumes without being limited by the physical layout of the disks. The Logical Volume Manager (LVM) abstracts the underlying physical storage, making it easier to manage disk space, support snapshots, and resize volumes as needed.&lt;/p>
&lt;h3 id="the-layered-structure-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-layered-structure-">The Layered Structure 🍰&lt;/a>
&lt;/h3>
&lt;p>The structure of LVM involves multiple layers:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Physical Volumes (PV):&lt;/strong> These are the actual physical storage devices, like SSDs or HDDs. A Physical Volume can either be part of a Volume Group or encompass an entire Volume Group.&lt;/li>
&lt;li>&lt;strong>Volume Groups (VG):&lt;/strong> VGs are containers that hold one or more Logical Volumes. A Volume Group can span across multiple Physical Volumes, providing a flexible pool of storage.&lt;/li>
&lt;li>&lt;strong>Logical Volumes (LV):&lt;/strong> LVs are sections of a Volume Group that serve as the actual storage units. A Volume Group can contain many Logical Volumes of different sizes.&lt;/li>
&lt;li>&lt;strong>File Systems:&lt;/strong> Finally, file systems are placed on the Logical Volumes to store data.&lt;/li>
&lt;/ul>
&lt;p>The table below illustrates how a Volume Group (VG) can host several Logical Volumes (LVs) of varying sizes. Each Logical Volume is assigned a unique identifier (UUID), and snapshots are also given their own UUIDs.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>VG&lt;/th>
&lt;th>LV&lt;/th>
&lt;th>FS&lt;/th>
&lt;th>Size&lt;/th>
&lt;th>UUID Short&lt;/th>
&lt;th>Snapshot&lt;/th>
&lt;th>Snapshot UUID Short&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>vg_data&lt;/td>
&lt;td>lv_root&lt;/td>
&lt;td>XFS&lt;/td>
&lt;td>50 GB&lt;/td>
&lt;td>f4d1-91e5-bb37&lt;/td>
&lt;td>None&lt;/td>
&lt;td>N/A&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vg_data&lt;/td>
&lt;td>lv_home&lt;/td>
&lt;td>XFS&lt;/td>
&lt;td>100 GB&lt;/td>
&lt;td>a123-c567-8901&lt;/td>
&lt;td>snap_home&lt;/td>
&lt;td>abcd-ef56-7890&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vg_data&lt;/td>
&lt;td>lv_var&lt;/td>
&lt;td>ext4&lt;/td>
&lt;td>20 GB&lt;/td>
&lt;td>c9d8-89e0-f9a1&lt;/td>
&lt;td>None&lt;/td>
&lt;td>N/A&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vg_data&lt;/td>
&lt;td>lv_backup&lt;/td>
&lt;td>ext4&lt;/td>
&lt;td>150 GB&lt;/td>
&lt;td>f129-bc97-f134&lt;/td>
&lt;td>snap_backup&lt;/td>
&lt;td>f7d8-a67e-f765&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vg_data&lt;/td>
&lt;td>lv_logs&lt;/td>
&lt;td>XFS&lt;/td>
&lt;td>10 GB&lt;/td>
&lt;td>e123-9abc-e1d4&lt;/td>
&lt;td>None&lt;/td>
&lt;td>N/A&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vg_storage&lt;/td>
&lt;td>lv_media&lt;/td>
&lt;td>ext4&lt;/td>
&lt;td>200 GB&lt;/td>
&lt;td>bc97-bc9e-5612&lt;/td>
&lt;td>snap_media&lt;/td>
&lt;td>d98f-9e67-1cd2&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>I understand that this course focuses on the two most popular and reliable file systems, as these are the ones most commonly encountered in enterprise environments. However, I&amp;rsquo;ve noticed that BTRFs is starting to gain traction. I&amp;rsquo;ve listened to several talks and read extensively about its features and potential.&lt;/p>
&lt;h3 id="some-limitations-apply-to-the-status-quo">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#some-limitations-apply-to-the-status-quo">Some limitations apply to the status quo&lt;/a>
&lt;/h3>
&lt;p>Both ext4 and XFS subvolumes can handle a lot of scenarios. This includes online resizing. This is when the size of an LVM must be increased while actively in use (Online). However, for both of these filesystems, online resizing can only grow and LVM and not shrink. Additionally snapshots must be managed on a per LV basis, not a huge issue with the advent of automation tools.&lt;/p>
&lt;h1 id="raid">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#raid">RAID&lt;/a>
&lt;/h1>
&lt;h3 id="intro-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#intro-1">Intro&lt;/a>
&lt;/h3>
&lt;p>RAID stands for Redundant Array of Independent Disks (originally Redundant Array of Inexpensive Disks). It is a data storage technology that combines multiple physical disk drives into a single logical unit to improve performance, increase capacity, or provide redundancy to protect data against drive failures.&lt;/p>
&lt;h3 id="how-it-differs-from-lvm">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#how-it-differs-from-lvm">How it differs from LVM&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>RAID is primarily for redundancy and performance.&lt;/li>
&lt;li>RAID works at a block level across discs.&lt;/li>
&lt;li>So it is sometimes used to create a high capacity pool.&lt;/li>
&lt;/ul>
&lt;h3 id="multiple-configurations">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#multiple-configurations">Multiple configurations&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>There are configurations for differing degrees of performance&lt;/li>
&lt;li>There are configurations for different levels of redundancy&lt;/li>
&lt;/ul>
&lt;h3 id="comparison-table">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#comparison-table">Comparison Table&lt;/a>
&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;strong>RAID Level&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Performance&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Redundancy&lt;/strong>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>RAID 0&lt;/td>
&lt;td>Data striping without parity or mirroring.&lt;/td>
&lt;td>High (fast read/write speeds)&lt;/td>
&lt;td>None (no redundancy)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 1&lt;/td>
&lt;td>Mirroring of data across two or more disks.&lt;/td>
&lt;td>Moderate (read speed improves, write speed similar to single disk)&lt;/td>
&lt;td>High (data is mirrored)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 5&lt;/td>
&lt;td>Block-level striping with distributed parity.&lt;/td>
&lt;td>Moderate (improved read speeds, slower writes due to parity calculation)&lt;/td>
&lt;td>Moderate (can tolerate 1 disk failure)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 6&lt;/td>
&lt;td>Block-level striping with dual parity.&lt;/td>
&lt;td>Moderate (similar to RAID 5, but slower writes)&lt;/td>
&lt;td>High (can tolerate 2 disk failures)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 10&lt;/td>
&lt;td>Striping across mirrored sets (combines RAID 1 and RAID 0).&lt;/td>
&lt;td>High (fast read/write due to striping and redundancy)&lt;/td>
&lt;td>High (can tolerate multiple disk failures depending on which disks fail)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 50&lt;/td>
&lt;td>RAID 5 arrays striped (combines RAID 5 and RAID 0).&lt;/td>
&lt;td>High (fast read speeds, but slower writes)&lt;/td>
&lt;td>Moderate (can tolerate up to 1 disk failure in each RAID 5 array)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 60&lt;/td>
&lt;td>RAID 6 arrays striped (combines RAID 6 and RAID 0).&lt;/td>
&lt;td>High (fast reads, slower writes due to dual parity)&lt;/td>
&lt;td>Very High (can tolerate up to 2 disk failures in each RAID 6 array)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAID 1+0&lt;/td>
&lt;td>Nested RAID 1 over RAID 0 (mirroring across striped sets).&lt;/td>
&lt;td>High (similar to RAID 10)&lt;/td>
&lt;td>High (similar to RAID 10)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="software--hardware-raid">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#software--hardware-raid">Software &amp;amp; Hardware Raid&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Software RAID is when the host Operating System maintains the linking and syncing.&lt;/li>
&lt;li>Hardware RAID is when a dedicated device does this. For example a PCI raid controller.
&lt;img src="https://upload.wikimedia.org/wikipedia/commons/9/96/Compaq_SystemPro_Server_RAID_Controller_100_2425.jpg" alt="Older RAID Controller Card">&lt;/li>
&lt;/ul>
&lt;h3 id="a-software-raid-is">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#a-software-raid-is">A software RAID is:&lt;/a>
&lt;/h3>
&lt;p>is running as a general task through the CPU. With multi-core/thread processors and more robust process handling, software RAID is more reliable than in the past.
Advantages:&lt;/p>
&lt;ul>
&lt;li>Portable 🦶&lt;/li>
&lt;li>Flexible 🧘&lt;/li>
&lt;li>Cost Effective 💰&lt;/li>
&lt;/ul>
&lt;h3 id="hardware-raid-is">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#hardware-raid-is">Hardware RAID is:&lt;/a>
&lt;/h3>
&lt;p>Application specific hardware like a RAID Controller always has the potential to be more performant and reliable. But this is mfg. dependent, the good ones tend to be expensive (such as life) 💸&lt;/p>
&lt;ul>
&lt;li>Performant* 🏎️&lt;/li>
&lt;li>Reliable* ⏳&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="other-filesystem-researchwriting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#other-filesystem-researchwriting">Other Filesystem research/writing&lt;/a>
&lt;/h1>
&lt;h3 id="btrfs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#btrfs">Btrfs&lt;/a>
&lt;/h3>
&lt;p>I wrote an entire separate article about B-Tree FileSystem as I find it interesting &lt;a href="https://trevorsmale.github.io/techblog/post/btrfs/">Link to Btrfs article&lt;/a>&lt;/p>
&lt;h3 id="linux-filesystem-comparison">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#linux-filesystem-comparison">Linux Filesystem Comparison&lt;/a>
&lt;/h3>
&lt;p>I find file-systems really interesting. Recently I made a huge note comparing the major FileSystems.
&lt;a href="https://trevorsmale.github.io/techblog/post/fs/">Link to FileSystems note/article&lt;/a>&lt;/p>
&lt;h3 id="linux-filesystem-timeline">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#linux-filesystem-timeline">Linux Filesystem Timeline&lt;/a>
&lt;/h3>
&lt;p>This timeline may help illuminate how filesystems incrementally improve over time.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Year&lt;/th>
&lt;th>Milestone&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1993&lt;/td>
&lt;td>&lt;strong>ext2&lt;/strong> filesystem development begins.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1994&lt;/td>
&lt;td>&lt;strong>ext2&lt;/strong> released with Linux Kernel 1.0.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>1994&lt;/td>
&lt;td>&lt;strong>XFS&lt;/strong> first developed by SGI for IRIX.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2001&lt;/td>
&lt;td>&lt;strong>ext3&lt;/strong> released, introducing journaling.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2001&lt;/td>
&lt;td>&lt;strong>XFS&lt;/strong> ported to Linux.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2006&lt;/td>
&lt;td>Development of &lt;strong>ext4&lt;/strong> begins to extend the capabilities of ext3.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2007&lt;/td>
&lt;td>&lt;strong>BTRFs&lt;/strong> development announced by Oracle.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2008&lt;/td>
&lt;td>&lt;strong>ext4&lt;/strong> marked as stable in Linux Kernel 2.6.28.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2009&lt;/td>
&lt;td>&lt;strong>BTRFs&lt;/strong> included in Linux Kernel 2.6.29 as an experimental filesystem.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2009&lt;/td>
&lt;td>&lt;strong>XFS&lt;/strong> officially included in Linux Kernel 2.6.36.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2010&lt;/td>
&lt;td>&lt;strong>ext4&lt;/strong> becomes the default filesystem for many Linux distributions, including Ubuntu and Fedora.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2012&lt;/td>
&lt;td>&lt;strong>BTRFs&lt;/strong> adopted by SUSE Linux Enterprise Server.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2014&lt;/td>
&lt;td>&lt;strong>XFS&lt;/strong> becomes the default filesystem in &lt;strong>RHEL 7&lt;/strong>.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2014&lt;/td>
&lt;td>Fedora starts offering &lt;strong>BTRFs&lt;/strong> as an option.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2020&lt;/td>
&lt;td>Fedora 33 makes &lt;strong>BTRFs&lt;/strong> the default filesystem.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h1 id="crisis-management-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#crisis-management-">Crisis Management 🔥🧯&lt;/a>
&lt;/h1>
&lt;h3 id="intro-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#intro-2">Intro&lt;/a>
&lt;/h3>
&lt;p>I read a chapter from googles security handbook focused on responding to a security incident.
This chapter covers a wide range of information including common mistakes, templates etcc&amp;hellip; Scott has asked us to pull keywords that may help us better triage an incident. I decided to extend this to creating an incident response checklist for future reference. This order of the list slightly differs from that of the article, yet I think it summarizes the chapter well.&lt;/p>
&lt;h3 id="overview-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#overview-">Overview 🔍&lt;/a>
&lt;/h3>
&lt;p>Effective crisis management requires taking command and maintaining control of an incident. The outcome of a security incident largely depends on how well your organization prepares and responds, a process referred to as &lt;strong>incident response (IR) capability&lt;/strong>.&lt;/p>
&lt;h3 id="transparency-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#transparency-">Transparency 🔮&lt;/a>
&lt;/h3>
&lt;p>Transparency is key in managing incidents, particularly in light of regulations such as GDPR and service contracts. Customers are continually pushing the boundaries for how quickly investigations must begin, progress, and be resolved. Organizations are often expected to respond to potential security problems within &lt;strong>24 hours or less&lt;/strong>.&lt;/p>
&lt;p>As the saying goes: &lt;em>&amp;ldquo;There are only two types of companies: those that know they&amp;rsquo;ve been compromised, and those that don&amp;rsquo;t know.&amp;rdquo;&lt;/em>&lt;/p>
&lt;h3 id="steps-of-crisis-management-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#steps-of-crisis-management-">Steps of Crisis Management 🪜&lt;/a>
&lt;/h3>
&lt;h4 id="1-triage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#1-triage-">1. Triage 🥼&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>The First Step: Don’t Panic!&lt;/strong> Not every incident is a crisis.&lt;/li>
&lt;li>Differentiate between &lt;strong>compromises&lt;/strong> and &lt;strong>bugs&lt;/strong>.&lt;/li>
&lt;li>Make educated and informed assumptions about the severity and potential consequences of the incident.
&lt;ul>
&lt;li>What data might be accessible to someone on the compromised system?&lt;/li>
&lt;li>What trust relationships does the potentially compromised system have with other systems?&lt;/li>
&lt;li>Are there compensating controls that an attacker would also have to penetrate?&lt;/li>
&lt;li>Does the attack seem to be &lt;strong>commodity opportunistic malware&lt;/strong>?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h4 id="2-manage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#2-manage-">2. Manage 🧠&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Establish Your Incident Team:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Management Liaison:&lt;/strong> Coordinate between the technical team and upper management.&lt;/li>
&lt;li>&lt;strong>Incident Commander (IC):&lt;/strong> Ultimately responsible for ensuring that rules around confidentiality are set, communicated, and followed.&lt;/li>
&lt;li>&lt;strong>Operations Coordinator (OC):&lt;/strong> Coordinate the technical side of the incident response.&lt;/li>
&lt;li>&lt;strong>Legal Lead:&lt;/strong> Ensure the response complies with legal obligations.&lt;/li>
&lt;li>&lt;strong>Communications Lead:&lt;/strong> Ensure internal and external communications are clear and effective.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Guidelines for Management:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Maintain a clear line of command.&lt;/li>
&lt;li>Designate clearly defined roles.&lt;/li>
&lt;li>Keep a working record of debugging and mitigation steps as you go.&lt;/li>
&lt;li>Declare incidents early and often.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h4 id="3-declare-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#3-declare-">3. Declare 📣&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Declare incidents as soon as they are recognized to ensure early containment and response.&lt;/li>
&lt;/ul>
&lt;h4 id="4-communicate-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#4-communicate-">4. Communicate ☎️&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Avoid Misunderstandings&lt;/strong>: Ensure that all parties are aligned on the severity and impact of the incident.&lt;/li>
&lt;li>&lt;strong>Avoid Hedging&lt;/strong>: Be clear and concise in communication, avoiding ambiguity.&lt;/li>
&lt;li>&lt;strong>Meetings&lt;/strong>: Hold regular update meetings to ensure that the team and stakeholders are aware of the incident&amp;rsquo;s progress and next steps.&lt;/li>
&lt;/ul>
&lt;h4 id="5-operational-security-opsec-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#5-operational-security-opsec-">5. Operational Security (OpSec) 🥷&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>OpSec&lt;/strong> refers to the practice of keeping your response activities confidential.
&lt;ul>
&lt;li>Use secure lines of communication.&lt;/li>
&lt;li>Avoid interacting directly with affected networks or components.&lt;/li>
&lt;li>Lock down affected accounts immediately.&lt;/li>
&lt;li>Shut down compromised systems to prevent further damage.&lt;/li>
&lt;li>Use different credentials when interacting with compromised systems.&lt;/li>
&lt;li>Ensure the right people are informed with the correct level of detail about the incident.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h4 id="6-investigate-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#6-investigate-">6. Investigate 🕵&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Follow the &lt;strong>OODA Loop&lt;/strong>: Observe, Orient, Decide, and Act.
&lt;ul>
&lt;li>&lt;strong>Forensic Imaging&lt;/strong>: Capture system images for later analysis.&lt;/li>
&lt;li>&lt;strong>Memory Imaging&lt;/strong>: Capture the contents of system memory.&lt;/li>
&lt;li>&lt;strong>File Carving&lt;/strong>: Extract useful files from data storage.&lt;/li>
&lt;li>&lt;strong>Log Analysis&lt;/strong>: Analyze system logs to identify suspicious activity.&lt;/li>
&lt;li>&lt;strong>Malware Analysis&lt;/strong>: Dissect malware to understand its function.&lt;/li>
&lt;li>&lt;strong>Sharding the Investigation&lt;/strong>: Divide the investigation into manageable parts.&lt;/li>
&lt;li>&lt;strong>Parallelize the Incident&lt;/strong>: Have different teams working on different aspects of the investigation simultaneously.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h4 id="7-handover-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#7-handover-">7. Handover ⛓️&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Properly hand over any remaining tasks or investigations to ensure nothing is overlooked as the incident winds down.&lt;/li>
&lt;/ul>
&lt;h4 id="8-remediate-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#8-remediate-">8. Remediate 🛠️&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Fix vulnerabilities and mitigate damage to prevent future incidents. Implement long-term security measures.&lt;/li>
&lt;/ul>
&lt;h4 id="9-close-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#9-close-">9. Close 📒&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>Close the incident formally. Review what went well, what could have been better, and document the lessons learned for future incidents.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="high-availability-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#high-availability-">High Availability ⚓️&lt;/a>
&lt;/h1>
&lt;p>refers to the design and implementation of systems, services, or applications to minimize downtime and ensure continuous operation.
The goal of high availability is to ensure that a system is accessible and operational for the maximum possible amount of time.&lt;/p>
&lt;hr>
&lt;h2 id="key-terms-in-ha-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#key-terms-in-ha-">Key Terms in HA 🔑&lt;/a>
&lt;/h2>
&lt;h3 id="1-uptime--downtime-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#1-uptime--downtime-">1. Uptime &amp;amp; Downtime ↕️&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Uptime&lt;/strong>: The period during which a system is fully operational and accessible to users.&lt;/li>
&lt;li>&lt;strong>Downtime&lt;/strong>: The period during which the system is unavailable or not functioning as expected. HA systems aim to minimize downtime as much as possible.&lt;/li>
&lt;/ul>
&lt;h3 id="2-redundancy-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#2-redundancy-">2. Redundancy 👯&lt;/a>
&lt;/h3>
&lt;p>Redundancy refers to duplicating critical components or functions of a system to increase reliability. In HA systems, components like servers, databases, or networks are replicated so that if one fails, another can take over seamlessly.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Active-Active Redundancy&lt;/strong>: Multiple systems work simultaneously, and if one fails, the others continue without interruption.&lt;/li>
&lt;li>&lt;strong>Active-Passive Redundancy&lt;/strong>: A primary system works actively, while a backup system remains idle until a failure occurs.&lt;/li>
&lt;/ul>
&lt;h3 id="3-failover-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#3-failover-">3. Failover 🛤️🛤️🛤️&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Failover&lt;/strong> is the process of switching to a standby or backup system when the primary system fails. In HA setups, failover is often automatic to minimize disruption. &lt;strong>Failback&lt;/strong> refers to switching back to the primary system after recovery.&lt;/p>
&lt;h3 id="4-load-balancing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#4-load-balancing-">4. Load Balancing ⚖️&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Load balancing&lt;/strong> distributes network or application traffic across multiple servers to ensure that no single server becomes overwhelmed. It enhances both performance and availability by balancing the load and rerouting traffic in case of server failures.&lt;/p>
&lt;h3 id="5-elastic-scaling-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#5-elastic-scaling-">5. Elastic Scaling 🎋&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Elastic scaling&lt;/strong> is the ability to automatically adjust resource capacity (compute, memory, etc.) based on workload demand. This is crucial for HA, as it prevents resource exhaustion during peak loads and reduces costs during low-demand periods.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Horizontal Scaling (Scaling Out)&lt;/strong>: Adding more instances/servers to distribute load.&lt;/li>
&lt;li>&lt;strong>Vertical Scaling (Scaling Up)&lt;/strong>: Increasing the resources of a single instance.&lt;/li>
&lt;li>&lt;strong>Auto-scaling&lt;/strong>: Automatic scaling based on real-time metrics.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>In Kubernetes&lt;/strong>, elastic scaling is managed through &lt;strong>Horizontal Pod Autoscalers (HPA)&lt;/strong>, which automatically scale the number of pods in a deployment based on observed CPU utilization or other metrics. In HA systems using Kubernetes, autoscaling ensures that the right amount of resources are always allocated based on demand, contributing to both high performance and availability.&lt;/p>
&lt;h3 id="6-fault-tolerance-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#6-fault-tolerance-">6. Fault Tolerance 🤦‍♂️😅&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Fault tolerance&lt;/strong> refers to the system&amp;rsquo;s ability to continue operating correctly even when one or more components fail. Fault-tolerant systems detect, isolate, and handle faults without causing downtime.&lt;/p>
&lt;h3 id="7-cluster-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#7-cluster-">7. Cluster 🧑‍🍳🧑‍🍳🧑‍🍳🧑‍🍳&lt;/a>
&lt;/h3>
&lt;p>A &lt;strong>cluster&lt;/strong> is a group of servers or nodes working together as a single system to provide HA. Clustering ensures that if one node in the cluster fails, another node takes over its tasks, maintaining service availability.&lt;/p>
&lt;p>In &lt;strong>Kubernetes&lt;/strong>, a cluster consists of a set of worker machines, called &lt;strong>nodes&lt;/strong>, that run containerized applications. Kubernetes ensures high availability by distributing workloads across multiple nodes and automatically replacing failed nodes or restarting containers.&lt;/p>
&lt;p>In &lt;strong>Warewulf&lt;/strong>, a cluster provisioning tool, high availability is addressed by enabling systems to quickly re-deploy compute nodes. Warewulf helps manage HA in high-performance computing (HPC) environments by ensuring compute nodes are readily available for workloads in case of node failure or maintenance.&lt;/p>
&lt;h3 id="8-replication-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#8-replication-">8. Replication 💾💾💾&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Replication&lt;/strong> is the process of duplicating data across multiple storage systems or servers. In HA, replication ensures that a copy of data exists on multiple systems, so if one system fails, another can continue providing access to the same data.&lt;/p>
&lt;h3 id="9-disaster-recovery-dr-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#9-disaster-recovery-dr-">9. Disaster Recovery (DR) 📉📈&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Disaster recovery&lt;/strong> involves strategies to restore a system after a catastrophic failure (e.g., data center failure). DR usually includes off-site backups and failover to remote data centers.&lt;/p>
&lt;h3 id="10-mean-time-between-failures-mtbf-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#10-mean-time-between-failures-mtbf-">10. Mean Time Between Failures (MTBF) ⏱️&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>MTBF&lt;/strong> measures the average time between system failures. A higher MTBF indicates a more reliable system.&lt;/p>
&lt;h3 id="11-mean-time-to-repair-mttr-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#11-mean-time-to-repair-mttr-">11. Mean Time to Repair (MTTR) ⏱️🛠️&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>MTTR&lt;/strong> measures how long it takes to restore a system to full functionality after a failure. Minimizing MTTR is critical for reducing downtime in HA systems.&lt;/p>
&lt;h3 id="12-quorum-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#12-quorum-">12. Quorum 🐾&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Quorum&lt;/strong> is the minimum number of nodes or components in a distributed system that must agree or function correctly to maintain availability. Quorum is often required in cluster setups to ensure consistent operation.&lt;/p>
&lt;h3 id="13-geographic-redundancy-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#13-geographic-redundancy-">13. Geographic Redundancy 🌎&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Geographic redundancy&lt;/strong> involves deploying systems across multiple geographical locations or data centers. This ensures that services remain available even if a region experiences a failure (e.g., due to natural disasters or power outages).&lt;/p>
&lt;h2 id="relation-to-kubernetes-and-warewulf">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#relation-to-kubernetes-and-warewulf">Relation to Kubernetes and Warewulf&lt;/a>
&lt;/h2>
&lt;p>I wanted to look at Kubernetes and Warewulf and how they relate to this topic as they are both systems written with GO and they are both well liked systems relating to HA.&lt;/p>
&lt;p>I will write a future article all about GO and why it is fantastic at a later date. So I will just leave this point for now.&lt;/p>
&lt;p>-A language built by the progenitors of UNIX and C for diverse connected systems.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Kubernetes&lt;/strong> 🍀:
automated failover
container orchestration
elastic scaling with Horizontal Pod Autoscalers
and geographic redundancy through multi-region clusters.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Warewulf&lt;/strong> 🐺: In HPC environments, &lt;strong>Warewulf&lt;/strong> aids in HA by managing node provisioning and monitoring the health of the compute nodes. In case of failures, Warewulf can quickly re-deploy nodes, ensuring that the overall HPC workload is minimally disrupted.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Kubernetes and Warewulf both play key roles in maintaining high availability in modern infrastructures, with Kubernetes focusing on containerized applications and Warewulf on HPC cluster management.&lt;/p>
&lt;h2 id="ha--incident-triage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#ha--incident-triage-">HA &amp;amp; Incident Triage 🚨&lt;/a>
&lt;/h2>
&lt;p>High Availability (HA) systems improve operational security, allowing precise triage due to these factors:&lt;/p>
&lt;h3 id="1-continuous-monitoring">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#1-continuous-monitoring">1. Continuous Monitoring&lt;/a>
&lt;/h3>
&lt;p>HA systems continuously monitor performance to detect security threats in real time.&lt;/p>
&lt;h3 id="2-continuous-comprehensive-logging">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#2-continuous-comprehensive-logging">2. Continuous Comprehensive Logging&lt;/a>
&lt;/h3>
&lt;p>Logs are centralized, providing full visibility across the system for quick forensic analysis.&lt;/p>
&lt;h3 id="3-declarative-structure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#3-declarative-structure">3. Declarative Structure&lt;/a>
&lt;/h3>
&lt;p>Declarative configurations enable automated remediation scripts for rapid self-healing.&lt;/p>
&lt;h3 id="4-automated-alerting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#4-automated-alerting">4. Automated Alerting&lt;/a>
&lt;/h3>
&lt;p>Automated alerts prioritize and notify teams of security incidents as they happen.&lt;/p>
&lt;p>Beyond triage, HA systems offer several other security benefits:&lt;/p>
&lt;h3 id="5-containerized-components">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#5-containerized-components">5. Containerized Components&lt;/a>
&lt;/h3>
&lt;p>Microservices are isolated, allowing affected components to be restarted without system-wide impact.&lt;/p>
&lt;h3 id="6-elastic-scaling">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#6-elastic-scaling">6. Elastic Scaling&lt;/a>
&lt;/h3>
&lt;p>HA systems dynamically scale resources to handle traffic spikes or increased workloads securely.&lt;/p>
&lt;h3 id="7-automated-failover">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#7-automated-failover">7. Automated Failover&lt;/a>
&lt;/h3>
&lt;p>Automated failover isolates compromised components, ensuring continuous uptime during incidents.&lt;/p>
&lt;h3 id="8-data-replication-by-design">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#8-data-replication-by-design">8. Data Replication by Design&lt;/a>
&lt;/h3>
&lt;p>Multiple data copies prevent loss and aid in disaster recovery during security breaches.&lt;/p>
&lt;h3 id="9-event-replay">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#9-event-replay">9. Event Replay&lt;/a>
&lt;/h3>
&lt;p>Event replay allows security teams to analyze incidents for better future defense.&lt;/p>
&lt;hr>
&lt;h2 id="lessons-learned-about-ha">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#lessons-learned-about-ha">Lessons Learned about HA&lt;/a>
&lt;/h2>
&lt;p>What I have learned from reading articles, searching and compiling these notes.&lt;/p>
&lt;h3 id="the-why">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-why">The Why&lt;/a>
&lt;/h3>
&lt;p>In today’s world, data is ingested, processed, and distributed at an unprecedented rate. To keep up, we must implement systems that operate with the same speed and frequency. The era of handling sequential tasks one at a time is over. High availability solutions such as Kubernetes, declarative infrastructure, cluster management, and stateless automation are now essential in modern IT environments.&lt;/p>
&lt;p>Although some developers, administrators, and engineers express concerns about the complexity of these deployments, preferring simpler solutions, the reality is that we need to adapt to the increasing demands of data availability and security. Setting up a robust infrastructure now may have a higher initial labor cost, but it will undoubtedly reduce the risk of costly security incidents and system downtime in the future.&lt;/p>
&lt;h3 id="the-what">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-what">The What&lt;/a>
&lt;/h3>
&lt;p>The systems we must focus on include:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Kubernetes&lt;/strong> for orchestrating containerized applications across clusters&lt;/li>
&lt;li>&lt;strong>Declarative Infrastructure&lt;/strong> using Infrastructure-as-Code (IaC) for consistent and scalable deployments&lt;/li>
&lt;li>&lt;strong>Cluster Management&lt;/strong> to efficiently manage and scale distributed systems&lt;/li>
&lt;li>&lt;strong>Stateless Automation&lt;/strong> to ensure systems can self-heal and adapt quickly without human intervention&lt;/li>
&lt;/ul>
&lt;p>These technologies form the backbone of high availability infrastructures, designed to handle vast amounts of data without compromising performance or uptime.&lt;/p>
&lt;h3 id="the-how">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-how">The How&lt;/a>
&lt;/h3>
&lt;p>To implement these solutions, organizations should:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Automate deployment processes&lt;/strong> using tools like Terraform or Ansible to ensure repeatability and reliability.&lt;/li>
&lt;li>&lt;strong>Leverage Kubernetes clusters&lt;/strong> to manage microservices architectures, enabling fast scaling and robust fault tolerance.&lt;/li>
&lt;li>&lt;strong>Adopt a declarative approach&lt;/strong> by defining infrastructure states in code, allowing easier management and version control of systems.&lt;/li>
&lt;li>&lt;strong>Utilize stateless automation&lt;/strong> to reduce system reliance on individual components, making the system more resilient to failure and able to recover without manual intervention.&lt;/li>
&lt;/ul>
&lt;p>By adopting these practices, companies can build resilient, secure, and scalable infrastructures that meet the demands of today’s fast-paced data environments.&lt;/p>
&lt;h2 id="ha-and-sir-synergy">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#ha-and-sir-synergy">HA and SIR Synergy&lt;/a>
&lt;/h2>
&lt;h3 id="the-why-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-why-1">The Why&lt;/a>
&lt;/h3>
&lt;p>As organizations become increasingly reliant on digital systems, security incidents are inevitable. Data breaches, malware attacks, and system vulnerabilities pose significant risks that can lead to costly downtime, reputational damage, and legal consequences. In this high-availability (HA) era, where uninterrupted service is critical, an effective &lt;strong>Security Incident Response (SIR)&lt;/strong> plan is more important than ever.&lt;/p>
&lt;h3 id="the-what-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-what-1">The What&lt;/a>
&lt;/h3>
&lt;p>At its core, &lt;strong>Security Incident Response (SIR)&lt;/strong> involves:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Identifying&lt;/strong> and responding to potential security incidents in real time&lt;/li>
&lt;li>&lt;strong>Containing&lt;/strong> incidents to prevent further damage and preserve critical systems&lt;/li>
&lt;li>&lt;strong>Eradicating&lt;/strong> malicious activity from systems quickly and efficiently&lt;/li>
&lt;li>&lt;strong>Recovering&lt;/strong> compromised systems and restoring operations to normal&lt;/li>
&lt;li>&lt;strong>Reviewing and improving&lt;/strong> security protocols based on lessons learned from incidents&lt;/li>
&lt;/ul>
&lt;p>In high-availability environments, this process works hand in hand with:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Failover mechanisms&lt;/strong> that redirect traffic or services away from compromised systems to maintain uptime&lt;/li>
&lt;li>&lt;strong>Resilient architectures&lt;/strong> where services are spread across clusters, reducing the impact of a security breach on overall operations&lt;/li>
&lt;li>&lt;strong>Automated remediation&lt;/strong> that helps detect and respond to threats before they cause major disruptions&lt;/li>
&lt;/ul>
&lt;p>Together, SIR and HA form a dual-layer defense to keep systems running while actively dealing with security threats.&lt;/p>
&lt;h3 id="the-how-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#the-how-1">The How&lt;/a>
&lt;/h3>
&lt;p>For Security Incident Response to effectively complement high availability, organizations should:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Implement proactive monitoring and detection&lt;/strong>: Use tools like SIEM (Security Information and Event Management)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Prepare for containment and isolation&lt;/strong>: High availability systems should be designed with segmentation in mind&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Automate incident response and failover&lt;/strong>: Automate responses to specific types of threats, such as deploying firewalls, initiating backups, or failing over to standby systems.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Maintain constant communication&lt;/strong>: SIR teams should work closely with HA engineers to ensure that any security measures (e.g., shutting down affected systems) do not inadvertently cause a service disruption.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Review and test regularly&lt;/strong>: Just as HA systems undergo regular testing for failovers, security incident response plans should be tested in simulated scenarios.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="why-study-failure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#why-study-failure">Why study failure?&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Proactive Prevention&lt;/strong> 🛠️: Identifying potential failure points allows you to take preventive measures and avoid system outages.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Faster Recovery&lt;/strong> 🚑: Knowing how systems can fail enables quicker response and minimizes downtime with a tested failover plan.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Resilience Building&lt;/strong> 🛡️: Understanding failure mechanisms helps design architectures that automatically handle issues, ensuring better uptime.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Risk Management&lt;/strong> ⚖️: Acknowledging failure risks helps balance uptime goals with realistic risk management and avoids catastrophic downtime.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="service-level-objectives-slos-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#service-level-objectives-slos-">Service Level Objectives (SLOs) 🎯&lt;/a>
&lt;/h1>
&lt;h2 id="intro-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#intro-3">Intro&lt;/a>
&lt;/h2>
&lt;p>Service Level Objectives (SLOs) are specific, measurable targets 📊 that define the expected performance or quality level of a service, typically included in Service Level Agreements (SLAs). They help ensure services meet customer expectations by setting clear benchmarks for key metrics like reliability, availability, and response time.&lt;/p>
&lt;p>SLOs help teams prioritize work, manage resources, and drive decisions based on real performance data. 🔧&lt;/p>
&lt;p>Check out Google&amp;rsquo;s guide to SLOs &lt;a href="https://sre.google/workbook/implementing-slos/">here&lt;/a>.&lt;/p>
&lt;h3 id="bad-operations-badops-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#bad-operations-badops-">Bad Operations (BadOps) ⚠️&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>The unspoken rule of 100% uptime is a myth ❌.&lt;/li>
&lt;li>100% uptime ≠ 100% reliability.&lt;/li>
&lt;li>Each extra “nine” of uptime comes at a significant cost 💸.&lt;/li>
&lt;/ul>
&lt;h3 id="why-have-slos-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#why-have-slos-">Why Have SLOs? 🤔&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Engineers are scarce 🧑‍💻: Impossible standards require more resources.&lt;/li>
&lt;li>They inform decisions: The opportunity cost of reliability is clear with an objective.&lt;/li>
&lt;li>SREs aren&amp;rsquo;t just automation experts; they&amp;rsquo;re driven by SLOs 🚀.&lt;/li>
&lt;li>SLOs help prioritize tasks effectively 📋.&lt;/li>
&lt;li>They define &lt;strong>error budgets&lt;/strong> to manage acceptable failure rates.&lt;/li>
&lt;/ul>
&lt;h1 id="service-level-indicators-slis-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#service-level-indicators-slis-">Service Level Indicators (SLIs) 📏&lt;/a>
&lt;/h1>
&lt;h2 id="intro-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#intro-4">Intro&lt;/a>
&lt;/h2>
&lt;p>A Service Level Indicator (SLI) is a specific, quantifiable metric 🔢 used to measure the performance of a service, often forming the foundation of SLOs.&lt;/p>
&lt;h3 id="setting-a-solid-sli-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#setting-a-solid-sli-">Setting a Solid SLI ⚖️&lt;/a>
&lt;/h3>
&lt;p>Two out of five of these factors can be used to form a ratio that serves as a target SLI:&lt;/p>
&lt;ul>
&lt;li>Number of successful HTTP requests / total HTTP requests (success rate) 🌐.&lt;/li>
&lt;li>Number of gRPC calls completed in under 100ms / total gRPC requests ⏱️.&lt;/li>
&lt;li>Number of search results using the entire data set / total search results, including gracefully degraded ones 🔍.&lt;/li>
&lt;li>Number of stock check requests with data fresher than 10 minutes / total stock check requests 🛒.&lt;/li>
&lt;li>Number of “good user minutes” based on defined criteria / total user minutes 📅.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="glossary-of-terms-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#glossary-of-terms-">Glossary of Terms 🙊&lt;/a>
&lt;/h2>
&lt;p>These are additional terms I have become familiar with that were not covered in this units notes but relayed by Scott.&lt;/p>
&lt;h3 id="five-9s">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#five-9s">Five 9’s&lt;/a>
&lt;/h3>
&lt;p>Refers to 99.999% availability, meaning less than 5 minutes of downtime per year.&lt;/p>
&lt;h3 id="single-point-of-failure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#single-point-of-failure">Single point of failure&lt;/a>
&lt;/h3>
&lt;p>A component in a system whose failure will cause the entire system to fail.&lt;/p>
&lt;h3 id="key-performance-indicators">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#key-performance-indicators">Key Performance Indicators&lt;/a>
&lt;/h3>
&lt;p>Metrics used to measure the performance and effectiveness of a system or service.&lt;/p>
&lt;h3 id="sli-service-level-indicator">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#sli-service-level-indicator">SLI (Service Level Indicator)&lt;/a>
&lt;/h3>
&lt;p>A specific, quantifiable metric used to measure the performance of a service (e.g., latency, uptime).&lt;/p>
&lt;h3 id="slo-service-level-objective">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#slo-service-level-objective">SLO (Service Level Objective)&lt;/a>
&lt;/h3>
&lt;p>A target or goal for an SLI, defining acceptable performance for a service.&lt;/p>
&lt;h3 id="sla-service-level-agreement">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#sla-service-level-agreement">SLA (Service Level Agreement)&lt;/a>
&lt;/h3>
&lt;p>A formal contract that defines the level of service expected between a provider and a customer, including penalties for not meeting SLOs.&lt;/p>
&lt;h3 id="active-standby">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#active-standby">Active-Standby&lt;/a>
&lt;/h3>
&lt;p>A redundancy setup where one component is active while another remains on standby to take over if the active one fails.&lt;/p>
&lt;h3 id="active-active">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#active-active">Active-Active&lt;/a>
&lt;/h3>
&lt;p>A redundancy setup where multiple components work simultaneously to share the load, and failure in one component is covered by the others.&lt;/p>
&lt;h3 id="mttd-mean-time-to-detect">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#mttd-mean-time-to-detect">MTTD (Mean Time to Detect)&lt;/a>
&lt;/h3>
&lt;p>The average time it takes to detect a failure or incident in a system.&lt;/p>
&lt;h3 id="mttr-mean-time-to-repair">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#mttr-mean-time-to-repair">MTTR (Mean Time to Repair)&lt;/a>
&lt;/h3>
&lt;p>The average time it takes to recover from a failure or incident once it has been detected.&lt;/p>
&lt;h3 id="mtbf-mean-time-between-failures-mentioned-once">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#mtbf-mean-time-between-failures-mentioned-once">MTBF (Mean Time Between Failures) &amp;lsquo;Mentioned Once&amp;rsquo;&lt;/a>
&lt;/h3>
&lt;p>The average time a system operates without failure, used to measure system reliability.&lt;/p>
&lt;hr>
&lt;h1 id="reflection">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#reflection">Reflection&lt;/a>
&lt;/h1>
&lt;ul>
&lt;li>Remaining Qustions?&lt;/li>
&lt;li>How will I put this into practice?&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu3/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Capstone Project Stage 2 🐧</title><link>https://trevorsmale.github.io/techblog/post/paccp2/</link><pubDate>Fri, 27 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/paccp2/</guid><description>&lt;h1 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#intro-">Intro 👋&lt;/a>
&lt;/h1>
&lt;p>I’ve made significant progress with the Capstone Project, the project has expanded to include building a full website.&lt;/p>
&lt;hr>
&lt;h2 id="planning">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#planning">Planning&lt;/a>
&lt;/h2>
&lt;h3 id="integration">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#integration">Integration&lt;/a>
&lt;/h3>
&lt;p>It seemed silly to develop such a complex mechanism that would later require integration into an unknown larger structure.&lt;/p>
&lt;h3 id="no-site-to-begin-with">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#no-site-to-begin-with">No site to begin with&lt;/a>
&lt;/h3>
&lt;p>After asking Scott about it, I learned that there has never been a ProLUG website and that he has been meaning to get something up.&lt;/p>
&lt;h3 id="naturally">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#naturally">Naturally&lt;/a>
&lt;/h3>
&lt;p>It seemed like taking on the entire website project was a good course of action. That way I would be able to decide the layout, functionality and logic all while learning new tools and techniques.&lt;/p>
&lt;h2 id="technology">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#technology">Technology&lt;/a>
&lt;/h2>
&lt;h3 id="going-with-go">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#going-with-go">Going with GO&lt;/a>
&lt;/h3>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACCP2/godeal.png" alt="Go Logo x Deal with it">&lt;/p>
&lt;p>The website uses Go on the backend to serve templates and for back-end logic. While I’ve used Go for template servers before, incorporating templated components similar to Vue.js is new to me.&lt;/p>
&lt;h4 id="heres-why-go-excels-for-this-type-of-project">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#heres-why-go-excels-for-this-type-of-project">Here’s why Go excels for this type of project:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>The codebase remains clean, minimal, and easy to understand.&lt;/li>
&lt;li>The dependency system is simple, with no clutter of unnecessary packages.&lt;/li>
&lt;li>It ensures memory safety.&lt;/li>
&lt;li>Go’s HTTP server protects against injection, MITM, side-channel, and other common attacks.&lt;/li>
&lt;li>HTML templating allows for modularity similar to Vue.js.&lt;/li>
&lt;li>Garbage collection ensures long-term running without memory issues.&lt;/li>
&lt;li>The project can be easily containerized or built into a single binary.&lt;/li>
&lt;li>The Go module system (go.mod) ensures future stability through version control.&lt;/li>
&lt;/ul>
&lt;h3 id="storing-data">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#storing-data">Storing Data&lt;/a>
&lt;/h3>
&lt;p>Initially, I was looking at SQLite for storing key-value pairs. However, after considering usability, I switched to a simple CSV file.&lt;/p>
&lt;h3 id="why-csv">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#why-csv">Why CSV&lt;/a>
&lt;/h3>
&lt;p>The stored data must be easily manipulated by the administrator in a human readable format. With CSV, Scott would be able to amend or edit certificate holders at a glance.&lt;/p>
&lt;h3 id="operationally">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#operationally">Operationally&lt;/a>
&lt;/h3>
&lt;p>This method is both secure and integral&lt;/p>
&lt;h3 id="how-is-it-secure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#how-is-it-secure">How is it secure?&lt;/a>
&lt;/h3>
&lt;p>As stated before GO can securely transmit backend data without many common attacks. Additionally using GIT diff feature would ensure alterations are spotted should a compromise be made.&lt;/p>
&lt;hr>
&lt;h2 id="the-structure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#the-structure">The Structure&lt;/a>
&lt;/h2>
&lt;h3 id="certificate-verifier">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#certificate-verifier">Certificate Verifier&lt;/a>
&lt;/h3>
&lt;h4 id="pulling-from-this-test-csv-file">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#pulling-from-this-test-csv-file">Pulling from this test CSV file:&lt;/a>
&lt;/h4>
&lt;pre tabindex="0">&lt;code class="language-csv" data-lang="csv">Johny,Exampleseed,ProLUG Admin Course,2024-11-15,f078b6c4f26a2fae59d50fdb7c761a7f9523d240b2c18b332aac11e0
Kate,Testinger,ProLUG Admin Course,2024-11-15,a523e6d1ece5bb2758f71993ba1a460024dcd10243fa17654af90257
Het, Tanis, ProLUG Admin Course,2015-11-02,a523e6d1ece5bb2758f71993ba1a460024dcd10243fa17324af90257&lt;/code>&lt;/pre>
&lt;h4 id="using-this-logic">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#using-this-logic">Using this logic:&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// Certificate verification handler
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// This function is the HTTP handler responsible for verifying certificates.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// It is triggered when a user accesses the relevant URL and checks for a certificate based on a hash parameter.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="kd">func&lt;/span> &lt;span class="nf">certHandler&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">w&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">ResponseWriter&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">r&lt;/span> &lt;span class="o">*&lt;/span>&lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">Request&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Extract hash value from the URL query parameters.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// The hash is used to identify the certificate to verify.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">hash&lt;/span> &lt;span class="o">:=&lt;/span> &lt;span class="nx">r&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">URL&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Query&lt;/span>&lt;span class="p">().&lt;/span>&lt;span class="nf">Get&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;hash&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// If no hash is provided in the query, return a &amp;#34;Bad Request&amp;#34; error.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="k">if&lt;/span> &lt;span class="nx">hash&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="s">&amp;#34;&amp;#34;&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Send an HTTP error response indicating that the hash is missing.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Error&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">w&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s">&amp;#34;Hash not provided&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">StatusBadRequest&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="c1">// Exit the handler function since no hash is available.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Load certificates from a CSV file.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// This function attempts to retrieve all certificates stored in the &amp;#34;certificates.csv&amp;#34; file.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">certificates&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">err&lt;/span> &lt;span class="o">:=&lt;/span> &lt;span class="nf">LoadCertificates&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;certificates.csv&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// If there&amp;#39;s an error loading the certificates (e.g., file not found or corrupted), log the error.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="k">if&lt;/span> &lt;span class="nx">err&lt;/span> &lt;span class="o">!=&lt;/span> &lt;span class="kc">nil&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Log the error message to the server logs and return a &amp;#34;Server Error&amp;#34; to the client.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">log&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Error loading certificates: %v&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">err&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Error&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">w&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s">&amp;#34;Server Error&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">StatusInternalServerError&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="c1">// Exit the handler function due to the error.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Initialize a pointer to a Certificate struct.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// This will hold the matching certificate if a valid hash is found.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="kd">var&lt;/span> &lt;span class="nx">cert&lt;/span> &lt;span class="o">*&lt;/span>&lt;span class="nx">Certificate&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Iterate over all loaded certificates.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// Check each certificate&amp;#39;s hash to see if it matches the one provided in the query.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="nx">_&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">c&lt;/span> &lt;span class="o">:=&lt;/span> &lt;span class="k">range&lt;/span> &lt;span class="nx">certificates&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="nx">c&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">Hash&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="nx">hash&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// If a matching certificate is found, assign it to the &amp;#39;cert&amp;#39; pointer and break the loop.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">cert&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="o">&amp;amp;&lt;/span>&lt;span class="nx">c&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">break&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Render the result page using the template engine.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// Pass the certificate (or nil if not found) to the template &amp;#34;result.html&amp;#34; for display.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">err&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="nx">templates&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">ExecuteTemplate&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">w&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s">&amp;#34;result.html&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="kd">map&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="kt">string&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="kd">interface&lt;/span>&lt;span class="p">{}{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s">&amp;#34;Certificate&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="nx">cert&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="c1">// Include the certificate as part of the template data.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="p">})&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// If there&amp;#39;s an error rendering the page (e.g., template not found or syntax error), log the issue.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="k">if&lt;/span> &lt;span class="nx">err&lt;/span> &lt;span class="o">!=&lt;/span> &lt;span class="kc">nil&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Log the error message to the server logs and return an &amp;#34;Internal Server Error&amp;#34; to the client.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">log&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Error rendering verification page: %v&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">err&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Error&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">w&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s">&amp;#34;Internal Server Error&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">StatusInternalServerError&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-GO" data-lang="GO">&lt;span class="line">&lt;span class="cl">&lt;span class="kn">package&lt;/span> &lt;span class="nx">main&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// Certificate represents a learning certificate with associated data.
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="kd">type&lt;/span> &lt;span class="nx">Certificate&lt;/span> &lt;span class="kd">struct&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">FirstName&lt;/span> &lt;span class="kt">string&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">LastName&lt;/span> &lt;span class="kt">string&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">CertType&lt;/span> &lt;span class="kt">string&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">DateCompleted&lt;/span> &lt;span class="kt">string&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">Hash&lt;/span> &lt;span class="kt">string&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="the-prompt">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#the-prompt">The prompt&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot5.png" alt="ProLUG Verify Step 1">&lt;/p>
&lt;h4 id="inputting-a-uid-hash-string">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#inputting-a-uid-hash-string">Inputting a UID hash string&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot6.png" alt="ProLUG Verify Step 2">&lt;/p>
&lt;h4 id="matching-string-results-in-a-info-retrieval">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#matching-string-results-in-a-info-retrieval">Matching string results in a info retrieval&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot7.png" alt="ProLUG Verify Step 3">&lt;/p>
&lt;h4 id="an-unrecognized-string-results-in-an-error-message">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#an-unrecognized-string-results-in-an-error-message">An unrecognized string results in an error message&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot8.png" alt="ProLUG Verify Step 4">&lt;/p>
&lt;h3 id="current-site-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-site-">Current Site 💄&lt;/a>
&lt;/h3>
&lt;p>After getting a working verification system worked out, I moved on to creating a broader website.&lt;/p>
&lt;h4 id="styling">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#styling">Styling&lt;/a>
&lt;/h4>
&lt;p>I like sites with a clean, easy to use and accessible appearance. I have a solid understanding of graphic design for accessibility and wanted to put that into practice here. So the design is stark, compact, clear and contrasting. This language carries throughout.&lt;/p>
&lt;h4 id="technique">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#technique">Technique&lt;/a>
&lt;/h4>
&lt;p>So as mentioned previously, I am serving html templates with GO. This can be pretty simple, we can serve a single basic html page with no modular components. I wanted to try out some fancy tricks using modularized components in this project, cutting down on the size of each template. The way this works within this project is very similar to Vue.js templating. We must declare a template as a component by encapsulating the html with tags.&lt;/p>
&lt;p>for example the Navigation bar is coded similarly to any old navbar and saved in templates as navbar.html. The fancy bit is enclosing the code with the tag&lt;/p>
&lt;h4 id="defining-a-component">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#defining-a-component">Defining a component&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{{&lt;/span> &lt;span class="nx">define&lt;/span> &lt;span class="s">&amp;#34;navbar&amp;#34;&lt;/span> &lt;span class="p">}}&lt;/span> &lt;span class="nx">Code&lt;/span> &lt;span class="nx">goes&lt;/span> &lt;span class="nx">here&lt;/span> &lt;span class="p">{{&lt;/span> &lt;span class="nx">end&lt;/span> &lt;span class="p">}}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="using-a-template-component">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#using-a-template-component">Using a template component&lt;/a>
&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{{&lt;/span> &lt;span class="nx">template&lt;/span> &lt;span class="s">&amp;#34;navbar&amp;#34;&lt;/span> &lt;span class="p">.&lt;/span> &lt;span class="p">}}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="current-home-page">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-home-page">Current Home Page&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot1.png" alt="ProLUG Home Page">&lt;/p>
&lt;h4 id="current-about-page">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-about-page">Current About Page&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot2.png" alt="ProLUG About Page">&lt;/p>
&lt;h4 id="current-join-page">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-join-page">Current Join Page&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot3.png" alt="ProLUG Join Page">&lt;/p>
&lt;h4 id="current-certify-page">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-certify-page">Current Certify Page&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot4.png" alt="ProLUG Certify Page">&lt;/p>
&lt;h4 id="current-verify-page">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#current-verify-page">Current Verify Page&lt;/a>
&lt;/h4>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Sep22site/shot5.png" alt="ProLUG Verify Page">&lt;/p>
&lt;h3 id="next-steps-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#next-steps-">Next Steps&amp;hellip; 🥾&lt;/a>
&lt;/h3>
&lt;ol>
&lt;li>I plan on discussing this in the Code Cove group in ProLUG&lt;/li>
&lt;li>I plan on creating a scoreboard as ideated in unit 2 by scott by reading from a CSV and writing to an order list&lt;/li>
&lt;li>I plan on spiffying up the appearance and useability of the site using tailwind and a bit more js logic&lt;/li>
&lt;/ol>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/paccp2/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>ProLUG Admin Course Unit 2 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu2/</link><pubDate>Fri, 27 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu2/</guid><description>&lt;h1 id="essential-tools-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#essential-tools-">Essential Tools 🛠️&lt;/a>
&lt;/h1>
&lt;h2 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#intro">Intro&lt;/a>
&lt;/h2>
&lt;p>We have reached the second week of the PAC and things are getting more serious. Now that we are familiar with the flow of the course and expectations are set, the second lesson has started with some momentum. 💺&lt;/p>
&lt;hr>
&lt;h2 id="unit-2-lab-exercise-notes-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#unit-2-lab-exercise-notes-">Unit 2 lab exercise notes 🧪&lt;/a>
&lt;/h2>
&lt;p>I am completing the labs locally carefully covering every command listed by running them and checking output, making sure to pay attention to details like options. It was fairly time consuming, yet I learned quite a bit.&lt;/p>
&lt;h4 id="-basic-cli-exercise">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-basic-cli-exercise">🧭 Basic CLI exercise:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>cd ~ # Change Directory to Home&lt;/li>
&lt;li>ls ~ # List&lt;/li>
&lt;li>mkdir evaluation # Make Directory called &amp;rsquo;evaluation'&lt;/li>
&lt;li>mkdir evaluation/test/round6 # This fails why? We need to use the Parent option &amp;lsquo;-p&amp;rsquo;&lt;/li>
&lt;li>mkdir -p evaluation/test/round6 # Make parent directory with subdirectories&lt;/li>
&lt;li>cd evaluation # change directory to evaluation&lt;/li>
&lt;li>pwd # present/print working directory = /home/ts/evaluation&lt;/li>
&lt;li>touch testfile1 # create file name &amp;rsquo;testfile1&amp;rsquo; in current directory&lt;/li>
&lt;li>ls # list = test testfile1&lt;/li>
&lt;li>touch testfile{2..10} # Creates a numbered range of testfile
touch .hfile .hfile2 .hfile3 # this creates three dot files which are not visible to a normal listing method, we must use list all (ls -a)&lt;/li>
&lt;/ul>
&lt;h4 id="-gathering-system-information">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-gathering-system-information">🔍 Gathering System Information&lt;/a>
&lt;/h4>
&lt;p>I am running Rocky Linux 9 on a local Proxmox container for this course.&lt;/p>
&lt;ul>
&lt;li>hostname = localhost.localdomain&lt;/li>
&lt;li>uname # system info command which stands for Unix Name&lt;/li>
&lt;li>uname -a # shows a comprehensive list of system info Kernal name# Hostname, Kernel release, Kernel version, Machine hardware name, Processor type, Hardware platform, Operating system.&lt;/li>
&lt;li>uname -r # the -r option stands for release and shows the kernel release version.&lt;/li>
&lt;/ul>
&lt;h4 id="-checking-the-amount-of-rammemory">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-checking-the-amount-of-rammemory">🧠 Checking the amount of RAM/Memory&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;em>sudo&lt;/em> cat/proc/meminfo # concatenate process memory information&lt;/li>
&lt;li>free # displays total, used, free, shared, buffer, and available memory (RAM and SWAP)&lt;/li>
&lt;li>free -m # megabyte display option for the free command&lt;/li>
&lt;/ul>
&lt;h4 id="-checking-the-number-of-processors-and-processor-info">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-checking-the-number-of-processors-and-processor-info">👨🏻‍💻 Checking the number of processors and processor info&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>cat/proc/cpuinfo # concatenate process central processor unit information = 4 processors on my lab.&lt;/li>
&lt;li>cat /proc/cpuinfo | grep proc | wc -l # what we are doing here is piping the output of the previous command to grep which is filtering lines starting with proc, then we pipe through to word count with line option to cleverly count the number of processors, the result is 4&lt;/li>
&lt;/ul>
&lt;h4 id="-checking-storage-usage-and-mounted-filesystems">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-checking-storage-usage-and-mounted-filesystems">💾 Checking storage usage and mounted filesystems&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>df # the disk free command&lt;/li>
&lt;li>df -h # we are adding the human readable option to df in order to more easily ascertain what is going on.&lt;/li>
&lt;li>df -h | grep -i var #&lt;/li>
&lt;/ul>
&lt;h4 id="-mounting-a-new-file-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#-mounting-a-new-file-system">💾 Mounting a new file system&lt;/a>
&lt;/h4>
&lt;h5 id="common-mount-command-options">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#common-mount-command-options">Common &lt;code>mount&lt;/code> Command Options&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>-t&lt;/strong> # Specify the filesystem type (e.g., &lt;code>ext4&lt;/code>, &lt;code>xfs&lt;/code>, &lt;code>vfat&lt;/code>).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-o&lt;/strong> # Specify options in a comma-separated list (e.g., &lt;code>rw&lt;/code>, &lt;code>ro&lt;/code>, &lt;code>noexec&lt;/code>).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-a&lt;/strong> # Mount all filesystems defined in &lt;code>/etc/fstab&lt;/code>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-r&lt;/strong> # Mount the filesystem as read-only.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-w&lt;/strong> # Mount the filesystem as read-write.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-v&lt;/strong> # Verbose mode, provides more detailed output.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&amp;ndash;bind&lt;/strong> # Bind mount, remount part of the filesystem elsewhere.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&amp;ndash;make-shared&lt;/strong> # Make a mounted file system shared (for propagating mount events).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-L&lt;/strong> # Mount by filesystem label.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>-U&lt;/strong> # Mount by UUID.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>mount | grep –i home# lists all mounts starting with the case sensitive phrase home (I was not getting any result 🤔)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>mount | grep -i sd# this lists all SCSK disks, normally named sda, sdb, sdc etc&amp;hellip;&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h5 id="trying-out-alternative-commands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#trying-out-alternative-commands">Trying out alternative commands&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>&lt;strong>findmt&lt;/strong># find mount&lt;/li>
&lt;li>&lt;strong>cat /proc/mounts&lt;/strong># concatenate in-process mounts&lt;/li>
&lt;li>&lt;strong>lsblk&lt;/strong># list block devices&lt;/li>
&lt;/ul>
&lt;h5 id="i-was-unaware-that-commands-could-be-chained-together-with-a-semicolon">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#i-was-unaware-that-commands-could-be-chained-together-with-a-semicolon">I was unaware that commands could be chained together with a semicolon&lt;/a>
&lt;/h5>
&lt;ul>
&lt;li>&lt;code>cd ~; pwd; df -h&lt;/code># change directory to home, then print working directory, then list disk usage in a human-readable format 🧐.&lt;/li>
&lt;li>&lt;code>du -sh&lt;/code># disk usage summary in a human-readable format.&lt;/li>
&lt;/ul>
&lt;h5 id="du-command-options">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#du-command-options">&lt;code>du&lt;/code> Command Options&lt;/a>
&lt;/h5>
&lt;pre>&lt;code> **`-a`**# Display disk usage for all files, not just directories.
**`-h`**# Show disk usage in human-readable format (e.g., KB, MB, GB).
**`-s`**# Show summary of total disk usage for a directory.
**`-c`**# Produce a grand total at the end.
**`-L`**# Follow symbolic links (default `du` doesn't follow symlinks).
**`-d N`** or **`--max-depth=N`**# Limit directory depth to N levels.
**`--time`**# Show modification time of directories.
**`-b`**# Show disk usage in bytes.
**`-k`**# Show disk usage in kilobytes.
**`-m`**# Show disk usage in megabytes.
**`--apparent-size`**# Show the apparent size instead of disk usage.
**`-x`**# Skip directories on different file systems.
**`--exclude=PATTERN`**# Exclude files matching a pattern.
&lt;/code>&lt;/pre>
&lt;h3 id="uptime">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#uptime">Uptime&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> `uptime`# Shows time in HH:MM:SS Unix time format in local time. If the time is not set, like in my instance, I get UTC 0🧐. Next, it shows how long the system has been running, the number of logged-in users, and finally, the load average over the last 1, 5, and 15 minutes.
&lt;/code>&lt;/pre>
&lt;h3 id="last">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#last">Last&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> **`last`**# Lists all users who have logged in from latest to oldest.
**`w`**# Lists current users and associated processes.
**`who`**# Shows who is currently logged on. The output `pts/0` stands for pseudo terminal, typically shown when logged in remotely. It will show either an IPv4 or IPv6 address and the login time. When I logged into my Ubuntu server via SSH, I was shown the IPv6 address. 🤯
**`whoami`**# Tells which user you are.
&lt;/code>&lt;/pre>
&lt;h3 id="checking-environment">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#checking-environment">Checking environment&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> **`printenv`**# Shows a long list of environmental information.
**`printenv | grep -i home`**# Shows that I am in the home directory of `root`.
**`id`**# Shows a lot of info about UID, GID, and group memberships, including SELinux policies.
**`echo $SHELL`**# Displays the path of the shell environment variable, in my case, `/bin/bash`.
&lt;/code>&lt;/pre>
&lt;h3 id="check-running-processes-and-services">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#check-running-processes-and-services">Check running processes and services&lt;/a>
&lt;/h3>
&lt;pre>&lt;code> **`ps -aux | more`**
**`ps -ef | more`**
**`ps -ef | wc -l`**
&lt;/code>&lt;/pre>
&lt;h3 id="check-memory-usage">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#check-memory-usage">Check memory usage&lt;/a>
&lt;/h3>
&lt;p>Run each of these commands individually for understanding:&lt;/p>
&lt;pre>&lt;code> **`free -m`**
**`free -m | egrep &amp;quot;Mem|Swap&amp;quot;`**
**`free -m | egrep &amp;quot;Mem|Swap&amp;quot; | awk '{print $1, $2, $3}'`**: What are the first, second, and third columns? How would I know the variable names?
**`free -t | egrep &amp;quot;Mem|Swap&amp;quot; | awk '{print $1 &amp;quot; Used Space = &amp;quot; ($3 / $2) * 100&amp;quot;%&amp;quot;}'`**: Similar question for these variables.
&lt;/code>&lt;/pre>
&lt;h3 id="testing-out-scripts">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#testing-out-scripts">Testing out scripts&lt;/a>
&lt;/h3>
&lt;h5 id="q-have-you-ever-written-a-basic-check-script-or-touched-on-conditional-statements-or-loops">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#q-have-you-ever-written-a-basic-check-script-or-touched-on-conditional-statements-or-loops">Q: Have you ever written a basic check script or touched on conditional statements or loops?&lt;/a>
&lt;/h5>
&lt;h5 id="a-yes-very-basic-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#a-yes-very-basic-">A: Yes very basic 😅&lt;/a>
&lt;/h5>
&lt;p>(Use ctrl + c to break out of these) 👍&lt;/p>
&lt;pre>&lt;code> while true; do free -m; sleep 3; done
Watch this output for a few and then break with ctrl + c
Try to edit this to wait for 5 seconds
Try to add a check for uptime and date each loop with a blank line between each and 10 second wait:
while true; do date; uptime; free -m; echo “ “; sleep 10; done
Since we can wrap anything inside of our while statements, let’s try adding something from earlier:
While true; do free -t | egrep &amp;quot;Mem|Swap&amp;quot; | awk '{print $1 &amp;quot; Used Space = &amp;quot; ($3 / $2) * 100&amp;quot;%&amp;quot;}'; sleep 3; done 👍
&lt;/code>&lt;/pre>
&lt;p>&lt;strong>seq 1 10&lt;/strong>&lt;/p>
&lt;h5 id="q-what-did-this-do">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#q-what-did-this-do">Q: What did this do?&lt;/a>
&lt;/h5>
&lt;h5 id="a-it-counts-from-1-to-10-creating-a-new-line-for-each-char">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#a-it-counts-from-1-to-10-creating-a-new-line-for-each-char">A: it counts from 1 to 10, creating a new line for each char.&lt;/a>
&lt;/h5>
&lt;h5 id="q-can-you-man-seq-to-modify-that-to-count-from-2-to-20-by-2s">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#q-can-you-man-seq-to-modify-that-to-count-from-2-to-20-by-2s">Q: Can you man seq to modify that to count from 2 to 20 by 2’s?&lt;/a>
&lt;/h5>
&lt;h5 id="a-yes-by-using-first-increment-last-so-2-2-20">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#a-yes-by-using-first-increment-last-so-2-2-20">A: yes by using &amp;lsquo;First Increment Last, so 2 2 20&amp;rsquo;&lt;/a>
&lt;/h5>
&lt;p>Let’s make a counting for loop from that sequence ✅
for i in &lt;code>seq 1 20&lt;/code>; do echo &amp;ldquo;I am counting i and am on $i times through the loop&amp;rdquo;; done 👍&lt;/p>
&lt;h5 id="q-can-you-tell-me-what-is-the-difference-or-significance-of-the--in-the-command-above-what-does-that-denote-to-the-system">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#q-can-you-tell-me-what-is-the-difference-or-significance-of-the--in-the-command-above-what-does-that-denote-to-the-system">Q: Can you tell me what is the difference or significance of the $ in the command above? What does that denote to the system?&lt;/a>
&lt;/h5>
&lt;h5 id="a-we-are-using-the--to-access-a-variable">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#a-we-are-using-the--to-access-a-variable">A: we are using the $ to access a variable.&lt;/a>
&lt;/h5>
&lt;p>Uptime – The time a system has been running for without interruption.
Standard input - stdin &amp;lsquo;0&amp;rsquo; the default stream where a program receives data.
Standard output - stdout &amp;lsquo;1&amp;rsquo; refers to default stream output of a program.
Standard error – stderr &amp;lsquo;2&amp;rsquo; refers to a default stream wherein an error is sent.&lt;/p>
&lt;hr>
&lt;h3 id="reflecting-on-unit-1-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#reflecting-on-unit-1-">Reflecting on Unit 1 🤔&lt;/a>
&lt;/h3>
&lt;p>Week 1 went well for me. I was very excited to start this course as it strongly aligns with my professional interests, and it came at a great time. I am incredibly grateful to have access to such a talented group of like-minded and enthusiastic professionals.&lt;/p>
&lt;p>I managed to complete everything for Week 1 by preparing in advance. For example, I created this blog and started some of the materials early. The night before the course began, I went through Vim Tutor and Vim Adventures to give myself a bit of a head start, as my time is currently divided between various responsibilities. I also dedicated a significant portion of my time to starting my capstone project and troubleshooting issues.&lt;/p>
&lt;p>I’ve set aside 8 hours per week, as suggested by Scott, for attending lectures, reading materials, practicing labs, and doing general research. During Week 1, I used roughly 6 hours, so I believe I’ve allocated enough time to complete the course work.&lt;/p>
&lt;p>My note-taking has been excellent for this course. Prior to starting, I learned how essential note-taking is to the administration and engineering process, so I began using LogSeq as my note-taking tool four months ago. This gave me time to familiarize myself with its features, allowing me to dive into the lectures fully prepared. I’m also a fast touch typist, so I can easily listen and type simultaneously. After each lecture, I review and organize my notes by nesting and tagging information to relate it to other topics. Additionally, I’ve been reflecting on everything by writing in this blog.&lt;/p>
&lt;hr>
&lt;h2 id="security-enhanced-linux">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#security-enhanced-linux">Security Enhanced Linux&lt;/a>
&lt;/h2>
&lt;h3 id="brief-intro-to-selinux">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#brief-intro-to-selinux">Brief intro to SELinux&lt;/a>
&lt;/h3>
&lt;p>SELinux (Security-Enhanced Linux) is a security module integrated into the Linux kernel that enforces mandatory access control policies to provide more granular control over how processes and users interact with files and resources. By defining strict rules on what actions each program or user can perform, SELinux significantly enhances the security posture of a Linux system, helping to prevent unauthorized access and exploits.&lt;/p>
&lt;h3 id="brief-intro-to-apparmor">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#brief-intro-to-apparmor">Brief intro to Apparmor&lt;/a>
&lt;/h3>
&lt;p>AppArmor (Application Armor) is a Linux security module that enforces access control policies based on file paths, limiting what resources applications can access to enhance system security. It provides a simpler, profile-based alternative to SELinux, allowing administrators to create restrictive environments for individual applications without requiring deep changes to system configuration.&lt;/p>
&lt;h3 id="key-terminology">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#key-terminology">Key Terminology&lt;/a>
&lt;/h3>
&lt;p>Mandatory Access Control –
Discretionary Access Control –
Security contexts (SELINUX) –
SELINUX operating modes -&lt;/p>
&lt;h3 id="comparing-apparmor-and-selinux-for-container-separation-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#comparing-apparmor-and-selinux-for-container-separation-1">Comparing AppArmor and SELinux for Container Separation &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/a>
&lt;/h3>
&lt;p>This article provides a brief comparison between &lt;strong>SELinux&lt;/strong> and &lt;strong>AppArmor&lt;/strong> regarding their effectiveness in securely separating containers.&lt;/p>
&lt;p>After reading, it became clear that &lt;strong>AppArmor&lt;/strong> is not an ideal choice for &lt;strong>DevSecOps&lt;/strong> when it comes to securely separating containers. This is due to &lt;strong>AppArmor&amp;rsquo;s lack of support for Multi-Category Security (MCS)&lt;/strong>. MCS allows for a hierarchy of controls, granting varying levels of access.&lt;/p>
&lt;p>Therefore, if you&amp;rsquo;re looking to securely separate containers without relying on &lt;strong>Virtual Machines&lt;/strong>—which can be costly—&lt;strong>SELinux&lt;/strong> emerges as the better option for such tasks.&lt;/p>
&lt;h3 id="key-takeaways-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#key-takeaways-">Key Takeaways 📝&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>AppArmor&lt;/strong> is &lt;strong>not label-based&lt;/strong>, unlike SELinux.&lt;/li>
&lt;li>&lt;strong>AppArmor&lt;/strong> is generally seen as more &lt;strong>user-friendly&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>AppArmor&lt;/strong> has fewer controls compared to SELinux.&lt;/li>
&lt;li>&lt;strong>AppArmor&lt;/strong> has &lt;strong>fewer operations&lt;/strong> available.&lt;/li>
&lt;li>Both support the &lt;strong>Type Enforcement&lt;/strong> security model (a form of &lt;strong>mandatory access control&lt;/strong>).&lt;/li>
&lt;li>The security model is based on rules where subjects (like processes or users) are allowed to access objects (e.g., files, directories, sockets, etc.).&lt;/li>
&lt;li>&lt;strong>AppArmor&lt;/strong> lacks &lt;strong>Multi-Level Security (MLS)&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>AppArmor&lt;/strong> does not support &lt;strong>Multi-Category Security (MCS)&lt;/strong>.&lt;/li>
&lt;li>🔄 Because &lt;strong>MCS is unavailable&lt;/strong>, &lt;strong>AppArmor&lt;/strong> cannot maintain proper separation between containers.&lt;/li>
&lt;li>⚠️ The default container policy in AppArmor is &lt;strong>very loose&lt;/strong>, which could present security risks.&lt;/li>
&lt;/ul>
&lt;h3 id="quick-comparison-table-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#quick-comparison-table-">Quick Comparison Table 🔍&lt;/a>
&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Technology&lt;/th>
&lt;th>Type Enforcement&lt;/th>
&lt;th>MLS/MCS&lt;/th>
&lt;th>Policy Generator&lt;/th>
&lt;th>Generator for Containers&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>AppArmor&lt;/strong>&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>SELinux&lt;/strong>&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No*&lt;/td>
&lt;td>Yes&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>By understanding these differences, it’s clear that &lt;strong>SELinux&lt;/strong> provides a more secure framework for container separation, making it a crucial tool for modern &lt;strong>DevSecOps&lt;/strong> workflows.&lt;/p>
&lt;h3 id="enabling-selinux">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#enabling-selinux">Enabling SELinux&lt;/a>
&lt;/h3>
&lt;p>Before enabling SELinux, you can verify its current status by running the &lt;code>sestatus&lt;/code> command, which provides the &lt;strong>Security Enhanced Status&lt;/strong> of the system. To activate or configure SELinux, you need to modify the configuration file located at &lt;code>/etc/selinux/config&lt;/code>. SELinux can operate in two modes:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Enforcing&lt;/strong>: SELinux policies are actively enforced, and violations are blocked.&lt;/li>
&lt;li>&lt;strong>Permissive&lt;/strong>: Policies are not enforced, but violations are logged for review, allowing for troubleshooting without blocking actions.&lt;/li>
&lt;/ol>
&lt;h3 id="selinux-contexts">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#selinux-contexts">SELinux Contexts&lt;/a>
&lt;/h3>
&lt;p>A &lt;strong>context&lt;/strong> in SELinux is a set of security labels used to manage access to files, processes, and other system resources. The context is composed of several fields:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">system_u:object_r:httpd_sys_content_t:s0&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">user:role:type:level&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;h4 id="breakdown-of-context-components">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#breakdown-of-context-components">Breakdown of Context Components:&lt;/a>
&lt;/h4>
&lt;p>&lt;strong>User:&lt;/strong> Represents the SELinux identity of a subject (process) or object (file).
&lt;strong>Role:&lt;/strong> Groups privileges for processes and users, determining what they are allowed to do.
&lt;strong>Type:&lt;/strong> Defines how subjects (processes) can interact with objects (files or resources).
&lt;strong>Level:&lt;/strong> Used in Multi-Level Security (MLS) or Multi-Category Security (MCS) systems for additional granularity in access control.&lt;/p>
&lt;h3 id="taking-selinux-for-a-spin-on-a-rocky-9-vm-in-my-proxmox-homelab">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#taking-selinux-for-a-spin-on-a-rocky-9-vm-in-my-proxmox-homelab">Taking SELinux for a spin on a Rocky 9 VM in my Proxmox Homelab&lt;/a>
&lt;/h3>
&lt;p>A few weeks ago, I learned how to create uninitialized templates with Proxmox, meaning the SSH keys are generated for each copy of the template. This is done with cloud init.&lt;/p>
&lt;p>So today I created a clone of my template specifically for getting hands on experience with SElinux&lt;/p>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU2/prox1.png" alt="ProLUG Homepage">&lt;/p>
&lt;p>I opened the &lt;strong>/etc/selinux/config&lt;/strong> and set se to enforce. I then ran &lt;strong>sestatus&lt;/strong> to confirm selinux had been activated.
I created a new user policy for myself with &lt;strong>semanage user -a -R &amp;lsquo;staff_r webadm_r&amp;rsquo; Treasure&lt;/strong> here is the result after running &lt;strong>semanage user -l&lt;/strong>&lt;/p>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/PACU2/selinux1.png" alt="ProLUG Homepage">&lt;/p>
&lt;h3 id="selinux-scenario-contemplation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#selinux-scenario-contemplation">SELinux scenario contemplation&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>You follow your company instructions to add a new user to a set of 10 Linux servers.&lt;/li>
&lt;li>They cannot access just one (1) of the servers.&lt;/li>
&lt;li>When you review the differences in the servers you see that the server they cannot access is running SELINUX.&lt;/li>
&lt;li>On checking other users have no problem getting into the system.&lt;/li>
&lt;li>You find nothing in the documentation (typical) about this different system or how these users are accessing it.&lt;/li>
&lt;li>What do you do? Where do you check?&lt;/li>
&lt;/ul>
&lt;p>From the given information, it seems likely that SELinux is denying access to the new user. To troubleshoot this, I would take the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Check SELinux User Configuration&lt;/strong>:&lt;br>
I would run the command &lt;code>semanage user -l&lt;/code> to list all SELinux users and confirm whether the new user exists within the SELinux policy.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Verify MLS/MCS Levels and Roles&lt;/strong>:&lt;br>
If the user is already registered, I would review the user&amp;rsquo;s Multi-Level Security (MLS) or Multi-Category Security (MCS) level and verify the role assigned to the user. It&amp;rsquo;s important that the user&amp;rsquo;s role matches those that have the necessary access permissions.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Assign Appropriate Role&lt;/strong>:&lt;br>
If the current role restricts access, I would assign the user to an SELinux role that permits access to the system, ensuring that role-based access control (RBAC) is properly configured.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h3 id="interactive-killercoda-lab-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#interactive-killercoda-lab-2">Interactive Killercoda Lab &lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/a>
&lt;/h3>
&lt;h4 id="i-hope-this-was-designed-to-be-challenging-because-i-was-challenged-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#i-hope-this-was-designed-to-be-challenging-because-i-was-challenged-">I hope this was designed to be challenging, because I was challenged 😅&lt;/a>
&lt;/h4>
&lt;p>Despite paying close attention, I somehow got confused by this challenge. I suppose the exercise was designed to force me to read through documentation, which was tough.
But I am proud to say that through trial and error, I was able to get through.&lt;/p>
&lt;h4 id="commands-i-looked-up-in-the-documentation">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#commands-i-looked-up-in-the-documentation">Commands I looked up in the documentation:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>kubectl get deployment spacecow -n moon -o yaml &amp;gt; spacecow-deployment.yaml&lt;/li>
&lt;li>vim spacecow-deployment.yaml&lt;/li>
&lt;li>kubectl apply -f spacecow-deployment.yaml&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="troubleshooting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#troubleshooting">Troubleshooting&lt;/a>
&lt;/h2>
&lt;h3 id="how-troubleshooting-differs-between-administrator-and-engineer">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#how-troubleshooting-differs-between-administrator-and-engineer">How Troubleshooting Differs Between Administrator and Engineer&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Administrators&lt;/strong> focus on &lt;strong>restoring functionality&lt;/strong> to existing systems, while &lt;strong>Engineers&lt;/strong> work on &lt;strong>building and implementing&lt;/strong> new systems or improvements.&lt;/li>
&lt;li>&lt;strong>Administrators&lt;/strong> have &lt;strong>existing documentation&lt;/strong> to reference for troubleshooting, whereas &lt;strong>Engineers&lt;/strong> are responsible for &lt;strong>creating new documentation&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Administrators&lt;/strong> can compare similar systems for &lt;strong>inconsistencies&lt;/strong>, but &lt;strong>Engineers&lt;/strong> may be working with entirely new systems or solutions, making such comparisons difficult.&lt;/li>
&lt;/ul>
&lt;h4 id="administrators">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#administrators">Administrators:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Fix&lt;/strong>: Restore systems to their previous, working state.&lt;/li>
&lt;li>&lt;strong>Optimize&lt;/strong>: Use tools like &lt;strong>Ansible&lt;/strong> or custom scripts to streamline operations and automate repetitive tasks.&lt;/li>
&lt;li>&lt;strong>Operate&lt;/strong>: Handle daily tasks that &lt;strong>cannot be automated&lt;/strong>, such as monitoring or handling unexpected issues.&lt;/li>
&lt;/ul>
&lt;h4 id="engineers">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#engineers">Engineers:&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Prepare&lt;/strong>: Configure pre-built tools for daily use and ensure they integrate smoothly with existing systems.&lt;/li>
&lt;li>&lt;strong>Plan&lt;/strong>: Anticipate and strategize operational changes, such as the introduction of new tools or system upgrades.&lt;/li>
&lt;li>&lt;strong>Design&lt;/strong>: Create new tools, systems, or measures that address organizational needs and future challenges.&lt;/li>
&lt;li>&lt;strong>Implement&lt;/strong>: Deploy new or upgraded systems and produce comprehensive documentation to support ongoing maintenance and troubleshooting.&lt;/li>
&lt;/ul>
&lt;h3 id="key-differences-in-troubleshooting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#key-differences-in-troubleshooting">Key Differences in Troubleshooting:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Administrators typically deal with &lt;strong>reactive troubleshooting&lt;/strong>, where the goal is to quickly restore functionality after an issue occurs. Engineers, on the other hand, often engage in &lt;strong>proactive troubleshooting&lt;/strong> by identifying potential problems before they happen, ensuring that systems are scalable and sustainable.&lt;/li>
&lt;li>While administrators may focus on resolving immediate operational issues, engineers are responsible for the &lt;strong>long-term stability&lt;/strong> of systems, often troubleshooting while keeping future requirements in mind.&lt;/li>
&lt;/ul>
&lt;h3 id="troubleshooting-procedure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#troubleshooting-procedure">Troubleshooting Procedure&lt;/a>
&lt;/h3>
&lt;h4 id="1-identify-the-problem">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#1-identify-the-problem">1. &lt;strong>Identify the Problem&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Gather Information&lt;/strong>: Ask questions, check logs, or run diagnostics to gather all necessary details.&lt;/li>
&lt;li>&lt;strong>Reproduce the Issue&lt;/strong>: Try to replicate the problem to confirm its existence and scope.&lt;/li>
&lt;/ul>
&lt;h4 id="2-establish-a-theory-of-cause">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#2-establish-a-theory-of-cause">2. &lt;strong>Establish a Theory of Cause&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Look for Patterns&lt;/strong>: Are there recurring errors or conditions?&lt;/li>
&lt;li>&lt;strong>Use Known Issues&lt;/strong>: Refer to documentation, previous cases, or online resources to match symptoms to potential causes.&lt;/li>
&lt;li>&lt;strong>Hypothesize&lt;/strong>: Develop potential explanations based on the data you&amp;rsquo;ve collected.&lt;/li>
&lt;/ul>
&lt;h4 id="3-test-the-theory">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#3-test-the-theory">3. &lt;strong>Test the Theory&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Isolate Variables&lt;/strong>: Disable or eliminate components one by one to test your theory.&lt;/li>
&lt;li>&lt;strong>Try Quick Fixes&lt;/strong>: Implement minor changes to see if the problem is resolved, such as restarting services or clearing caches.&lt;/li>
&lt;/ul>
&lt;h4 id="4-create-an-action-plan">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#4-create-an-action-plan">4. &lt;strong>Create an Action Plan&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Plan for Resolution&lt;/strong>: Identify the steps needed to fix the problem if your theory is confirmed.&lt;/li>
&lt;li>&lt;strong>Consider Impact&lt;/strong>: Make sure to assess any risks or side effects of your solution.&lt;/li>
&lt;/ul>
&lt;h4 id="5-implement-the-solution">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#5-implement-the-solution">5. &lt;strong>Implement the Solution&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Execute the Fix&lt;/strong>: Apply the necessary changes, whether it&amp;rsquo;s a configuration adjustment, software update, or hardware replacement.&lt;/li>
&lt;li>&lt;strong>Monitor&lt;/strong>: Observe the system closely to ensure the issue doesn&amp;rsquo;t recur.&lt;/li>
&lt;/ul>
&lt;h4 id="6-verify-full-system-functionality">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#6-verify-full-system-functionality">6. &lt;strong>Verify Full System Functionality&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Test the Fix&lt;/strong>: Confirm the problem is fully resolved and that other services or systems haven’t been affected.&lt;/li>
&lt;li>&lt;strong>Ask Stakeholders&lt;/strong>: Ensure end-users or relevant parties can validate the fix.&lt;/li>
&lt;/ul>
&lt;h4 id="7-document-the-findings">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#7-document-the-findings">7. &lt;strong>Document the Findings&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Write It Down&lt;/strong>: Document the issue, the root cause, the solution, and any potential future prevention methods.&lt;/li>
&lt;li>&lt;strong>Share Knowledge&lt;/strong>: Ensure others on your team or organization can reference the solution.&lt;/li>
&lt;/ul>
&lt;h4 id="8-prevent-future-issues">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#8-prevent-future-issues">8. &lt;strong>Prevent Future Issues&lt;/strong>&lt;/a>
&lt;/h4>
&lt;ul>
&lt;li>&lt;strong>Review System&lt;/strong>: Investigate whether the root cause indicates a larger problem.&lt;/li>
&lt;li>&lt;strong>Proactive Monitoring&lt;/strong>: Set up alerts, automations, or optimizations to prevent recurrence.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="notes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#notes">Notes&lt;/a>
&lt;/h2>
&lt;h3 id="dhcp">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#dhcp">DHCP&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>DHCP Should only be assigned by one server&lt;/li>
&lt;li>What is a BootP?&lt;/li>
&lt;li>DHCP is a process that comes from BootP?&lt;/li>
&lt;li>Layer 2 based on Mac address&lt;/li>
&lt;/ul>
&lt;h3 id="first-day-on-the-job-you-must-inventory-the-servers">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#first-day-on-the-job-you-must-inventory-the-servers">First day on the job, you must inventory the servers&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Nmap&lt;/li>
&lt;li>History on CommandLine (Find the IP&amp;rsquo;s)&lt;/li>
&lt;li>Ping Sweep for OpenSSH&lt;/li>
&lt;li>Create a local Inventory File&lt;/li>
&lt;/ul>
&lt;h3 id="questions-i-have-from-this-week">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#questions-i-have-from-this-week">Questions I have from this week:&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>How often does a Jr. Admin implement SELinux?&lt;/li>
&lt;li>If apparmor is so much less functional than SELinux, why is it still a popular choice? is it due to ease of use?&lt;/li>
&lt;li>you mentioned Irata? I was unable to look it up.&lt;/li>
&lt;li>&lt;strong>free –m| egrep “Mem|Swap” | awk ‘{print $1, $2, $3}’&lt;/strong>: what is 1, 2 and 3. Is there an easy way to know which variables pertain to which data?&lt;/li>
&lt;/ul>
&lt;h3 id="how-are-you-going-to-use-what-youve-learned-in-your-current-role">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#how-are-you-going-to-use-what-youve-learned-in-your-current-role">How are you going to use what you’ve learned in your current role?&lt;/a>
&lt;/h3>
&lt;p>I have no direct application for most of this stuff at the moment. however I will definitely use scripting in my current position in order to automate tasks. Furthermore, I will def remember several commands from the labs that I will likely use daily.&lt;/p>
&lt;hr>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu2/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>Comparing Apparmor to Se Linux Isolation &lt;a href="https://www.redhat.com/sysadmin/apparmor-selinux-isolation">Article&lt;/a> Redhat.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Apparmor Interactive Lab &lt;a href="https://killercoda.com/killer-shell-cks/scenario/apparmor">Site&lt;/a> Killercoda.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>ProLUG Admin Course Unit 1 🐧</title><link>https://trevorsmale.github.io/techblog/post/pacu1/</link><pubDate>Sun, 15 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pacu1/</guid><description>&lt;h1 id="command-line-interface-primer-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#command-line-interface-primer-">Command Line Interface Primer 👨🏻‍🏫&lt;/a>
&lt;/h1>
&lt;h2 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#intro-">Intro 👋&lt;/a>
&lt;/h2>
&lt;p>Well the ProLUG course is a go. We had a great meeting yesterday with a group of over 80 people. There was a slight snafu regarding thread size limits, so mid lesson we jumped into a presenter room. The session ran for a solid two hours wherein Scott went over command line interface essentials, networking essentials, VIM, pathing, redirects, Xargs, man pages and more. Although I have decent foundational knowledge of Linux, I know that there is always something to learn or better understand. I came away from this first class with a handful of things to review and practice for sure.&lt;/p>
&lt;h3 id="prompts-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#prompts-">prompts 🦮&lt;/a>
&lt;/h3>
&lt;p>Group discussions have kicked off early in #ProLUG-Projects. Scott has prompted us with a few questions for Unit 1 that we are to post and discuss. I thought it would be good to post these answers in a longer form on my blog. This acts as a review of yesterdays work and gives me a chance to further reflect.&lt;/p>
&lt;h3 id="discussion-post-1-technical-skill-assessment-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#discussion-post-1-technical-skill-assessment-">Discussion Post 1: Technical Skill Assessment 🔍&lt;/a>
&lt;/h3>
&lt;p>Using this rubric, we are to self-assess our skills in various areas with a score from 1-10, giving us a total score at the end. My score was 48 out of a potential 110. I would never rate myself above a 7, as that feels like Demi-God territory!&lt;/p>
&lt;p>Given the pace we started at in the first class, I’m confident that my skills will improve throughout this course. I plan to really go for it and challenge myself along the way.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;strong>Skill&lt;/strong>&lt;/th>
&lt;th>&lt;strong>High (8-10)&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Mid (4-7)&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Low (0-3)&lt;/strong>&lt;/th>
&lt;th>&lt;strong>Total&lt;/strong>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Linux&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>6&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Storage&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>5&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Security&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>6&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Networking&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>-&lt;/td>
&lt;td>3&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Git&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>7&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Automation&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>5&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Monitoring&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>-&lt;/td>
&lt;td>3&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Database&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>4&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Cloud&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>6&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Kubernetes&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>-&lt;/td>
&lt;td>3&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Total&lt;/strong>&lt;/td>
&lt;td>-&lt;/td>
&lt;td>-&lt;/td>
&lt;td>-&lt;/td>
&lt;td>&lt;strong>48&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="what-do-i-hope-to-learn-in-this-course-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#what-do-i-hope-to-learn-in-this-course-">What do I hope to learn in this course? 🤔&lt;/a>
&lt;/h3>
&lt;p>I aim to gain hands-on experience in all aspects of system administration. While I have studied Linux and system administration, I understand that skill levels in this field can vary widely. As I work toward becoming a Systems Engineer, I recognize the importance of consistently challenging myself. Through this journey, I hope to build confidence in managing existing systems, configuring services, securing environments, and automating tasks.&lt;/p>
&lt;h3 id="what-type-of-career-are-you-looking-for-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#what-type-of-career-are-you-looking-for-">What type of career are you looking for? 🥕&lt;/a>
&lt;/h3>
&lt;p>I am looking to become a full time Linux System Engineer. I am currently in an administrative support role wherein I am tasked with setting up new systems on a small scale. I would like to be able to manage a large number of servers with automation.&lt;/p>
&lt;h3 id="discussion-post-2-target-job-and-skills-gap-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#discussion-post-2-target-job-and-skills-gap-">Discussion Post 2: Target Job and Skills Gap 🎯&lt;/a>
&lt;/h3>
&lt;p>Our second task is to look for a job we would like to target and list the requirements posted for that given job.&lt;br>
I found this job posted by &lt;strong>OERP Canada&lt;/strong>, located in Toronto, Ontario, with the following information.&lt;/p>
&lt;hr>
&lt;h3 id="job-overview">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#job-overview">Job Overview&lt;/a>
&lt;/h3>
&lt;p>The role will be 100% remote for now (#socialdistancing). Eventually, it will convert into an onsite role in Toronto, ON. We are only accepting applications from residents of Canada.&lt;/p>
&lt;p>&lt;strong>OERP Canada&lt;/strong> is looking for a full-time, experienced &lt;strong>LINUX System Administrator&lt;/strong> to help maintain our operations and support our Odoo application deployment team, which deploys the Odoo Business Application suite for our clients. The successful candidate will have a technical background in &lt;strong>LINUX&lt;/strong>, experience with hosting, web and proxy servers, database administration, mail routing, network security, strong communication skills, and the willingness and ability to think creatively and flexibly. A desire to learn is an important requirement of being part of our team.&lt;/p>
&lt;p>This position is both creative and rigorous by nature—you need to think outside the box. We expect the candidate to be proactive and have a &amp;ldquo;get it done&amp;rdquo; spirit.&lt;/p>
&lt;h3 id="responsibilities">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#responsibilities">Responsibilities&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Manage cloud and on-premise hosting environments&lt;/li>
&lt;li>Endless security improvements&lt;/li>
&lt;li>Improve automation tools&lt;/li>
&lt;li>Improve scripting&lt;/li>
&lt;li>Provide technical support as needed&lt;/li>
&lt;/ul>
&lt;h3 id="must-have-skills">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#must-have-skills">Must-Have Skills&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Ubuntu / Debian server&lt;/li>
&lt;li>NGINX&lt;/li>
&lt;li>Security best practices: Firewalls &amp;amp; WAF&lt;/li>
&lt;li>Automation tools and server scripting&lt;/li>
&lt;li>Functional knowledge of networking: VPNs, DNS, mail routing and delivery, etc.&lt;/li>
&lt;li>University degree or 3-5 years of work experience&lt;/li>
&lt;/ul>
&lt;h3 id="nice-to-have-skills">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#nice-to-have-skills">Nice-to-Have Skills&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>PostgreSQL high availability, load balancing, and replication&lt;/li>
&lt;li>Virtualization: VMware, vSphere, KVM&lt;/li>
&lt;li>VCS/Git working knowledge&lt;/li>
&lt;li>FreeBSD&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="what-i-am-currently-able-to-do-in-this-position-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#what-i-am-currently-able-to-do-in-this-position-">What I am currently able to do in this position 💪🏻&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Solid experience with Debian/Ubuntu&lt;/li>
&lt;li>Confident in managing both cloud and on-premise hosting environments&lt;/li>
&lt;li>Skilled in improving automation through the use of Ansible, Terraform, and Bash scripting&lt;/li>
&lt;li>While I may not have 3-5 years of continuous working experience, I have been involved in IT work on and off&lt;/li>
&lt;li>Experienced in setting up and managing PostgreSQL&lt;/li>
&lt;li>Proficient with Oracle VirtualBox and Proxmox, which I believe translates well to VMware, vSphere, and KVM&lt;/li>
&lt;li>Knowledgeable in Git, including branch management and command-line usage&lt;/li>
&lt;li>Familiar with FreeBSD and BSD-specific commands&lt;/li>
&lt;/ul>
&lt;h3 id="what-i-am-currently-incapable-of-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#what-i-am-currently-incapable-of-">What I am currently incapable of 😓&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Lack confidence in managing firewalls&lt;/li>
&lt;li>Limited experience with VPNs, DNS, and mail handling&lt;/li>
&lt;li>Basic hands-on experience with NGINX, but skills are limited&lt;/li>
&lt;li>Minimal technical support experience&lt;/li>
&lt;/ul>
&lt;h3 id="how-i-plan-to-close-the-gap-on-these-missing-skills-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#how-i-plan-to-close-the-gap-on-these-missing-skills-">How I plan to close the gap on these missing skills 🎯&lt;/a>
&lt;/h3>
&lt;p>I plan to close this gap by learning more about general Linux security and networking principles from this course. Additionally, I&amp;rsquo;ve already purchased a recently published book by Michael Lucas on running and maintaining mail servers, which I intend to skim through. Additionally, I am studying ITIL to improve my understanding of technical support and service management.&lt;/p>
&lt;h3 id="prolug-links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pacu1/#prolug-links-">ProLUG Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>Actually completing VimTutor</title><link>https://trevorsmale.github.io/techblog/post/vt/</link><pubDate>Tue, 10 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/vt/</guid><description>&lt;h3 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#intro">Intro&lt;/a>
&lt;/h3>
&lt;p>Vim is a program created by the late Bram Moolenaar as an improvement to an older program called Vi. It is a modal text editor, meaning there are different modes of usage — I&amp;rsquo;ll get into that later. While strongly associated with UNIX systems, Vim is available on other platforms as well. It is used to efficiently create and modify files from a simple terminal, requiring very limited system resources. Vim is a foundational tool for mastering Linux, allowing one to navigate the directory structure and edit configuration files like no other. Furthermore, Vi and/or Vim come bundled with most minimal Linux distributions.&lt;/p>
&lt;h3 id="vim-tutor">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#vim-tutor">Vim Tutor&lt;/a>
&lt;/h3>
&lt;p>Vim Tutor is an in-built interactive tutorial that comes pre-packaged with Vim, designed to bring novices up to speed with the various modes and functions of this nimble tool. I had hopped into Vim Tutor before but never felt the need to complete it, as it seemed long and complex. Recently, my teacher and mentor Scott C. mentioned that this would be one of the first lessons we would undertake as part of the ProLUG system administration course. Being a dedicated student, I decided to give it my full attention — and I’m glad I did.&lt;/p>
&lt;h3 id="the-halfway-point">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#the-halfway-point">The Halfway Point&lt;/a>
&lt;/h3>
&lt;p>In previous attempts, I had reached the halfway point and felt confident I had gained enough information to edit files. Some functions are unintuitive at first, like using the &lt;code>hjkl&lt;/code> keys for navigation instead of arrow keys. There are many jokes about the overload people feel when they first encounter Vim&amp;rsquo;s conventions. Jokes like never being able to exit the program or forgetting one&amp;rsquo;s own name after memorizing commands are common. Mastering Vim requires memorizing commands until they become second nature, which simply takes time. This is why I hadn&amp;rsquo;t completed Vim Tutor before — there’s only so much one can absorb before needing a break. However, this time, I was able to make it through to the end, pleasantly surprised by the new techniques I had learned.&lt;/p>
&lt;h3 id="understanding-the-modes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#understanding-the-modes">Understanding the Modes&lt;/a>
&lt;/h3>
&lt;p>Modes are what make Vim a powerful tool. There are three modes in Vim: Normal, Insert, and Visual.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Normal mode&lt;/strong> is the default mode, where you navigate a document using motions. It protects the document from accidental modifications and allows for a broader range of single-key commands.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Insert mode&lt;/strong> is where characters or strings are added — fairly self-explanatory.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Visual mode&lt;/strong> allows you to make selections, much like clicking and dragging with a mouse to highlight text.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Although I had known about these modes, it once seemed improbable that I would ever memorize them well enough to use them reflexively. However, with practice, I have done just that. Combining motions and commands can lead to huge efficiency gains. For example, you can navigate to a specific line, delete the first three letters, and paste something at the end of the line with just a few keystrokes.&lt;/p>
&lt;h3 id="what-i-recently-picked-up">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#what-i-recently-picked-up">What I Recently Picked Up&lt;/a>
&lt;/h3>
&lt;h4 id="stringing-commands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#stringing-commands">Stringing Commands&lt;/a>
&lt;/h4>
&lt;p>What did I actually learn that I will immediately employ? Well, I now have a solid grasp of most single-key commands, so I’ll start stringing commands and motions together, such as deleting three words and appending text to the end of a line.&lt;/p>
&lt;h4 id="global-search-and-replace">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#global-search-and-replace">Global Search and Replace&lt;/a>
&lt;/h4>
&lt;p>Additionally, I had known about global search and replace, but I hadn’t really used it before since it’s only useful for certain file types.&lt;/p>
&lt;h4 id="buffers-and-deleted-lines">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#buffers-and-deleted-lines">Buffers and Deleted Lines&lt;/a>
&lt;/h4>
&lt;p>I also learned that Vim’s buffer, much like a clipboard, stores strings for later use — and deleted lines are stored there as well. I’ll be more mindful of using the buffer going forward.&lt;/p>
&lt;h4 id="running-shell-commands">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#running-shell-commands">Running Shell Commands&lt;/a>
&lt;/h4>
&lt;p>Lastly, running shell commands from within Vim seemed inefficient to me before, since I could easily jump in and out of files. However, I now understand that it can speed things up.&lt;/p>
&lt;h3 id="in-summary">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vt/#in-summary">In Summary&lt;/a>
&lt;/h3>
&lt;p>Vim isn’t something you just pick up on a whim. It’s more like a martial art, where you practice movements until they become second nature. In a world dominated by graphical user interfaces, Vim can seem like a waste of time and effort. Yet, when you’re working under the hood of an operating system, especially on bare-bones UNIX servers, it becomes clear that if everything is a file and many configurations must be made, Vim is the right tool for the job.&lt;/p></description></item><item><title>New WebDev framework</title><link>https://trevorsmale.github.io/techblog/post/vue/</link><pubDate>Wed, 04 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/vue/</guid><description>
&lt;h3 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#intro">Intro&lt;/a>
&lt;/h3>
&lt;p>I frequent a Discord group called ProLUG (Professional Linux User Group). The group is organized around cooperative, project-based learning, led by experienced members. One of these groups, called Coding Cove, is led by Ryan Long (SaltyCatfish). Ryan is a very experienced and senior developer who introduces us to new concepts on a weekly basis.&lt;/p>
&lt;h3 id="vue">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#vue">Vue&lt;/a>
&lt;/h3>
&lt;p>This past weekend, Ryan introduced Vue.js and the ideas behind the framework. We spent over an hour discussing and interacting with Vue, and I came away from the meeting excited to learn more and start building projects.&lt;/p>
&lt;h3 id="why-vue-is-exciting">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#why-vue-is-exciting">Why Vue is Exciting&lt;/a>
&lt;/h3>
&lt;p>What I really liked about Vue is the concept of templates and components. These ideas seemed logical from the start. Templates can be created and reused on multiple pages, while components provide modularity. Together, these features result in a very clean and easy-to-read codebase, especially for larger projects.&lt;/p>
&lt;h3 id="what-i-was-using">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#what-i-was-using">What I Was Using&lt;/a>
&lt;/h3>
&lt;p>Prior to learning about Vue, I had completed a few projects using HTML, Tailwind CSS, and React. While I’m a big fan of Go (for reasons I won’t get into here), I found React to be cumbersome. React often creates messy code, especially when combined with Tailwind.&lt;/p>
&lt;h3 id="go--vue">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#go--vue">Go + Vue?&lt;/a>
&lt;/h3>
&lt;p>After the meeting, I felt inspired to explore combining the power of Go with Vue. I started searching for examples, and it’s definitely doable for simple or small projects. However, when I looked at more advanced projects, the situation became complicated. Gluing a Go backend to a Vue frontend felt relatively simple at first, but when you introduce middleware, SSR/CSR, OAuth2, and more, things quickly become complex.&lt;/p>
&lt;h3 id="then-i-found-nuxt">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#then-i-found-nuxt">Then I Found Nuxt&lt;/a>
&lt;/h3>
&lt;p>Nuxt is a &amp;ldquo;batteries-included&amp;rdquo; framework built on top of Vue. It comes with all the modern build tools and services needed for a professional project, and everything ties together elegantly.&lt;/p>
&lt;h3 id="where-i-am-now">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/vue/#where-i-am-now">Where I Am Now&lt;/a>
&lt;/h3>
&lt;p>I’ve done a deep dive into Nuxt, and it feels very comfortable to work with. After purchasing a course on Udemy, I’ve completed a few simple projects and intend to build a mid-level project soon. With Vue’s templating and components, along with Tailwind’s efficiency, I’m confident I can create a functional and aesthetically pleasing project that runs efficiently across different systems.&lt;/p></description></item><item><title>ProLUG Admin Course 🐧</title><link>https://trevorsmale.github.io/techblog/post/pac/</link><pubDate>Sun, 01 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/pac/</guid><description>&lt;h3 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pac/#intro-">Intro 👋&lt;/a>
&lt;/h3>
&lt;p>I am a member of a fantastic group called the Professional Linux User Group lead by Scott Champine. The home base is on Discord where over 2000 people discuss Linux daily.
Scott and other members teach via Live-Streaming and Interactive Labs with supporting documentation. Scott has created a 16 week deep dive course into linux adminstration starting September 14th that I have gladly enrolled in.
This course will take place every Saturday via a livestream with interactive Q/A wherein participants leave with assignments. This blog is in part, related to the course as I will document my learning among other things.&lt;/p>
&lt;h3 id="links-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/pac/#links-">Links ⛓️&lt;/a>
&lt;/h3>
&lt;p>Discord: &lt;a href="https://discord.com/invite/m6VPPD9usw">https://discord.com/invite/m6VPPD9usw&lt;/a>
Youtube: &lt;a href="https://www.youtube.com/@het_tanis8213">https://www.youtube.com/@het_tanis8213&lt;/a>
Twitch: &lt;a href="https://www.twitch.tv/het_tanis">https://www.twitch.tv/het_tanis&lt;/a>
ProLUG Book: &lt;a href="https://leanpub.com/theprolugbigbookoflabs">https://leanpub.com/theprolugbigbookoflabs&lt;/a>
KillerCoda: &lt;a href="https://killercoda.com/het-tanis">https://killercoda.com/het-tanis&lt;/a>&lt;/p></description></item><item><title>That Unix file is not deleted 👺</title><link>https://trevorsmale.github.io/techblog/post/nd/</link><pubDate>Sun, 01 Sep 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/nd/</guid><description>&lt;p>Removing a file in Unix does not actually remove it from memory. You are only reducing the number of Hard-Links pointing to the file to &amp;lsquo;0&amp;rsquo;.
In order to actually delete the information is to overwrite it. This will happen over time as the disk fills, or if one would like to delete a file in a timely fashion should over write empty drive sectors.&lt;/p></description></item><item><title>Studying for the LPIC1 Certification 📖</title><link>https://trevorsmale.github.io/techblog/post/lpic/</link><pubDate>Fri, 30 Aug 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/lpic/</guid><description>&lt;h3 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#intro-">Intro 👋&lt;/a>
&lt;/h3>
&lt;p>I am intent on becoming a Linux Professional Institute Certified Administrator. It has been a goal of mine for a little while now. However goals are just aspirational, reaching a goal such as this requires a structured, systematic approach. As a life-long learner, I am always improving my study methods by being more efficient with my time and energy. As we all know life can get in the way of our goals, so we must find methods that work when conditions are not ideal for studying. For instance, I brake up my study sessions into smaller, more bite sized chunks that I can do when time permits. I take much more comprehensive notes than I did in the past and I work on wrought memorization through the use of flash cards; something that I really wasn&amp;rsquo;t into before.&lt;/p>
&lt;h3 id="creating-a-work-breakdown-structure">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#creating-a-work-breakdown-structure">Creating a Work Breakdown Structure&lt;/a>
&lt;/h3>
&lt;p>The first thing I do when starting to study a new topic is creating a simple structure from a high level view. A handful of bullet points can simply outline the structure of the knowledge. In regards to the LPIC, most of this had already been done as the curriculum for the exam is open source.&lt;/p>
&lt;h3 id="hands-on-practice">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#hands-on-practice">Hands on practice&lt;/a>
&lt;/h3>
&lt;p>For each item that the course cover, I set up a lab and run through all of the commands by actually typing them in and seeing what kind of errors or typos I may run into. The LPIC has a huge list of commands that we must remember which makes it very difficult for me.&lt;/p>
&lt;h3 id="taking-comprehensive-notes">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#taking-comprehensive-notes">Taking comprehensive notes&lt;/a>
&lt;/h3>
&lt;p>I recently started using LogSeq, a markdown ++ notetaking applicaton that allows for interlinking of notes. This has really upped my game when it comes to keeping track of notes and refering back to them. In the past, I would just take notes for the task at hand, not really refering back to them often. I was just taking notes as a memory retention aid.&lt;/p>
&lt;h3 id="flash-cards">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#flash-cards">Flash Cards&lt;/a>
&lt;/h3>
&lt;p>Another recent addition to my study arsenal is Anki, a smart flashcard application that I use for wrought memorization. The application and many flash card decks are open source, so I was up and running in a short period of time with a large deck of LPIC flashcards.&lt;/p>
&lt;h3 id="udemy--youtube">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/lpic/#udemy--youtube">Udemy / Youtube&lt;/a>
&lt;/h3>
&lt;p>Though video courses are pretty low bandwidth information sources, I still like to follow chapterized courses, especially on Udemy. On a sale day I can grab a comprehensive chapterised video course for less than 20 Dollars, a steal in comparison to a college course.&lt;/p></description></item><item><title>ProxMox for the win 🏆</title><link>https://trevorsmale.github.io/techblog/post/proxmox/</link><pubDate>Mon, 26 Aug 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/proxmox/</guid><description>&lt;h3 id="intro-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#intro-">Intro 👋&lt;/a>
&lt;/h3>
&lt;p>Proxmox is a free, open-source virtualization host built on top of Debian. It can run both virtual machines (VMs) and Linux containers, offering a wide array of features. 🚀&lt;/p>
&lt;p>I&amp;rsquo;m always learning new systems and software. Before using Proxmox, I was repeatedly installing and reinstalling Unix systems on an old laptop. This helped me understand installation, configuration, and a host of other things—but it was very tedious and inefficient. That laptop was underpowered, so running multiple VMs was out of the question. I needed a multicore x86 machine with ample memory to achieve this.&lt;/p>
&lt;p>Wanting to take my systems engineering learning more seriously, I decided to build an x86 machine dedicated to learning without the fear of messing things up. While researching virtualization software, I discovered Proxmox.&lt;/p>
&lt;h3 id="installation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#installation-">Installation 🛠️&lt;/a>
&lt;/h3>
&lt;p>Installing Proxmox is straightforward, especially for someone who has installed many major distros on bare-metal systems. The process involves downloading the latest ISO, creating a boot disk using Balena Etcher, and then following a series of prompts, choosing the target disk and locale—just like a typical Debian installation.&lt;/p>
&lt;h3 id="accessing-proxmox-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#accessing-proxmox-">Accessing Proxmox 🌐&lt;/a>
&lt;/h3>
&lt;p>Once installed, Proxmox operates as a headless network machine. If you plug in a monitor, you&amp;rsquo;ll only see a black screen showing the host address—nothing more. The way to interact with Proxmox is through a browser on a device connected to the same local network.&lt;/p>
&lt;p>For example, I open a browser on my MacBook, navigate to the host&amp;rsquo;s IP address, and am greeted by the login screen. You would have set up your username and password during installation, so just log in from there. 👍&lt;/p>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Proxmox/pctower1.png" alt="PC Tower">&lt;/p>
&lt;h3 id="the-dashboard-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#the-dashboard-">The Dashboard 📊&lt;/a>
&lt;/h3>
&lt;p>Proxmox provides an easy-to-use dashboard that shows system load and memory usage at a glance. Creating a virtual machine is as simple as clicking &amp;ldquo;Create New VM&amp;rdquo; and uploading a suitable ISO. The real learning comes when you automate the process and manage multiple machines.&lt;/p>
&lt;p>&lt;img src="https://trevorsmale.github.io/techblog/images/Proxmox/proxdash.png" alt="Proxmox Dashboard">&lt;/p>
&lt;h3 id="learning-platform-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#learning-platform-">Learning Platform 🎓&lt;/a>
&lt;/h3>
&lt;p>Proxmox gives you the freedom to create, break, and destroy VMs—allowing you to learn new things without sweating the small stuff. Through it, I&amp;rsquo;ve gained a wealth of systems engineering knowledge by completing small projects outside of work.&lt;/p>
&lt;p>I like to create machine templates that can be reused for automated provisioning using tools like Ansible and Terraform. This simulates setting up clusters of machines that need to be pre-configured and communicate with each other.&lt;/p>
&lt;p>I also create Cloud-Init images in Qcow2 format to build templates with randomized SSH keys and uninitialized hostnames, much like how Azure, AWS, or Google Cloud sets up Platform-as-a-Service (PaaS) environments.&lt;/p>
&lt;p>Through Proxmox, I&amp;rsquo;ve gone through installation and configuration procedures for large, complex systems like Kubernetes. This allows me to gain valuable experience with these cumbersome tools before working on similar setups in production environments. 🖥️&lt;/p>
&lt;h3 id="in-summary-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/proxmox/#in-summary-">In Summary 📝&lt;/a>
&lt;/h3>
&lt;p>If you&amp;rsquo;re serious about learning systems engineering and working with multiple machines, I highly recommend setting up a Proxmox machine. Even an older PC can suffice, although some limitations may apply—but that&amp;rsquo;s part of the research and learning process! 😄&lt;/p></description></item><item><title>Linux File Systems Overview 💾</title><link>https://trevorsmale.github.io/techblog/post/fs/</link><pubDate>Sun, 25 Aug 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/fs/</guid><description>
&lt;h2 id="1-ext4--linux-bsd">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#1-ext4--linux-bsd">1. ext4 💾 (Linux, BSD)&lt;/a>
&lt;/h2>
&lt;h3 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#intro">Intro&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>ext4&lt;/strong> (Extended File System version 4) is the default file system for many Linux distributions.&lt;/p>
&lt;h3 id="links">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#links">Links&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Ext4">https://en.wikipedia.org/wiki/Ext4&lt;/a>
&lt;a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-ext4#ch-ext4">https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-ext4#ch-ext4&lt;/a>&lt;/p>
&lt;h3 id="technical-features-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-features-">Technical Features: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Journaling&lt;/li>
&lt;li>Extent-Based Allocation&lt;/li>
&lt;li>Delayed Allocation&lt;/li>
&lt;li>Persistent Pre-allocation&lt;/li>
&lt;li>Multi-block Allocation&lt;/li>
&lt;li>Online Resizing&lt;/li>
&lt;li>64-bit File System Support&lt;/li>
&lt;li>Directory Indexing with HTree&lt;/li>
&lt;li>Defragmentation&lt;/li>
&lt;li>Backward Compatibility with ext2/ext3&lt;/li>
&lt;li>Barriers for Data Integrity&lt;/li>
&lt;li>Large File Support (up to 16 TiB)&lt;/li>
&lt;li>Metadata Checksumming (optional)&lt;/li>
&lt;li>Quotas&lt;/li>
&lt;/ul>
&lt;h3 id="advantages-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#advantages-">Advantages 👍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Mature and Stable&lt;/strong>: ext4 is a well-tested and widely-used file system with a long history of stability.&lt;/li>
&lt;li>&lt;strong>Performance&lt;/strong>: It offers good performance for most workloads, especially for general-purpose usage.&lt;/li>
&lt;li>&lt;strong>Backward Compatibility&lt;/strong>: Supports ext3 and ext2 file systems, making it easy to upgrade.&lt;/li>
&lt;li>&lt;strong>Journaling&lt;/strong>: Provides a journaling feature that helps to prevent data corruption in case of a crash.&lt;/li>
&lt;li>&lt;strong>Wide Support&lt;/strong>: Supported by almost all Linux distributions and has a large community.&lt;/li>
&lt;/ul>
&lt;h3 id="downsides-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#downsides-">Downsides 👎&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Limited Scalability&lt;/strong>: While adequate for most users, ext4 doesn&amp;rsquo;t scale as well as newer file systems for very large volumes and large numbers of files.&lt;/li>
&lt;li>&lt;strong>Lack of Advanced Features&lt;/strong>: ext4 lacks features like snapshotting and built-in data integrity checks (e.g., checksums).&lt;/li>
&lt;/ul>
&lt;h3 id="scale">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#scale">Scale&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Maximum File Size&lt;/strong>: 16 TiB&lt;/li>
&lt;li>&lt;strong>Maximum Volume Size&lt;/strong>: 1 EiB&lt;/li>
&lt;/ul>
&lt;h3 id="distro-usage">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#distro-usage">Distro Usage&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>ext4 is the most widely used format spanning Linux and BSD.&lt;/li>
&lt;/ul>
&lt;h2 id="2-xfs--linux-bsd">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#2-xfs--linux-bsd">2. XFS 💾 (Linux, BSD)&lt;/a>
&lt;/h2>
&lt;h3 id="intro-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#intro-1">Intro&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>XFS&lt;/strong> is a high-performance file system designed for parallel I/O operations, often used in enterprise environments.&lt;/p>
&lt;h3 id="links-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#links-1">Links&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/XFS">https://en.wikipedia.org/wiki/XFS&lt;/a>
&lt;a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-xfs">https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-xfs&lt;/a>&lt;/p>
&lt;h3 id="technical-features--1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-features--1">Technical Features: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Extent-Based Allocation&lt;/li>
&lt;li>Journaling (Metadata Journaling)&lt;/li>
&lt;li>Delayed Allocation&lt;/li>
&lt;li>Persistent Pre-allocation&lt;/li>
&lt;li>Online Resizing (grow only)&lt;/li>
&lt;li>Dynamic Inode Allocation&lt;/li>
&lt;li>B+ Tree Directory Structure - (Quick Access B Tree)&lt;/li>
&lt;li>Direct I/O Support&lt;/li>
&lt;li>Data Striping for Performance&lt;/li>
&lt;li>Advanced Metadata Management&lt;/li>
&lt;li>Large File and Volume Support (up to 8 EiB)&lt;/li>
&lt;li>Online Defragmentation&lt;/li>
&lt;li>Quotas and Project Quotas&lt;/li>
&lt;li>Realtime Subvolume for Real-Time I/O&lt;/li>
&lt;/ul>
&lt;h3 id="advantages--1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#advantages--1">Advantages 👍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>High Performance&lt;/strong>: Optimized for large files and supports high-performance parallel I/O, making it ideal for environments with large data sets.&lt;/li>
&lt;li>&lt;strong>Scalability&lt;/strong>: Scales well with large volumes and large numbers of files, supporting file systems up to 500 TB.&lt;/li>
&lt;li>&lt;strong>Journaling&lt;/strong>: Uses journaling to help prevent data corruption.&lt;/li>
&lt;li>&lt;strong>Online Resizing&lt;/strong>: Supports online resizing of file systems (only grow).&lt;/li>
&lt;/ul>
&lt;h3 id="downsides--1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#downsides--1">Downsides 👎&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Complexity&lt;/strong>: XFS is more complex to manage compared to ext4.&lt;/li>
&lt;li>&lt;strong>Limited Snapshot Support&lt;/strong>: Has limited support for snapshots compared to Btrfs and OpenZFS.&lt;/li>
&lt;li>&lt;strong>Potential Data Loss on Power Failure&lt;/strong>: In certain configurations, XFS may be more susceptible to data loss in the event of a sudden power loss.&lt;/li>
&lt;/ul>
&lt;h3 id="technical-details-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-details-">Technical Details 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Maximum File Size&lt;/strong>: 8 EiB&lt;/li>
&lt;li>&lt;strong>Maximum Volume Size&lt;/strong>: 8 EiB&lt;/li>
&lt;/ul>
&lt;h3 id="distro-usage-1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#distro-usage-1">Distro Usage&lt;/a>
&lt;/h3>
&lt;p>XFS has been in the Linux Kernel since 2001
It is the default file system for RHEL&lt;/p>
&lt;h2 id="3-btrfs--linux">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#3-btrfs--linux">3. Btrfs 💾 (Linux)&lt;/a>
&lt;/h2>
&lt;h3 id="intro-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#intro-2">Intro&lt;/a>
&lt;/h3>
&lt;p>Btrfs (B-tree File System) is a modern, copy-on-write file system designed for Linux that offers advanced features like snapshots, RAID support, self-healing, and efficient storage management, making it suitable for scalable and reliable data storage.&lt;/p>
&lt;h3 id="links-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#links-2">Links&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/Btrfs">https://en.wikipedia.org/wiki/Btrfs&lt;/a>
&lt;a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-btrfs">https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-btrfs&lt;/a>
&lt;a href="https://docs.kernel.org/filesystems/btrfs.html">https://docs.kernel.org/filesystems/btrfs.html&lt;/a>&lt;/p>
&lt;h3 id="technical-features--2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-features--2">Technical Features: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Journaling&lt;/li>
&lt;li>Extent Base Allocation&lt;/li>
&lt;li>Persistent Pre-allocation&lt;/li>
&lt;li>Delayed Allocation&lt;/li>
&lt;li>Multi-block Allocation&lt;/li>
&lt;li>Stripe-aware Allocation&lt;/li>
&lt;li>Resizeable with resize2fs&lt;/li>
&lt;li>*B-tree Balancing Algorithm - Different from XFS (COW B Tee)&lt;/li>
&lt;li>Copy-on-Write (COW)&lt;/li>
&lt;li>Snapshots and Clones&lt;/li>
&lt;li>Built-in RAID Support&lt;/li>
&lt;li>Data and Metadata Checksumming&lt;/li>
&lt;li>Self-Healing&lt;/li>
&lt;li>Dynamic Subvolumes&lt;/li>
&lt;li>Online Resizing&lt;/li>
&lt;li>Compression (LZO. ZLIB. ZSTD)&lt;/li>
&lt;li>Deduplication&lt;/li>
&lt;/ul>
&lt;h3 id="advantages--2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#advantages--2">Advantages 👍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Snapshot Support&lt;/strong>: Provides built-in support for snapshots, allowing for quick backups and rollbacks.&lt;/li>
&lt;li>&lt;strong>Data Integrity&lt;/strong>: Includes checksumming of data and metadata, which helps to ensure data integrity.&lt;/li>
&lt;li>&lt;strong>Self-Healing&lt;/strong>: With RAID support, Btrfs can automatically repair corrupted data.&lt;/li>
&lt;li>&lt;strong>Dynamic Storage&lt;/strong>: Allows for the dynamic addition and removal of storage devices.&lt;/li>
&lt;/ul>
&lt;h3 id="downsides--2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#downsides--2">Downsides 👎&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Stability&lt;/strong>: Btrfs is considered less mature than ext4 or XFS, particularly for certain features like RAID 5/6.&lt;/li>
&lt;li>&lt;strong>Performance&lt;/strong>: May not perform as well as XFS or ext4 in certain high-performance scenarios, particularly with heavy random writes.&lt;/li>
&lt;li>&lt;strong>Complexity&lt;/strong>: The advanced features of Btrfs come with increased complexity.&lt;/li>
&lt;/ul>
&lt;h3 id="technical-details--1">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-details--1">Technical Details 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Maximum File Size&lt;/strong>: 16 EiB&lt;/li>
&lt;li>&lt;strong>Maximum Volume Size&lt;/strong>: 16 EiB&lt;/li>
&lt;li>&lt;strong>Better on SSDs&lt;/strong>: Btrfs is well-suited for flash/solid-state storage because of TRIM support and CoW, which reduces write amplification.&lt;/li>
&lt;/ul>
&lt;h3 id="distro-usage-2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#distro-usage-2">Distro Usage&lt;/a>
&lt;/h3>
&lt;p>Btrfs has been in the mainline linux Kernel since 2008
it is the default file system for SUSE and Fedora&lt;/p>
&lt;h2 id="4-openzfs--unix">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#4-openzfs--unix">4. OpenZFS 💾 (Unix)&lt;/a>
&lt;/h2>
&lt;h3 id="intro-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#intro-3">Intro&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>OpenZFS&lt;/strong> is an advanced file system and volume manager that originated from Sun Microsystems&amp;rsquo; ZFS and is now maintained by the OpenZFS project.&lt;/p>
&lt;h3 id="links-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#links-3">Links&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/OpenZFS">https://en.wikipedia.org/wiki/OpenZFS&lt;/a>
&lt;a href="https://openzfs.org/wiki/Main_Page">https://openzfs.org/wiki/Main_Page&lt;/a>&lt;/p>
&lt;h3 id="technical-features--3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-features--3">Technical Features: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Copy-on-Write (COW)&lt;/li>
&lt;li>Snapshots and Clones&lt;/li>
&lt;li>Pooled Storage (ZFS Storage Pools)&lt;/li>
&lt;li>Dynamic Striping&lt;/li>
&lt;li>Built-in RAID Support (RAID-Z1, RAID-Z2, RAID-Z3)&lt;/li>
&lt;li>Data and Metadata Checksumming&lt;/li>
&lt;li>Self-Healing&lt;/li>
&lt;li>Deduplication&lt;/li>
&lt;li>Compression (LZ4, GZIP, ZLE, etc.)&lt;/li>
&lt;li>Online Resizing&lt;/li>
&lt;li>Dynamic Block Size&lt;/li>
&lt;li>End-to-End Data Integrity&lt;/li>
&lt;li>ZFS Datasets (File Systems and Volumes)&lt;/li>
&lt;li>Adaptive Replacement Cache (ARC)&lt;/li>
&lt;li>Transparent Data Encryption&lt;/li>
&lt;li>ZFS Send/Receive for Backup and Replication&lt;/li>
&lt;/ul>
&lt;h3 id="advantages--3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#advantages--3">Advantages 👍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Data Integrity&lt;/strong>: Uses end-to-end checksums for all data, ensuring high data integrity.&lt;/li>
&lt;li>&lt;strong>Snapshots and Clones&lt;/strong>: Supports efficient, low-overhead snapshots and clones, useful for backups and development.&lt;/li>
&lt;li>&lt;strong>RAID-Z Support&lt;/strong>: Offers advanced RAID options (RAID-Z1, RAID-Z2, RAID-Z3), providing redundancy and fault tolerance.&lt;/li>
&lt;li>&lt;strong>Compression&lt;/strong>: Built-in compression can save space and improve performance in certain workloads.&lt;/li>
&lt;li>&lt;strong>Scalability&lt;/strong>: Designed to handle very large data sets and scales well with both size and number of files.&lt;/li>
&lt;/ul>
&lt;h3 id="downsides--3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#downsides--3">Downsides 👎&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Resource Intensive&lt;/strong>: Can be resource-intensive, particularly in terms of memory usage.&lt;/li>
&lt;li>&lt;strong>Complexity&lt;/strong>: The advanced features and flexibility of OpenZFS come with a steep learning curve.&lt;/li>
&lt;li>&lt;strong>Portability&lt;/strong>: While available on many platforms, it is not as natively supported in Linux as ext4 or XFS.&lt;/li>
&lt;li>&lt;strong>Licensing&lt;/strong>: OpenZFS is licensed under CDDL, which is incompatible with the GPL.&lt;/li>
&lt;/ul>
&lt;h3 id="technical-details--2">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-details--2">Technical Details 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Maximum File Size&lt;/strong>: 16 EiB&lt;/li>
&lt;li>&lt;strong>Maximum Volume Size&lt;/strong>: 256 ZiB (theoretical)&lt;/li>
&lt;/ul>
&lt;h3 id="distro-usage-3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#distro-usage-3">Distro Usage&lt;/a>
&lt;/h3>
&lt;p>Open ZFS is &lt;strong>Not&lt;/strong> available in the mainline Linux Kernel. Rather, it is available through a 3rd party module.
Works on Linux, BSD, and Mac&lt;/p>
&lt;h2 id="hammer2--dragonflybsd">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#hammer2--dragonflybsd">HAMMER2 💾 (DragonflyBSD)&lt;/a>
&lt;/h2>
&lt;h3 id="intro-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#intro-4">Intro&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Hammer2&lt;/strong> is a modern, advanced file system designed for high-performance and scalable storage solutions, particularly in clustered environments. It features robust capabilities such as copy-on-write, data deduplication, and built-in snapshots, providing high data integrity, efficient storage management, and instant crash recovery.&lt;/p>
&lt;h3 id="links-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#links-4">Links&lt;/a>
&lt;/h3>
&lt;p>&lt;a href="https://en.wikipedia.org/wiki/HAMMER2">Wikipedia: HAMMER2&lt;/a>
&lt;a href="https://www.dragonflybsd.org/hammer/">DragonFly BSD Hammer2&lt;/a>&lt;/p>
&lt;h3 id="technical-features--4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-features--4">Technical Features: 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>Clustered File System Support&lt;/li>
&lt;li>Snapshot and Cloning Support&lt;/li>
&lt;li>Copy-on-Write (COW)&lt;/li>
&lt;li>Data Deduplication&lt;/li>
&lt;li>Data Compression (LZ4, ZLIB)&lt;/li>
&lt;li>Data and Metadata Checksumming&lt;/li>
&lt;li>Multi-Volume Support&lt;/li>
&lt;li>Instant Crash Recovery&lt;/li>
&lt;li>Fine-Grained Locking (for SMP scalability)&lt;/li>
&lt;li>RAID Support (1, 1+0)&lt;/li>
&lt;li>Thin Provisioning&lt;/li>
&lt;li>Asynchronous Bulk-Freeing&lt;/li>
&lt;li>Large Directory Support&lt;/li>
&lt;li>Built-in Data Integrity and Self-Healing&lt;/li>
&lt;/ul>
&lt;h3 id="advantages--4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#advantages--4">Advantages 👍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>High Performance&lt;/strong>: Optimized for high-performance and scalable storage solutions.&lt;/li>
&lt;li>&lt;strong>Data Integrity&lt;/strong>: Incorporates checksumming and self-healing features to maintain data integrity.&lt;/li>
&lt;li>&lt;strong>Efficient Storage Management&lt;/strong>: Offers advanced features like data deduplication and compression to manage storage efficiently.&lt;/li>
&lt;li>&lt;strong>Scalability&lt;/strong>: Designed to handle large volumes of data and support clustered environments.&lt;/li>
&lt;/ul>
&lt;h3 id="downsides--4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#downsides--4">Downsides 👎&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Complexity&lt;/strong>: The advanced features and configuration options can introduce complexity.&lt;/li>
&lt;li>&lt;strong>Maturity&lt;/strong>: As a newer file system, it may have fewer tools and less mature support compared to more established file systems.&lt;/li>
&lt;li>&lt;strong>Limited Adoption&lt;/strong>: Less commonly used than other file systems, which may affect community support and documentation.&lt;/li>
&lt;/ul>
&lt;h3 id="technical-details--3">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#technical-details--3">Technical Details 🔍&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Maximum File Size&lt;/strong>: Not explicitly defined, but supports very large files.&lt;/li>
&lt;li>&lt;strong>Maximum Volume Size&lt;/strong>: Not explicitly defined, but designed for large-scale storage.&lt;/li>
&lt;/ul>
&lt;h3 id="distro-usage-4">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#distro-usage-4">Distro Usage&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>DragonFly BSD&lt;/strong>: The primary platform where Hammer2 is used and supported.&lt;/li>
&lt;li>&lt;strong>Limited Availability&lt;/strong>: Not available in mainstream Linux distributions; primarily associated with DragonFly BSD.&lt;/li>
&lt;/ul>
&lt;h2 id="key-concepts--glossary-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#key-concepts--glossary-">Key Concepts / Glossary 🔑&lt;/a>
&lt;/h2>
&lt;h3 id="snapshots-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#snapshots-">Snapshots 📸&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Snapshots&lt;/strong> are read-only copies of a file system at a specific point in time, allowing users to save the state of the file system for backup and recovery purposes. They are efficient and consume minimal space, as only the differences between the current state and the snapshot are stored.&lt;/li>
&lt;/ul>
&lt;h3 id="clones-vs-snapshots-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#clones-vs-snapshots-">Clones vs. Snapshots 📸🧬&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Snapshots&lt;/strong>: Read-only copies of the file system at a specific time.&lt;/li>
&lt;li>&lt;strong>Clones&lt;/strong>: Writable copies of snapshots that can be modified independently.&lt;/li>
&lt;/ul>
&lt;h3 id="raid-z-levels-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#raid-z-levels-">RAID-Z Levels ⛓️&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>RAID-Z1&lt;/strong>: Single parity; can tolerate the loss of one disk.&lt;/li>
&lt;li>&lt;strong>RAID-Z2&lt;/strong>: Double parity; can tolerate the loss of two disks.&lt;/li>
&lt;li>&lt;strong>RAID-Z3&lt;/strong>: Triple parity; can tolerate the loss of three disks.&lt;/li>
&lt;/ul>
&lt;h3 id="raid-5-and-raid-6-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#raid-5-and-raid-6-">RAID 5 and RAID 6 ⛓️&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>RAID 5&lt;/strong>: Stripes data across disks with single parity; can tolerate the loss of one disk.&lt;/li>
&lt;li>&lt;strong>RAID 6&lt;/strong>: Stripes data across disks with double parity; can tolerate the loss of two disks.&lt;/li>
&lt;/ul>
&lt;h3 id="issues-with-raid-56-in-btrfs">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#issues-with-raid-56-in-btrfs">Issues with RAID 5/6 in Btrfs&lt;/a>
&lt;/h3>
&lt;p>Btrfs&amp;rsquo;s implementation of RAID 5/6 is considered unstable due to issues like the write hole problem, making it less reliable for production use. Data integrity may be compromised, leading to potential data loss.&lt;/p>
&lt;h3 id="cddl-license-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#cddl-license-">CDDL License 🪪&lt;/a>
&lt;/h3>
&lt;p>The &lt;strong>Common Development and Distribution License (CDDL)&lt;/strong> is an open-source license created by Sun Microsystems. It is incompatible with the GPL, which can complicate integration with Linux.&lt;/p>
&lt;h3 id="btrfs-self-healing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#btrfs-self-healing-">Btrfs Self-Healing ❤️‍🩹&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Self-Healing&lt;/strong> in Btrfs works by verifying data against checksums and repairing any detected corruption using redundant data stored on other disks in a RAID configuration.&lt;/p>
&lt;h3 id="dynamic-storage-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#dynamic-storage-">Dynamic Storage 🧱&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Dynamic Storage&lt;/strong> refers to the ability to manage multiple storage devices within a single file system, allowing for on-the-fly addition and removal of devices, with the file system automatically balancing data across them.&lt;/p>
&lt;h3 id="online-resizing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#online-resizing-">Online Resizing 🗺️&lt;/a>
&lt;/h3>
&lt;p>&lt;strong>Online Resizing&lt;/strong> allows the resizing of a file system while it is mounted and in use. XFS supports growing the file system online, while Btrfs supports both growing and shrinking.&lt;/p>
&lt;h3 id="b-trees-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#b-trees-">B-Trees ⚖️&lt;/a>
&lt;/h3>
&lt;p>A &lt;strong>B-tree&lt;/strong> is a self-balancing tree data structure that maintains sorted data and allows efficient insertion, deletion, and search operations. B-trees are used in file systems like Btrfs to manage metadata and data blocks.&lt;/p>
&lt;h3 id="extent-base-allocation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#extent-base-allocation-">Extent Base Allocation 👠&lt;/a>
&lt;/h3>
&lt;p>is a method used by modern file systems to manage data storage efficiently. Instead of tracking individual fixed-size blocks, the file system groups contiguous blocks into larger units called extents.&lt;/p>
&lt;h3 id="persistent-pre-allocation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#persistent-pre-allocation-">Persistent Pre-allocation 🎟️&lt;/a>
&lt;/h3>
&lt;p>This technique reserves a specific amount of disk space for a file in advance, ensuring that the allocated space remains available, which helps in reducing fragmentation and guaranteeing storage for large files.&lt;/p>
&lt;h3 id="delayed-allocation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#delayed-allocation-">Delayed Allocation ⏱️&lt;/a>
&lt;/h3>
&lt;p>Delayed allocation defers the assignment of specific disk blocks to file data until the data is flushed to disk, optimizing the allocation process and reducing fragmentation by allowing the file system to make better decisions about where to place data.&lt;/p>
&lt;h3 id="multi-block-allocation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#multi-block-allocation-">Multi-block Allocation ⋔&lt;/a>
&lt;/h3>
&lt;p>Multi-block allocation allows a file system to allocate multiple contiguous blocks at once, rather than individually, improving performance and reducing fragmentation, especially for large files.&lt;/p>
&lt;h3 id="stripe-aware-allocation-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#stripe-aware-allocation-">Stripe-aware Allocation 🧠&lt;/a>
&lt;/h3>
&lt;p>Stripe-aware allocation is used in RAID configurations to ensure that data is distributed evenly across all disks in the array, optimizing performance by aligning data placement with the underlying stripe size of the RAID setup.&lt;/p>
&lt;h3 id="fine-grained-locking-for-smp-scalability-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#fine-grained-locking-for-smp-scalability-">Fine-Grained Locking (for SMP Scalability) 🚀&lt;/a>
&lt;/h3>
&lt;p>Fine-grained locking applies locks at a granular level, allowing multiple processors to concurrently access different parts of the file system, enhancing performance and scalability in multi-core environments.&lt;/p>
&lt;h3 id="raid-10-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#raid-10-">RAID 1+0 🖇️&lt;/a>
&lt;/h3>
&lt;p>RAID support includes configurations such as RAID 1 for data mirroring and RAID 1+0 for combining mirroring with striping to provide both redundancy and improved performance.&lt;/p>
&lt;h3 id="thin-provisioning-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#thin-provisioning-">Thin Provisioning 🔮&lt;/a>
&lt;/h3>
&lt;p>Thin provisioning allocates disk space on-demand rather than reserving it all upfront, optimizing storage utilization by only using the space actually required by data.&lt;/p>
&lt;h3 id="asynchronous-bulk-freeing-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#asynchronous-bulk-freeing-">Asynchronous Bulk-Freeing 🗑️&lt;/a>
&lt;/h3>
&lt;p>Asynchronous bulk-freeing performs large-scale space reclamation in the background, allowing the file system to manage deletions efficiently without impacting overall performance.&lt;/p>
&lt;h3 id="large-directory-support-">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/fs/#large-directory-support-">Large Directory Support 🏢&lt;/a>
&lt;/h3>
&lt;p>Large directory support enables efficient management of directories with a vast number of entries, using optimized data structures to ensure fast performance for directory operations.&lt;/p></description></item><item><title>My WebDev Preferences 👍</title><link>https://trevorsmale.github.io/techblog/post/ws/</link><pubDate>Sat, 24 Aug 2024 00:00:00 +0000</pubDate><guid>https://trevorsmale.github.io/techblog/post/ws/</guid><description>
&lt;h3 id="intro">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/ws/#intro">Intro&lt;/a>
&lt;/h3>
&lt;p>This blog will likely be dominated by Linux talk as that is what I spend most of my time with. However, I do full-stack web development on occlusion.
In fact, I have worked as a professional web Designer/Developer on and off, doing simple full stack projects in a range of languages. Recently, I have been stepping up my game with the intention of creating web applications with great GUIs, not only information pages. I think that with mature Javascript frameworks like NextJS or React and WASM (Web Assembly), we are going to see high performance desktop applications transition to being web-apps. This potential has me excited about learning more sophisticated tools.&lt;/p>
&lt;h3 id="go">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/ws/#go">GO&lt;/a>
&lt;/h3>
&lt;p>Golang is a dead simple systems focused language created by GOATED Unix contributors. When I started picking up Go a few years back, it was not really popular. Web development was dominated by NodeJS on the backend and there were no job posting for the skill. However, I tend to have good instincts and decided to eschew Node in favor of GO. I am very happy with this decision as it is clear, strongly typed, easy to set up and fast as hell.
You can classify me as a GO enjoyer and back-ned deployer. GO now has a built-in HTTPs service and muxer, so it is my go-to for serving static and dynamic content.&lt;/p>
&lt;h3 id="tailwind">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/ws/#tailwind">TailWind&lt;/a>
&lt;/h3>
&lt;p>I really regret not checking out TailWind CSS earlier, it is so nice. I totally had the wrong idea and thought that it was just another annoying framework that over complicates and I was sorely wrong. It really helps in combination with GO templates to create beautiful responsive layouts. There is not much too a simple TW setup, just a simple call-out in the header. When things needs to be more expansive, one can use a config file to specify rules.
I think I will be using a lot more TW in the future.&lt;/p>
&lt;h3 id="react">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/ws/#react">React&lt;/a>
&lt;/h3>
&lt;p>I am not a major fan of JS because I am a fan of simplicity, alas it is the language of the Web, so I must tango with wild syntax. Most web experiences require reactive interaction and content delivery. I am not locked into react as there are so many similar frameworks, but I am saying it is a must in ones stack.&lt;/p>
&lt;h3 id="vscode">
&lt;a class="Heading-link u-clickable" href="https://trevorsmale.github.io/techblog/techblog/post/ws/#vscode">VSCode&lt;/a>
&lt;/h3>
&lt;p>Having a customizable proper IDE is important for getting things done. As much as I like learning Vim, Helix, or even Sublime, I know that no-matter the level of configuration it wont even come close to a proper IDE that lints, detects bugs, has a large ecosystem of plug-ins and comfy features like workspaces and built in problem console. If you just want to make stuff, then reduce your cognitive overhead and utilize a user friendly IDE.&lt;/p></description></item></channel></rss>