<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marcus - Security Projects on Medium]]></title>
        <description><![CDATA[Stories by Marcus - Security Projects on Medium]]></description>
        <link>https://medium.com/@HireMarcus?source=rss-dbd238f3c302------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Marcus - Security Projects on Medium</title>
            <link>https://medium.com/@HireMarcus?source=rss-dbd238f3c302------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 09:55:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@HireMarcus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Link Aggregation Deployment on Juniper EX3400]]></title>
            <link>https://medium.com/@HireMarcus/link-aggregation-deployment-on-juniper-ex3400-0c4efa085089?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c4efa085089</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 04:15:24 GMT</pubDate>
            <atom:updated>2025-08-27T04:15:24.983Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever needed to increase bandwidth and resilience between network switches? Link Aggregation, or LAG, is the perfect solution. It bundles multiple physical interfaces into a single logical one, giving you more bandwidth and a redundant connection. In this lab, we practiced configuring a LAG between two switches to create a single, robust connection.</p><h3>The Setup</h3><p>We used two switches, let’s call them <strong>SW1.1</strong> and <strong>SW1.2</strong>, and configured two interfaces on each: ge-0/0/24 and ge-0/0/30. Our goal was to bundle these four interfaces into two logical interfaces, <strong>ae0</strong> on SW1 and <strong>ae1</strong> on SW2.</p><h3>Step-by-Step Configuration</h3><p>The process was nearly identical on both switches. The key was to ensure the configuration on one switch mirrored the other, with slight variations to account for each switch’s unique identity.</p><ol><li><strong>Chassis and Aggregated Ethernet Interface:</strong> We began by configuring the chassis on both switches to create the aggregated ethernet interface. On SW2, we had to use a device count higher than 1 for our aggregated interface, since ae0 was already in use.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*uexYZRZ-R6QtiKmN" /></figure><p><strong>Deleting Existing Configurations:</strong> We had to remove any existing Layer 2 or Layer 3 configurations from the physical interfaces (ge-0/0/24 and ge-0/0/30). A key rule of thumb for LAG is that the physical interfaces must be clean before you can bundle them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/0*Er5J6WJBbrqcGfse" /></figure><p><strong>Configuring Interfaces for LAG:</strong> Next, we assigned the physical interfaces to their respective aggregated ethernet interfaces (ae0 on SW1 and ae1 on SW2) using the ether-options command.</p><p># set interfaces ge-0/0/24 ether-options 802.3ad ae0 <br># set interfaces ge-0/0/30 ether-options 802.3ad ae0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/0*I0BecCHXdW3TtjyS" /></figure><p><strong>Configuring Trunk Interfaces:</strong> We then configured the logical interfaces (ae0 and ae1) as <strong>trunk interfaces</strong>, which allows them to carry traffic for multiple VLANs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*2GvsPcNvwIImEapu" /></figure><ul><li># set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk</li><li><strong>Allowing All VLANs:</strong> Next, we configured the trunk interfaces to allow all VLANs to pass through. This is a critical step for ensuring network connectivity.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/0*NS1VfW7UGv3J1InD" /></figure><p># set interfaces ae0 unit 0 family ethernet-switching vlan members all</p><p><strong>Enabling LACP:</strong> We enabled <strong>LACP (Link Aggregation Control Protocol)</strong> in active discovery mode. This allows the switches to automatically discover and bundle the links. We also set the periodic mode to <strong>fast</strong> for quicker link-up detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/0*BEgmGthlsjUB7xWH" /></figure><p><strong>Committing the Configuration:</strong> Finally, we committed the configuration. If successful, we could confirm that ae0 on SW1 and ae1 on SW2 were up by running the command show interfaces ae* terse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/0*5yXzrLbhxE0ppbgw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*qDoPQLid-P5fjvIs" /></figure><p>We can confirm connecitivty via trunk port between switch 1 and switch 2 by pinging the LAW vlan IRB interface on switch 2 from switch 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*Qw7PW7HtnzcwjMcA" /></figure><h3>Troubleshooting and Lessons Learned 🐛</h3><p>My first attempt at this lab wasn’t without its challenges! The commit check failed, but this was a great learning experience.</p><ul><li><strong>VLAN Trunking Error:</strong> I initially forgot to configure the trunk interface to allow all VLAN members. The commit check quickly caught this, reminding me that a trunk port needs to know which VLANs it’s allowed to carry.</li><li><strong>RSTP Configuration:</strong> The second error was that <strong>RSTP (Rapid Spanning Tree Protocol)</strong> was configured on the individual physical interfaces. For LAG to function correctly, RSTP should be configured on the aggregated interface itself, not the member interfaces. I had to delete the RSTP configuration from the individual interfaces on both switches.</li></ul><p>After fixing these issues and re-committing, everything worked perfectly! We confirmed connectivity by pinging between the switches on a configured VLAN, proving that our link aggregation was a success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c4efa085089" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enterprise Switch Deployment & Provisioning w/ EX 3400]]></title>
            <link>https://medium.com/@HireMarcus/enterprise-switch-deployment-provisioning-w-ex-3400-316573435f49?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/316573435f49</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 04:06:08 GMT</pubDate>
            <atom:updated>2025-08-27T04:06:08.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever needed to quickly provision a new network device to match an existing one? Manually configuring a new switch to match the settings of another can be a tedious and error-prone process. This project is all about streamlining this task by exporting the configuration from one switch and using it to efficiently set up a second one. This method saves you time and ensures consistency across your network devices.</p><h3>Step 1: Exporting the Running Configuration</h3><p>The first step in this project was to capture the configuration from our existing switch. Instead of using a standard show running-config command, we used a more efficient method that provides the configuration in a set of commands that are ready to be loaded onto another device. The command used was:</p><p>#show configuration | display set</p><p>This command provides the configuration in a format that shows exactly what was “set” on the device, making it ideal for our purpose. We copied the output of this command to a text file, which served as our template for the new switch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*szLej-lC8wQ0epBH" /></figure><h3>Step 2: Preparing the New Switch</h3><p>Before we could load the configuration onto the new switch, it needed some initial setup. The first task was to configure <strong>root authentication</strong> to secure the device. After that, we needed to disable the <strong>auto-upgrade feature</strong> to prevent any unintended firmware updates that could interfere with our configuration process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/0*uXEVUqi3aXWJy3Zn" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/0*cIX5x0JAuHPxWkCQ" /></figure><h3>Step 3: Customizing the Configuration File</h3><p>A direct copy-and-paste of the configuration wouldn’t work because some settings, like IP addresses and VLAN names, needed to be unique to the new switch. We opened the text file we created earlier and edited it, replacing the old IP addresses and VLAN names with the new ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/0*gjURxMfJQ_mFbr5w" /></figure><p><strong><em>Pro-tip:</em></strong> It’s crucial to be meticulous during this step. A common mistake is forgetting to change all the necessary values. This happened during the initial attempt, which required rolling back the config and starting the process over. Double-checking your work here will save you a lot of headaches later! 🤕</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/0*wWSvHJVzwZSOgrV1" /></figure><h3>Step 4: Loading and Committing the Configuration</h3><p>With the configuration file now tailored for our new switch, we were ready to load it. We logged into the new switch and used the <strong>Load Set Terminal</strong> command. This command allowed us to paste the entire contents of our modified text file directly into the switch&#39;s command line interface.</p><p>Once the commands were pasted, the switch was ready to apply the changes. We used the <strong>commit</strong> command to finalize the new configuration.</p><h3>Step 5: Verification and Final Checks</h3><p>After the commit, we performed a few checks to ensure everything worked as intended. We confirmed that the new switch had the identical configuration as the original, with the exception of the updated IP addresses. We also verified that the different VLANs on the new switch could communicate with each other by pinging between them, confirming the configuration was successfully applied. This final step is vital to ensure network connectivity and stability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/0*YQfX_mTItClvFgSI" /></figure><p>By following these steps, we successfully provisioned a new switch quickly and efficiently, demonstrating a powerful and practical method for managing network devices at scale.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=316573435f49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enterprise Network Segmentation and Inter-VLAN Routing on Juniper EX3400]]></title>
            <link>https://medium.com/@HireMarcus/enterprise-network-segmentation-and-inter-vlan-routing-on-juniper-ex3400-0454408552b1?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/0454408552b1</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 02:48:44 GMT</pubDate>
            <atom:updated>2025-08-27T02:48:44.944Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s connected world, simply having a single, flat network for all your devices just isn’t good enough. It’s a security risk, a performance bottleneck, and a management headache. That’s why we use <strong>network segmentation</strong>.</p><p>By dividing our network into smaller, isolated segments, we can boost security, improve performance, and make management a whole lot easier. The best way to do this on a switch is with <strong>VLANs</strong>, or Virtual Local Area Networks.</p><p>This post will walk you through a practical example of how to design and configure a segmented network on a Juniper EX3400 switch. We’ll use VLANs to isolate traffic for different departments, ensuring that sensitive data stays exactly where it needs to be.</p><h3>Step 1: The Network Blueprint 🗺️</h3><p>Before we touch a single command, we need a plan. Our objective is to create a network with five distinct departments, each with its own logical segment.</p><p>Here’s our breakdown:</p><ul><li><strong>Law</strong> ⚖️: <strong>VLAN ID 10</strong> | <strong>IP Subnet:</strong> 10.0.10.0/24 (For sensitive legal documents)</li><li><strong>Hospital</strong> 🏥: <strong>VLAN ID 20</strong> | <strong>IP Subnet:</strong> 10.0.20.0/24 (For medical records and lab equipment)</li><li><strong>Accounting</strong> 💰: <strong>VLAN ID 30</strong> | <strong>IP Subnet:</strong> 10.0.30.0/24 (For financial systems)</li><li><strong>IT</strong> 💻: <strong>VLAN ID 40</strong> | <strong>IP Subnet:</strong> 10.0.40.0/24 (For administration and support tools)</li><li><strong>Guest</strong> ☕: <strong>VLAN ID 50</strong> | <strong>IP Subnet:</strong> 10.0.50.0/24 (For internet-only access, isolated from the rest of the network)</li></ul><h3>Step 2: Creating the VLANs 🏗️</h3><p>The first step is to create the logical VLANs on our switch. Think of this as creating the empty rooms in our building plan. The <strong>VLAN ID</strong> is the unique identifier for each room.</p><p>To create the VLANs, we use the set vlans command. Here&#39;s how we&#39;d create the VLAN for our Accounting department:</p><p>The first step was to create the VLANS<br><strong># set vlans ACCOUNTING vlan-id 30<br># set vlans ACCOUNTING description “Cash Rules”</strong></p><p>We’d repeat this for each of our five departments, giving each a descriptive name and the corresponding VLAN ID from our plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*RzK8MDQdGWl0kUE5" /></figure><h3>Step 3: Assigning Ports 🚪</h3><p>Now that the VLANs exist, we need to connect our devices to them. There are two main types of ports we’ll use: <strong>access ports</strong> and <strong>trunk ports</strong>.</p><ul><li><strong>Access Ports</strong>: These are for end devices like a computer or a printer. An access port can only belong to a single VLAN.</li><li><strong>Trunk Ports</strong>: These are for connecting to other switches or to a router. A trunk port can carry traffic for multiple VLANs at the same time.</li></ul><p>For our Law department, let’s assign interface ge-0/0/1 to its VLAN. We&#39;ll set the interface mode to access and then assign it as a member of the LAW VLAN.</p><p><strong># set interface ge-0/0/1 unit 0 family ethernet-switching interface-mode access<br># set interface ge-0/0/1 unit 0 family ethernet-switching vlan members LAW</strong></p><p>We’ll do the same for a port in each department.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*wCFBwuGktE_ze26A" /></figure><p>For our trunk port, which we’ll use to connect to our router, we’ll configure it on ge-0/0/0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/0*4K1UpKB6wG0sNuJM" /></figure><h3>Step 4: Inter-VLAN Routing with IRB 💻</h3><p>A VLAN is a Layer 2 concept, but to allow communication between different VLANs, we need to introduce a Layer 3 element. This is where an <strong>Integrated Routing and Bridging (IRB)</strong> interface comes in.</p><p>An IRB interface is a virtual Layer 3 interface that serves as the gateway for its VLAN. To give a VLAN an IP address, we’ll configure a new IRB unit and assign an IP subnet to it, as per our blueprint.</p><p><strong>#set irb unit 10 family inet address 10.0.10.1/24</strong></p><p>We’ll repeat this for each of our five VLANs. The IRB interface is what will allow us to control which departments can talk to each other later with firewall policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*oj-nDjVE6wW0Nh3q" /></figure><h3>Step 5: Committing the Configuration ✅</h3><p>The Juniper CLI uses a candidate configuration model. This means all the commands we’ve typed so far are just sitting in a temporary file. Nothing is live until we commit the changes. This is a huge benefit, as it lets you review your work before it affects the live network.</p><p>When you’re ready, simply use the commit command.</p><p>After committing our new configuration we will now see the trunk interface and the access interface associated with each VLAN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*wg2X8G4l6-8FYkPV" /></figure><h3>Step 6: Verifying Connectivity ➡️</h3><p>The final step is to test our work! From a device on the Law VLAN (10.0.10.1), try to ping the IRB address of the Hospital VLAN (10.0.20.1). If you can, your inter-VLAN routing is working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/0*bDMobIkabw2jA_9M" /></figure><p>We successfully designed and configured a segmented network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0454408552b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VLANs w/ Router on a Stick Configuration]]></title>
            <link>https://medium.com/@HireMarcus/vlans-w-router-on-a-stick-configuration-56f2c48fcc95?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/56f2c48fcc95</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 14:56:59 GMT</pubDate>
            <atom:updated>2025-02-12T14:56:59.391Z</atom:updated>
            <content:encoded><![CDATA[<p>In this lab, we explored VLANs and their configuration using the “router on a stick” method. We learned how to segment a network into multiple VLANs and enable inter-VLAN routing using a single router interface. This configuration allowed us to understand the fundamentals of VLAN tagging and how a router can act as a gateway for multiple VLANs over a single physical link.</p><p>This is our lab topology for this lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*WBPFFUxroRpKPOaW" /></figure><p>The first step in this lab is to configure the switches as access ports to the correct VLANS. Below we configured SW1 to VLAN 10 and VLAN 30</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*KCSHrCqZhA_GuVTh" /></figure><p>The next step was to configure the connection between SW1 and SW2 as a trunk, allowing only the necessary VLANs. Configure an unused VLAN as the native VLAN</p><p><strong>#switchport mode trunk</strong></p><p><strong>#switchport mode trunk allowed vlan 10,30</strong></p><p>The last step was to set the native VLAN to an unused vlan<br><strong>#switchport trunk native VLAN 3005</strong></p><p><strong>The Switches need the same native VLAN to communicate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*XC25kKjJ7ztqrlhb" /></figure><p>The last step was to review the created VLANS <strong>#do show vlan brief</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*hvlYISzoXRvURA8-" /></figure><p>Next we repeat the steps on Switch 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*28vpG1ZIiA_tq7Wn" /></figure><p>I guess because we’re trunking to Switch 1 the only VLANs we need to configure for this are the VLANs connected to SW 1 where the router is not directly connected??? Essentially we would only use the trunk connection to send and receive traffic to the router from VLAN 1 so this makes sense.</p><p>The next step was to check and see if all the necessary VLANs exist on the switch via the command<br><strong>#do show interface trunk</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*ubJ1pT4tFvtQ8MFw" /></figure><p>Vlans allowed and active in the management domain only displays VLAN10, this is a problem. We need to make VLAN 30 exist on the switch</p><p>#int g0/1</p><p>#vlan 30</p><p>#do show interface trunk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/0*v79aOZdlE6p-Kc81" /></figure><p><strong>Configure Router on a STICK on between SW2 and R1</strong></p><p>The first step was to configure the Switch Interface. We essentially configured identical to the switch trunk ports, we just included every vlan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*Il3v6Kqq9XkY7NVG" /></figure><p>The next step was to configure the routers SUB INTERFACES with the appropriate VLANs</p><p><strong>Subinterfaces </strong>are logical (VIRTUAL) interfaces on Physical devices.</p><p><strong>Subinterfaces</strong> are used to logically divide a single physical interface into multiple, separate interfaces for different purposes, such as routing between VLANs or creating multiple IP networks on the same physical link.</p><p><strong>#int g0/0.1 — enters sub interface configuration</strong></p><p><strong>#encapsulation dot1q 10</strong></p><p><strong>#ip address 10.0.0.62 255.255.255.192</strong></p><p><strong>#int g0/0.1 — </strong>enters sub interface configuration</p><p><strong>#encapsulation dot1q 10 — </strong>Specifies standard 802.1 encapsulation which is used to tag standard frames with VLAN identifiers. 10 is the VLAN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*MH6asSoL65-drSRL" /></figure><p><strong>The final step was to test connectivity by Pinging from PC4 to PC 6</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*mZ22FR4fekxLMnr3" /></figure><p><strong>Summary</strong></p><p>This lab explored VLAN configuration using the “router on a stick” method. We successfully segmented the network into multiple VLANs and enabled inter-VLAN routing through a single router interface. We configured access ports on the switches, assigned them to specific VLANs, and established a trunk link between the switches, carefully managing allowed and native VLANs. We addressed a connectivity issue by ensuring all necessary VLANs were active on the switches. The “router on a stick” configuration was implemented by creating subinterfaces on the router, each corresponding to a specific VLAN, and assigning appropriate IP addresses. Finally, connectivity between VLANs was validated by pinging between PCs, demonstrating the successful implementation of inter-VLAN routing. This lab provided a practical understanding of VLAN tagging and how a single router interface can act as a gateway for multiple VLANs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56f2c48fcc95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VLANs Basic Configuration]]></title>
            <link>https://medium.com/@HireMarcus/vlans-basic-configuration-79703fb987ce?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/79703fb987ce</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 15:31:38 GMT</pubDate>
            <atom:updated>2025-02-11T15:31:38.284Z</atom:updated>
            <content:encoded><![CDATA[<p>In this exercise, we dove into the world of Virtual LANs (VLANs), a critical technology for segmenting networks and improving performance, security, and manageability.</p><p><strong>Our Lab Environment</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/0*OOno1HnvAkvV3T0H" /></figure><p>The first step was to configure the PCs and set the default gateway in each VLAN. Below we configured PC 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*RNwa_K8keaHD-jsc" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*26TcIWLiNEEHWXp5" /></figure><p>The next step was to make three connections between R1 and SW1. To connect a switch to a router we used a straight through cable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/0*VKResKWOOQcm0vAc" /></figure><p>The next step was to configure the connections/interfaces on the router to correspond with the appropriate VLANS. I added the default gateway of each VLAN to their own interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*XdYuslz1A0tbzQyC" /></figure><p>To confirm everything was properly configured we used the command <strong>#do show ip interface brief</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*0ExOdYT1KdDytabS" /></figure><p>The next step was to configure the interfaces of the switch to the appropriate VLANS. In the example below we will configure the appropriate interfaces to VLAN10. In this example I utilized the commands<strong> #switchport mode access</strong> then <strong>#switchport access vlan 10</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/0*i91qNGd2RK3G6AAt" /></figure><p><strong>Key Concept: </strong>Access Ports belong to a single VLAN</p><p>After configuring the rest of our VLANS the next step was to confirm our configuration with the command <strong>#do show vlan brief</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/0*ujETVtHahYwztDY9" /></figure><p>The next step was to change the name of our vlans. Once in the configuration terminal all I had to do was type the VLAN name I wanted to change, such as <strong>VLAN 10</strong> then <strong>#name ENGINEERING — </strong>this would change VLAN 10s name to ENGINEERING</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/0*NjdQlNQACGBYtSvq" /></figure><p>The final step was to test connectivity via pinging PCs in different VLANS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/0*QRqqrL17FA-XvWr6" /></figure><p><strong>LAB Summary</strong></p><p>In this lab, we successfully implemented VLAN segmentation on a network. We configured PCs and their default gateways, established physical connections between the router and switch, and then configured the router interfaces to support inter-VLAN routing. Crucially, we assigned switch ports to specific VLANs using access ports, effectively isolating traffic between them. We verified our configuration using commands like show ip interface brief and show vlan brief, and finally, tested connectivity by pinging between PCs in different VLANs. This hands-on experience demonstrated the practical steps involved in creating and managing VLANs, highlighting their importance in network organization and traffic management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79703fb987ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Variable Length Subnet Mask]]></title>
            <link>https://medium.com/@HireMarcus/variable-length-subnet-mask-lab-a2023de346ad?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2023de346ad</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 23:19:12 GMT</pubDate>
            <atom:updated>2025-02-11T19:59:54.792Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The Setup:<br></strong>Our lab consisted of multiple LANs of varying sizes, requiring us to carefully plan our subnetting scheme. We adopted a top-down approach, configuring the largest LANs first and working our way down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/0*8XrFk5zScrTGyw9Z" /></figure><p><strong>LAN 2</strong></p><p>LAN 2 was the largest, needing to accommodate 64 hosts. This meant we needed a subnet that could provide at least that many addresses. A /25 subnet mask was the perfect fit, giving us 128 available addresses. We configured the router interface connected to LAN 2 and the PCs within LAN 2 with IP addresses from this subnet. The router interface served as the default gateway for all the PCs on LAN 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/0*jBmf_Uoqpc6mtJA6" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/0*BhbbDex2l6zzaHbS" /></figure><p><strong>LAN 1</strong></p><p>Next, we tackled LAN 1, which required 45 host addresses. A /26 subnet, providing 64 addresses, was the appropriate choice here. Just like with LAN 2, we started by configuring the router’s interface IP address, which also acted as the default gateway. Then, we assigned IP addresses to the PCs on LAN 1, ensuring they all pointed to the router interface as their default gateway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/0*LEINfB5DmG7HK8ws" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/0*i_AJka6GCdQRc71d" /></figure><p>The next was to configure router 2 and its interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*jlAuX8ITyKCw9MDX" /></figure><p>The next step was to configure the PCs with the appropriate IP addresses, subnet mask, and default gateways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/0*ICtYczfZcOYF7f-l" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*Fod4PgIxReD0OnEg" /></figure><p><strong>Routers LAN</strong></p><p>The next step was to configure the routers LAN. The router LAN only has two host so I used a /30 subnet mask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/0*mXtU6XJJn6E98BdB" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/0*gT43PFx8RKBMrPiO" /></figure><p><strong>Static Routing</strong></p><p>After successfully configuring all out the routers and PC with IP addresses, subnet mask, and default gateways the next step was to configure static routes so the PCs could ping each other.</p><p>The first step is to configure the static route to LAN 1 and LAN 2 on Router 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/0*CEolUaD9H1BSp8c-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*taOywevB1pK2lCvr" /></figure><p><strong>Lab Summary</strong></p><p>This was a good lab to reinforce core network concepts such as subnetting, network address, broadcast address, and available IPs. Afer configuring the network we were able to successfully ping the various PCs on the network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/0*HEqhNz6sec8Z3ppe" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2023de346ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Basics — Networking, Docker Commands, Deploying Web App in Docker]]></title>
            <link>https://medium.com/@HireMarcus/docker-basics-networking-docker-commands-deploying-web-app-in-docker-ff60816edcab?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff60816edcab</guid>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 21:49:44 GMT</pubDate>
            <atom:updated>2024-03-24T21:49:44.567Z</atom:updated>
            <content:encoded><![CDATA[<h3>Docker Basics — Networking, Docker Commands, Deploying Web App in Docker</h3><p><strong>Task 1 — Intro to Docker and its Architecture</strong></p><p><strong>Key Concepts</strong><br><strong>Containers</strong> — Isolated area with all the dependencies and libraries added for an application. Isolated area of an operating system, usually have a resource limit.<br>Containers don’t require OS, they use the OS of the server.</p><p><strong>Docker Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/0*8xO2Xy3EFa3yRx9G" /></figure><p><strong>Docker CLI</strong> — The Docker client is the primary interface through which users interact with Docker. It accepts commands from the user and communicates them to the Docker daemon</p><p><strong>Rest API</strong> — Interface for managing optics in the docker</p><p><strong>Docker Daemon</strong> — The actual server or process responsible for creating and managing optics such as images, containers, and networks on a host</p><p><strong>OCI — Open Container Initiative</strong>, is a set of industry standards for container runtimes and image formats. Docker utilizes the OCI specifications for both runtime and image, ensuring compatibility with other containerization tools that adhere to the same standards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/0*vqHgXpVSVKjYdcnW" /></figure><p>containerd — to start, stop, or pause the containers<br>containerd shim — creates daemonless containers and monitors containers<br>runc — responsible for running a container</p><p>The final step in this task was to navigate to the terminal and see which version of docker we install with the command — <strong>docker –version</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*KrnF9t6_W1FiIf38" /></figure><p><strong>Task 2 — Managing Docker as a Service</strong></p><p>The firs step in this task was to check dockers status with the command <strong>systemctl status docker</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*b-bkX2Rdl1ECEIqX" /></figure><p>The command <strong>systemctl stop docker</strong> can be used to stop the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/0*YUQG5LeokpxgiUpF" /></figure><p>Another option to start docker is <strong>sudo dockerd</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/0*4zDHHqoB1FLmcS3-" /></figure><p><strong>sudo dockerd — debug </strong>would allow to run the docker in a debug mode</p><p><strong>Personal Note</strong>: CTRL+C stops the docker in Linux</p><p><strong>Task 3 — Docker CLI Deploy First Docker Container</strong></p><p>The first step in this task is to run the command<br><strong>docker run hello-world</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*-U6PudCVj03eeHwz" /></figure><p>There was no image on the docker machine, so the image was downloaded from the docker registry (dockerhub)</p><p>Personal Note:<br><strong>sudo service –status-all</strong> — check stats of all services<br><strong>sudo dockerd </strong>— starts daemon service</p><p><strong>Troubleshooting:</strong><br>I received this error — <em>Cannot connect to the Docker daemon</em>.<br>To trouble shoot this error I manually started thedaemon with <strong>sudo dockerd</strong> and then checked the status of the service via <strong>sudo service –status-all</strong>. The next step was to remove the pid file via <strong>sudo rm /var/run/docker.pid</strong>. Stop the docker, then restart the docker.</p><p>Next we will use <strong>docker run -itd ubuntu</strong> command to download the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/0*lXIwDeYtN817lCVz" /></figure><p><strong>Task 4 — Docker Commands Part 2</strong></p><p>In this task we’re exploring more Docker commands. The first two commands are stop and rm.<br>Stop — Stops the containers<br>RM — Removes the container</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*7SjyXWK6hLaY3qF-" /></figure><p>To stop all the containers we utilize the command<br><strong>docker container prune</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*XdkBxzcVpGQ4yNw7" /></figure><p>The command to list images in docker is <strong>docker images</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/0*hEzUSWVTARMohbKH" /></figure><p>The command to remove images is <strong>docker rmi</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*z4q787S35C-M6AxD" /></figure><p>Docker only removes images not in use by the container.<br>Dangling images are images not attached to a container.<br><strong>docker image prune</strong> removes all dangling images</p><p><strong>How to Run a Container</strong><br>The first step is to download the image<br><strong>docker pull ubuntu</strong> — this will only download the latest image, not run it<br><strong>docker run ubuntu </strong>— will run the container</p><p>The command to check the docker status is <strong>docker ps -a</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*8X9Hh0ZQ6Bug08FB" /></figure><p>To connect to an already running docker<br><strong>docker exec -it 21 /bin/bash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*d9WQkLpxspUGKfCn" /></figure><p>To run a command in a running docker, but not connect to it — an example command would be.<br><strong>docker exec 21 ls</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*d3C_WntSgUm2bTY1" /></figure><p><strong>docker inspect</strong> can be used to inspect containers or images</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*oWgMHveNMwnK0FRD" /></figure><p>Inspecting containers will produce a JSON file with info about the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/0*FDaKb869Qo3E2khm" /></figure><p><strong>Task 4 — Deploying a Web Application as a Docker Container</strong></p><p>The first step is to download and install Jenkins Image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*cXkI_Prnc_2YoIP9" /></figure><p>After inspect the Jenkins Image we can see what ports Jenkins container runs on</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/0*REDvs8fjtlbHHYx6" /></figure><p>The next step is to map jenkins to the host port. The below command runs in detached mode to port 80 on host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*xR-YUox8d6wz-wWK" /></figure><p>The Jenkins command is successfully up and running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*Y0Clhd1fGIGycO7H" /></figure><p>To view the running container we navigate to port 80 on our local host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/0*f_x9cvHh6ZnCtwbu" /></figure><p>The next step was to unlock Jenkins with the admin password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/0*D_3RTxCEkHGWYgFS" /></figure><p>To view the admin password we utilized the<strong> docker exec </strong>command and <strong>cat </strong>to view the password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/0*jJHOzXqvuBCQlsMq" /></figure><p>With the password we can login into Jenkins on the local host, set up our account, and have successfully deployed Jenkins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/0*yz-_5vYbE2Rj6KpV" /></figure><p><strong>Task 5 — Docker Networks</strong></p><p>Bridge Network — Default Network — Connects to same subnet<br><strong>docker run ubuntu</strong><br>None Network — Not connected to any network at all<br><strong>docker run ubuntu –network=none</strong><br>Host Network — Same network as host<br><strong>docker run ubuntu –network = host</strong></p><p><strong>Docker network ls</strong> — Command for checking networks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/0*bvNYhxW5KS5nA4kf" /></figure><p><strong>docket network inspect id</strong> — command to inspect networks and produce a JSON file</p><p><strong>Creating Container and Assigning Network</strong><br>The first step is to create the container</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/0*u4Zlyq9H8vB96Asc" /></figure><p>Upon inspect the container we can see the container is attached to the default bridge network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*ljVWF2B3swh9veip" /></figure><p>The following command will create a new network, subnet, and name the network<br><strong>docker network create –drive=bridge –subnet=182.1.0.1/16 isolated network</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*DiA7kKpy_DAsFmFS" /></figure><p>The next step is to connect a docker to the network<br><strong>docker run -itd –name=testUbuntu –net=isolatednetwork ubuntu</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/0*jon6lDsmIz7EqPuT" /></figure><p>Upon inspecting the container we can see its connected to the new isolatednetwork</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*nWfy86rF_jCILuWV" /></figure><p>To connect a docker to a new network we utilize the following command<br><strong>docker network connect isolatednetwork ID</strong><br>Below we can see the docker is connected to both the bridge and isolated network now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*9cRhxFQbzN9BF6Bd" /></figure><p><strong>docker network disconnect isolatednetwork ID</strong> — will disconnect from the Network</p><p><strong>docker network rm ID </strong>— to delete a network<br><strong>docker network prune</strong> — to delete all networks not connected to dockers</p><p><strong>Task 5 — Communicating Between Docker Containers</strong></p><p>The first step in this task is to create a new network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*1tQzhK3cMrS6Q1ow" /></figure><p>The next step is to create a new container</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*_eM7Ur3wAwtTlpyD" /></figure><p>The next step is to start a new container and assign it to a network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*jmH2GfRi5Y4mPZvP" /></figure><p>We now have to containers running on different networks — the bridge network and the isolated network</p><p>In order for the containers to communicate they need to share a common network. Below we connect the relaxed_ride container to the isolatednetwork</p><p>The next step was to interact with the container and execute the bashshell, then ping the other container. You can ping with container names or IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/0*QWqrfDeUxR15k3NV" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff60816edcab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure — Implementing Blob Storage and Automating Blob M]]></title>
            <link>https://medium.com/@HireMarcus/azure-implementing-blob-storage-and-automating-blob-m-6df5d108a054?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/6df5d108a054</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Wed, 13 Mar 2024 19:22:07 GMT</pubDate>
            <atom:updated>2024-03-13T19:22:07.407Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure — Implementing Blob Storage and Automating Blob Movement Between Tiers</h3><p>Azure Blob storage is a service for storing large amounts of unstructured data. Blob stands for binary large object.</p><p><strong>Task 1 — Create and Configure Azure Storage Basics</strong></p><p>The first step in this task was to navigate to storage accounts and create a new storage account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/0*o9rtu1wWwt6GXRGU" /></figure><p>In the advanced tab I enabled anonymous access on individual containers. This will allow us to access certain files without an authentication key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/0*z-GNUtZKZWcHtW4b" /></figure><p><strong>Task 2 — Create and Configure Azure Storage Networking</strong></p><p>Moving onto the Networking tab we will enable public access for the sake of this project — this isn’t the most secure thing to do and we will use Microsoft Routing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/0*0iVcTesOcMJGH5Zi" /></figure><p>In the data protection tab we enabled soft delete for various resources as well as the data retention period. Soft delete allows you to recover data you may have deleted over written for X amount of days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/0*RGie41EHkgL3H0A-" /></figure><p>In terms of tracking we enabled versions as well as blob feed so we can maintain previous versions as well as get updated when our blob is changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/0*r_9YBImkd4bmxucg" /></figure><p>In the encryption tab we configured Microsoft Managed Keys. If we wanted an additional layer of encryption we could’ve enabled infrastructure encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/0*2wq8BewbMHcL8ave" /></figure><p>After configuring the encryption we created and deployed our new storage acct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/0*5lmDozTTtSXRS8Zp" /></figure><p><strong>Task 3 — Creating Containers and Uploading Blobs</strong></p><p>The first step in this task is to navigate to our storage account we created in the previous task, click on containers and create a new container with private access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/0*7b7ps-ySBC6vo__X" /></figure><p>The next step was to create two more containers, one with Blob and one with Container anonymous access level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*_E3kzbYLygXboM89" /></figure><p>The next step was upload a file to each container, in this project we uploaded a PNG to each container. After uploading the file we’re able to access the files in containers01 and containers02 because they allow anonymous read-only access. Container one is private and does not allow read only access so we couldn’t access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/0*3v2Do0WHHX2_PdE3" /></figure><p><strong>Task 4- Edit Content of Files in Blob Storage</strong></p><p>The first step in this task is to navigate to our containers and upload a text file. For the sake of this project we will be using container02.</p><p>When uploading the file we chose Block blob for the tile type and we also create a folder for the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/0*xvdufBeLWq0vkeXz" /></figure><p><strong>Key Concept:</strong><br><strong>Block Blobs</strong> — general-purpose storage and scenarios where parallel upload of data is beneficial.<br><strong>Page Blobs</strong> — VM disk storage and scenarios requiring frequent random read and write operations.<br><strong>Append Blobs</strong> — for scenarios where data is continuously added to the end of the blob, such as logging.</p><p>We successfully uploaded the text file and can view it online now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/0*IXL4RFnhH6FrNDOo" /></figure><p>The next step was to edit the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*j4ivrllxL7ihIvEQ" /></figure><p>After saving our edits we refreshed the tab in the web browser and the file was successfully updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/0*CUn9_B_hxYcrZeac" /></figure><p><strong>Task 5 — Azure Blob Storage Snapshots</strong></p><p>The first step in this task is to navigate to the demo.txt file and create a snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/0*dRxgJ3AjqfL-ipTz" /></figure><p>The next step was to edit the text and create another snapshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/0*e4IXl_oo95MQOCSN" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/0*OTh9KlsIGxvPDXSa" /></figure><p>The next step was to edit the file again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*K8xKWfWGsIlQOOBO" /></figure><p>After we refresh our tab we successfully see the file was editied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/0*0ZoJmF18Rob8ZEKb" /></figure><p>To revert the file to a previous state, we chose a snapshot and clicked promote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/0*e_UgsNxRA--uwnuH" /></figure><p>Now when we refresh the webpage we see the state of the snapshot we promoted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/0*BYVPMrvZfWQk-YAw" /></figure><p><strong>Task 6 — Shared Access Signature for Storage Account</strong></p><p><strong>Key Concept</strong><br><strong>Shared Access Signatures</strong> in Azure is a secure way to grant limited access to resources in your Azure storage account, allowing clients to perform specific operations for a defined period.</p><p>The first step in this task is to navigate to our storage account and view the shared access signatures. The next was to configure our shared access permissions and generate the shared access key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/0*eDJ9ZTpXBpijMDej" /></figure><p>After configuring the appropriate permissions, the next step is to open the Azure Storage Explorer and connect to our blob with the SAS key we generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*rQRh9QlpyCUkm2DR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*4Xl2ZDEUGDvRkzVC" /></figure><p><strong>Key Concept:</strong><br>Azure Storage — used for storing and managing various types of data, such as files, blobs, tables, and queues, in a secure and scalable manner within the Microsoft Azure cloud platform.</p><p>After successfully connecting we can view our storage account and blob containers in Azure Storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*7wLqRqcrIGsQDicv" /></figure><p>The next step was to upload a file via Azure Storage, this was a success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/0*Hd8drjnwBYVFsyiR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/0*0cX_VP0aIRVOcAPc" /></figure><p>The next step was to try and delete the file, this was a failure because we did not have the permissions to do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*O8ieIROhP-IpON4L" /></figure><p><strong>Task 7 — Apply Rules for Life Cycle Management</strong></p><p>The first step in this task was to create a container and call it newfolder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*5QoKuXSKaEyvSrQ7" /></figure><p>The next step was to copy blobs from the containers we created in previous task and paste them into the new folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*TxFfTHls_MNnsAcj" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*t08LymhB_1ApwaD6" /></figure><p>The next task was to navigate to lifecycle management and create a new rule.</p><p>The rule below will move the blob to cold storage if it hasn’t been modified in 30 Days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/0*5HLKx58T79soL1cE" /></figure><p>The rule below will move the blob to archive storage if it hasn’t been modified in 120 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/0*KA0jEz_YIOJH1R5y" /></figure><p>The last step was to configure the blob prefix with the appropriate path and apply the rule</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*jfjXBGc1NH3huRmN" /></figure><p>It will take up to 24hrs for the rule to update.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6df5d108a054" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure — Configure IoT Routing]]></title>
            <link>https://medium.com/@HireMarcus/azure-configure-iot-routing-da27fc3c76f6?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/da27fc3c76f6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 05:12:44 GMT</pubDate>
            <atom:updated>2024-03-11T05:12:44.836Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure — Configure IoT Routing</h3><p><strong>Task 1 — Creating and Configuring IOT Hub</strong></p><p>The first step was to navigate to the IOT Hub in services and create a new IOT HUB. In this process I named the IOT HUB, created a resource group for it, and selected the appropriate tier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/0*YnTsg4f9gV2hH1Vo" /></figure><p><strong>Task 2 — Register a New Device for the IoT Hub and Connect IoT Hub to Raspberry Pi</strong></p><p>The first step was to navigate to devices and register a new device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/0*BnyLfYWywwH8-F0u" /></figure><p>After successfully registering the new device, click on the device and view/copy the devices primary connection string.</p><p>The next step was to navigate to the online raspberry pi simulator and insert the primary connection stream and the device name.</p><p>In the Azure portal we now see our device received 36 messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*-rpnUUcPD7y73nmW" /></figure><p><strong>Task 3 — Creating an Azure Storage Account</strong></p><p>In this task were creating a storage account to store the data from our IoT devices. The first step is to navigate to storage accounts and create a new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/0*TXjXk0ut3M7Vl8t6" /></figure><p>After successfully creating the storage account the next step is to create a container in the storage account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/0*WgBbTBZUW-m_h7aR" /></figure><p><strong>Task 4 — Configure Message Routing for IoT Hub</strong></p><p>The first step was to navigate to the IoT Hub&gt;Message Routing and add a route</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/0*bjQ6mioVGD6eBjuc" /></figure><p>After message routing was successfully configured, I navigated to virtual raspberry pi and start sending messages.</p><p>The messages were successfully stored in the containers in our storage account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jzo9cLrpWGK-hex3" /></figure><p>Below you can see the message stored in JSON</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/0*xsZzGqDjTCxu8BfJ" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da27fc3c76f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure — Creating Secure VM and Depoying Web Server]]></title>
            <link>https://medium.com/@HireMarcus/azure-creating-secure-vm-and-depoying-web-server-adc346eea485?source=rss-dbd238f3c302------2</link>
            <guid isPermaLink="false">https://medium.com/p/adc346eea485</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Marcus - Security Projects]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 03:37:09 GMT</pubDate>
            <atom:updated>2024-03-11T05:13:13.658Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure — Creating Secure VM and Deploying Web Server</h3><p><strong>Task 1 — Create a Resource Group</strong><br>The first task was to create a resource group. This step was pretty straight forward. I clicked create resource&gt;create group then proceed to configure the basics and name the resource group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*JwtKc0vgdvWzZe0a" /></figure><p><strong>Key Concept:</strong><br><em>Resource Groups — logical container for organizing and managing related resources within a subscription. It simplifies resource management, deployment, and monitoring in the Azure cloud.</em></p><p><strong>Task 2 — Creating a Virtual Network and Subnet</strong></p><p>The first step in this task was to navigate to the resource group we created in task 1 and add a virtual network to it. When creating virtual networks its important to remember the virtual machine has to be in the same region as the virtual network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/0*OC0QBa6sKAcjkvad" /></figure><p>The next step was to name and configure the subnet. We used /24 notation which would give us 256 possible addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/0*1fQwiaXQr8eh_yUm" /></figure><p>After configuring the subnet I clicked create and our subnet was deployed. We can now see our subnet in the resource group as well as when we navigate to subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*bo3P9ZPVU7ptCaDa" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*QytC7v38VNFBibwr" /></figure><p><strong>Task 3 — Protecting Subnet with Network Security Group</strong><br>The next step was to create a network security group for the subnet.</p><p><strong>Key Concept:</strong><br>Network Security Groups function as virtual firewall that controls inbound and outbound traffic to Azure resources like virtual machines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*s4kH7GMVBCUYrX0r" /></figure><p>The next step was to add the subnet to the network security group we just created. By adding the subnet to the network security group we can control and regulate the inbound and outbound traffic for the associated Azure resources within that subnet, implementing specific security rules to enhance network security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/0*dLgFv9mcc7FglGXW" /></figure><p><strong>Task 4 — Deploy a Bastion to connect to VM<br></strong>The first step was to configure a new subnet for our Bastion</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/0*_1DpbsoL41bateIj" /></figure><p><strong>Key Concept:</strong><br>Bastion — configured and secured server that acts as a gateway between a trusted internal network and an untrusted external network, such as the internet. Usually placed in DMZ</p><p>The next step was to add a bastion to our resource group using the virtual network and resource groups from previous task, as well as the subnet we just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/0*t67x-knXewNsk8Sj" /></figure><p><strong>Task 5 — Create Ubuntu Server Virtual Machine</strong></p><p>The first step was to create and add the virtual machine to our resource group. For our virtual machine we’re using Ubuntu Minimal 20.4 server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/182/0*B9drWNfCXy1zBoqV" /></figure><p>The next step was to configure the VM and add it to our resource group. In this process we created a key pair, turned off public inbound ports, name the VM, as well as selected the size of the VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/0*xfJH-WYzDTpF3KJR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*MoUue-mpgYHMElob" /></figure><p>After configuring the VM the final step was to download the keypair and launch the VM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/0*9p1HDFF8HokxpWsF" /></figure><p><strong>Task 6 — Install Nextcloud via SSH using Bastion</strong></p><p>The first step in this task was to navigate to the VM connect via Bastion with my Keypair. In this its important to select ‘SSH Private Key from Local File’ when choosing authentication type</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/0*Tj6ZFCB1sVR20Dip" /></figure><p>After successfully connecting to the VM the next step was to install nextcloud with the following command:<br>&gt;sudo snap install nextcloud</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*vFGouZPSYqYRX2U-" /></figure><p>The final steps were to create an admin user and self-signed certificate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/0*4IMmJiVTr-twMnmA" /></figure><p><strong>Task 7 — Publish an IP</strong></p><p>The first step in this task was to navigate to the network settings&gt;network interface&gt;IP configurations and ADD a public ip address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/0*SIJ8lq0pTSw7ScRe" /></figure><p>After configuring the public IP, the next step was to configure the machine to allow HTTPs access from my IP. I navigated back to networking and added an inbound rule that allowed my IP over HTTPs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/0*CW64W3_8JAlBzXyr" /></figure><p>With our new inbound rule added we are successfully able to connect to the cloud server via HTTPS from our IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*z5O8VUs39KQbXMNS" /></figure><p><strong>Task 7 — Create DNS Label</strong></p><p>The next step is to configure the DNS for the public IP we published in the previous tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/0*Fq0hAygJofduDcBr" /></figure><p>After configuring DNS the next step was to communicate our DNS label to nextcloud</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/0*M8EObGFfWGxtEwPO" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adc346eea485" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>