<?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 Moniruzzaman Shimul on Medium]]></title>
        <description><![CDATA[Stories by Moniruzzaman Shimul on Medium]]></description>
        <link>https://medium.com/@moniruzzamanshimul?source=rss-d3df8a28b6cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jcsa2H67whuAjcrwTp84WA.jpeg</url>
            <title>Stories by Moniruzzaman Shimul on Medium</title>
            <link>https://medium.com/@moniruzzamanshimul?source=rss-d3df8a28b6cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:22:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@moniruzzamanshimul/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[Securing OCI Workloads with Network Firewall: Architecture, Configuration & Verification]]></title>
            <link>https://medium.com/@moniruzzamanshimul/securing-oci-workloads-with-network-firewall-architecture-configuration-verification-16faef7bae62?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/16faef7bae62</guid>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[oci]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Fri, 19 Sep 2025 03:46:01 GMT</pubDate>
            <atom:updated>2025-09-19T03:47:33.333Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Objective.</strong> This guide demonstrates how to place <strong>OCI Network Firewall (NFW)</strong> in front of public workloads so that <strong>all ingress/egress traffic</strong> is inspected. We will (1) design the layout, (2) create the policy and objects, (3) deploy the firewall, (4) configure routing, and (5) verify — including a second use case for <strong>URL filtering</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0_J8aLZ_A695TC-5Obr3w.png" /></figure><h4>1) Reference Architecture (as in the diagram)</h4><ul><li><strong>VCN:</strong> 10.0.0.0/16</li><li><strong>Public Subnet (VMs):</strong> 10.0.0.0/24 (VM-1 10.0.0.101, VM-2 10.0.0.163 shown for illustration)</li><li><strong>DMZ Subnet (NFW enforcement point):</strong> 10.0.4.0/24 → <strong>NFW private IP:</strong> 10.0.4.100</li><li><strong>Internet Gateway (IGW)</strong></li><li><strong>Routing:</strong> All inbound and outbound flows traverse the NFW</li></ul><p><strong>Route tables at a glance (matches the diagram):</strong></p><ul><li><strong>VM Subnet RT:</strong> 0.0.0.0/0 → 10.0.4.100 (NFW private IP)</li><li><strong>NFW Subnet RT:</strong> 0.0.0.0/0 → Internet Gateway</li><li><strong>IGW RT:</strong> 10.0.0.0/16 → 10.0.4.100 (Target type: Private IP → NFW)</li></ul><p><em>This “firewall-first” pattern ensures both directions are inspected.</em></p><h4>2) Prerequisites (IAM &amp; Network)</h4><p><strong>IAM Policies (example):</strong></p><pre>allow group SecAdmins to manage network-firewall-family in compartment &lt;compartment&gt;<br>allow group SecAdmins to manage virtual-network-family in compartment &lt;compartment&gt;<br>allow group SecAdmins to read audit-events in tenancy</pre><p><strong>Network security:</strong> Ensure <strong>Security Lists/NSGs</strong> on VM and DMZ subnets permit the traffic you intend to pass (e.g., SSH to VM-1, ICMP to VM-2, HTTP/HTTPS egress, health checks).</p><h4>3) Part One — Create the Network Firewall Policy</h4><p>Create the following reusable <strong>objects</strong>; we’ll compose rules from them.</p><h4>3.1 Applications / Application Lists</h4><ul><li><strong>Application (ICMP for VM-2):</strong></li><li><em>Name:</em> ICMP-VM02</li><li><em>Protocol:</em> ICMP <strong>Type 8, Code 0</strong> (echo request)</li><li><strong>Application List (optional):</strong> app-list-icmp → include ICMP-VM02</li><li><em>For this demo we use ICMP as the L7 application object; other L7 signatures may vary by release.</em></li></ul><h4>3.2 Services / Service Lists</h4><ul><li><strong>Service (SSH for VM-1):</strong></li><li><em>Name:</em> svc-ssh-vm01 | <em>Protocol:</em> TCP | <em>Port:</em> 22</li><li><strong>(For URL filtering later)</strong></li><li>svc-http → TCP/80</li><li>svc-https → TCP/443</li><li><strong>Service Lists:</strong></li><li>svc-list-ssh → include svc-ssh-vm01</li><li>svc-list-web → include svc-http, svc-https</li></ul><h4>3.3 URL Lists (for the second use case)</h4><ul><li>url-block-vm1 → www.facebook.com and *.facebook.com</li><li>url-block-vm2 → www.yahoo.com and *.yahoo.com</li></ul><h4>3.4 IP Address Lists</h4><ul><li>iplist-internet-host → your trusted public IP (admin workstation)</li><li>iplist-vm01 → private IP of VM-1</li><li>iplist-vm02 → private IP of VM-2</li></ul><h4><strong>3.5 Security Rules (order matters; top-down evaluation)</strong></h4><p><strong>A. Application control (base scenario):</strong></p><p><strong>A. Application control (base scenario):</strong></p><p>1. <strong>Allow SSH to VM-1</strong></p><p>o <em>Name:</em> allow-ssh-vm01</p><p>o <strong>Source:</strong> iplist-internet-host</p><p>o <strong>Destination:</strong> iplist-vm01</p><p>o <strong>Service List:</strong> svc-list-ssh</p><p>o <strong>Action:</strong> <strong>Allow</strong></p><p>2. <strong>Deny ICMP to VM-1</strong></p><p>o <em>Name:</em> deny-icmp-vm01</p><p>o <strong>Source:</strong> iplist-internet-host</p><p>o <strong>Destination:</strong> iplist-vm01</p><p>o <strong>Application:</strong> ICMP-VM02 (ICMP echo)</p><p>o <strong>Action:</strong> <strong>Drop</strong></p><p>3. <strong>Allow ICMP to VM-2</strong></p><p>o <em>Name:</em> allow-icmp-vm02</p><p>o <strong>Source:</strong> iplist-internet-host</p><p>o <strong>Destination:</strong> iplist-vm02</p><p>o <strong>Application:</strong> ICMP-VM02</p><p>o <strong>Action:</strong> <strong>Allow</strong></p><p>Leave the implicit final “deny all” in place to avoid accidental exposure.</p><p><strong>B. URL filtering (second scenario):</strong> <em>Clone</em> the policy and add:<br> 4) <strong>Block facebook.com from VM-1</strong></p><p>· <em>Name:</em> block-facebook-vm1</p><p>· <strong>Source:</strong> iplist-vm01</p><p>· <strong>Service List:</strong> svc-list-web</p><p>· <strong>URL List:</strong> url-block-vm1</p><p>· <strong>Action:</strong> <strong>Drop</strong></p><p>5. <strong>Block yahoo.com from VM-2</strong></p><p>o <em>Name:</em> block-yahoo-vm2</p><p>o <strong>Source:</strong> iplist-vm02</p><p>o <strong>Service List:</strong> svc-list-web</p><p>o <strong>URL List:</strong> url-block-vm2</p><p>o <strong>Action:</strong> <strong>Drop</strong></p><p>6. <strong>Allow other web traffic (must be last)</strong></p><p>o <em>Name:</em> allow-web-vms</p><p>o <strong>Source:</strong> iplist-vm01, iplist-vm02</p><p>o <strong>Service List:</strong> svc-list-web</p><p>o <strong>Action:</strong> <strong>Allow</strong></p><p>Without rule 6, the default implicit deny would block all other sites.</p><p><strong>4) Part Two — Deploy the Network Firewall</strong></p><p>Console path: <strong>Networking → Network Firewall → Create Network Firewall</strong></p><ul><li><em>Name:</em> Network-Firewall-01</li><li><em>Policy:</em> attach the policy you created (or the cloned URL-filtering policy)</li><li><em>Enforcement Point:</em> <strong>DMZ subnet</strong> (10.0.4.0/24)</li><li>Click <strong>Create</strong>. Provisioning typically takes ~15–20 minutes. The <strong>private IP</strong> (e.g., 10.0.4.100) is available within seconds — note it for routing.</li></ul><p><strong>5) Configure Routing (exactly as in the diagram)</strong></p><ol><li><strong>VM Subnet → NFW</strong></li></ol><ul><li><strong>Route Table (VM Subnet):</strong> add 0.0.0.0/0 → Target: Private IP → 10.0.4.100</li><li><strong>Associate</strong> this RT to the <strong>VM Public Subnet</strong> (10.0.1.0/24)</li></ul><ol><li><strong>NFW Subnet → Internet</strong></li></ol><ul><li><strong>Route Table (DMZ/NFW Subnet):</strong> add 0.0.0.0/0 → Target: Internet Gateway</li><li><strong>Associate</strong> this RT to the <strong>DMZ Subnet</strong> (10.0.4.0/24)</li></ul><ol><li><strong>Internet → VCN via NFW</strong></li></ol><ul><li><strong>Route Table (for IGW):</strong> add 10.0.0.0/16 → Target: Private IP → 10.0.4.100</li><li><strong>Attach</strong> this RT to the <strong>Internet Gateway</strong></li></ul><p>With these three associations, both directions (ingress/egress) are forced through the firewall.</p><p><strong>6) Verification</strong></p><ol><li><strong>NFW status:</strong> confirm the firewall shows <strong>Active</strong>.</li><li><strong>SSH test (allowed):</strong> from the trusted internet host, ssh opc@&lt;VM-1 public IP&gt;.</li><li><strong>ICMP tests:</strong></li></ol><ul><li>ping &lt;VM-1 public IP&gt; → <strong>no reply</strong> (denied)</li><li>ping &lt;VM-2 public IP&gt; → <strong>reply</strong> (allowed)</li></ul><ol><li><strong>URL filtering:</strong> on each VM (or via curl):</li></ol><ul><li>VM-1: curl -I <a href="https://www.facebook.com/">https://www.facebook.com</a> → <strong>blocked</strong></li><li>VM-2: curl -I <a href="https://www.yahoo.com/">https://www.yahoo.com</a> → <strong>blocked</strong></li><li>Other sites (e.g., <a href="https://www.wikipedia.org)/">https://www.wikipedia.org)</a> → <strong>allowed</strong></li></ul><ol><li><strong>Traffic logs:</strong> enable NFW traffic logs and verify rule hits (names you set above will appear in logs).</li></ol><p><strong>7) Operational Tips &amp; Good Practices</strong></p><ul><li><strong>Rule order is critical.</strong> Place specific <strong>deny</strong> rules before broader <strong>allow</strong> rules.</li><li><strong>Least privilege.</strong> Keep the implicit <strong>deny all</strong> at the end; only open what is required.</li><li><strong>Change control.</strong> Clone policies for new use cases (e.g., URL filtering) to reduce blast radius.</li><li><strong>Security Lists/NSGs.</strong> These are evaluated <strong>before</strong> the NFW; keep them consistent with your policy intent.</li><li><strong>High availability.</strong> Place NFW in subnets aligned with your AD/FD design; consider multiple firewalls for resilience as your design evolves.</li><li><strong>Auditability.</strong> Keep traffic logging on; tag rules meaningfully for faster investigations.</li></ul><p><strong>8) Summary</strong></p><p>By positioning <strong>OCI Network Firewall</strong> in a dedicated <strong>DMZ</strong> and steering <strong>all routes</strong> through it, you achieve centralized inspection and policy enforcement. The base scenario demonstrates port/protocol control (SSH and ICMP), while the second scenario adds <strong>domain-level governance</strong> with URL filtering — precisely the behavior reflected in the attached architecture.</p><p><em>Disclaimer: The insights and opinions shared in my posts are my own and do not reflect the official views of my employer.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16faef7bae62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comprehensive Guide to Testing OCI Email Delivery]]></title>
            <link>https://medium.com/@moniruzzamanshimul/comprehensive-guide-to-testing-oci-email-delivery-39701d1b4178?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/39701d1b4178</guid>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[postfix]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[email-delivery]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 16:10:22 GMT</pubDate>
            <atom:updated>2025-01-08T16:10:22.070Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N9uDwOsIUpAaRoEAZjye6w.png" /><figcaption>source: DALL-E Image</figcaption></figure><p>Email delivery plays a critical role in modern cloud infrastructures, enabling seamless communication for transactional and marketing purposes. Oracle Cloud Infrastructure (OCI) Email Delivery provides a secure, high-performance platform for sending emails at scale. This blog explores multiple methods for configuring and testing OCI Email Delivery, offering flexibility for developers and IT professionals to choose the approach that best fits their needs.</p><p>Whether you’re using Postfix, Mailx, or modern programming languages, this guide covers everything from setting up your domain to testing email delivery using various tools.</p><h3>Steps to Configure Your Email Domain</h3><p>Create a Domain in OCI Email Delivery</p><ul><li>Navigate to Developer Services → Application Integration → Email Delivery in the OCI Console. Click Create Email Domain, specify your domain name, and ensure it’s in the correct compartment. Once the domain is active, proceed to the next step.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vc_DGF7SPBGX4YIJ" /></figure><p>Open the Email Domains section and click on Create Email Domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zh3Q1gPCk8zA-Swq" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BjdnDVWixBipEGW9" /></figure><p>Specify the Email Domain Name and ensure you’re in the correct compartment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9CzwDQL9idXvH8jl" /></figure><p>Click Create Email Domain and wait until it becomes active.</p><p>Set Up DKIM (DomainKeys Identified Mail)</p><ul><li>Add a DKIM record to your domain by generating a DKIM selector in the OCI Console. Use the generated CNAME record to configure your DNS.</li></ul><p>In your newly created email domain, click Add DKIM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*geXGtbsMkW0Y1Ohp" /></figure><p>Enter the DKIM Selector in the format: prefix-shortregioncode-yyyyMMdd.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l37dQClTCWsZjpLs" /></figure><p>Generate and copy the CNAME Record and CNAME Value for DNS.</p><p>Click Create DKIM.</p><p>Configure DNS</p><ul><li>Navigate to Networking → DNS Management → Zones. Create a public DNS zone for your domain and add the necessary records, including the DKIM CNAME record. Publish changes to make the DNS configuration live (this may take up to 72 hours).</li></ul><p>Navigate to Networking → DNS Management → Zones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sZUp2WTxWG8WTNVH" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Mp0bepaR7D2oJYi7" /></figure><p>Create a new public DNS Zone using your domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v_mYsWskq8J4RWTi" /></figure><p>Open the zone, go to Records, and click Manage Records.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-0FMZVHbFVAtlPM7" /></figure><p>Add a CNAME record using the DKIM information and publish changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QcltsV2QVeikH8MA" /></figure><p>Wait for DNS changes to propagate (24–72 hours).</p><h3>2. Setting up an Approved Sender</h3><p>An approved sender is required for each email address used with OCI Email Delivery. This ensures email authenticity and compliance with Sender Policy Framework (SPF).</p><h3>Task 1: Create an Approved Sender</h3><p>Go to Email Delivery → Approved Senders in the OCI Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hABBVbnVt_XfQPcN" /></figure><p>Click Create Approved Sender and specify the email address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B-F59ClEOnIwR0PO" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5lnJCcX6T4PeUQPB" /></figure><p>View and copy the SPF information for your region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I4RNoCuB9hX6EbTt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9JbjUsOZwLfWe4Yt" /></figure><h3>Task 2: Add SPF to DNS</h3><p>Return to DNS Management → Zones and open your zone.</p><p>Add a TXT record with the SPF information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-8CIb6LIO22KH82Z" /></figure><p>Publish the changes.</p><h3>Task 3: Verify Configuration</h3><p>Check the Email Domain in the Email Delivery dashboard.</p><p>Ensure DNS, DKIM, and SPF have an Active status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLk96zowK15JcobM" /></figure><h3>3. Testing Email Delivery with Different Methods</h3><p>Testing email delivery is essential to validate the configuration. Here are multiple approaches for testing OCI Email Delivery:</p><h3>Objectives</h3><ul><li>Completion of previous steps</li><li>Generate SMTP credentials</li><li>Oracle Linux VM in OCI</li></ul><h3>Task 1: Generate SMTP Credentials</h3><p>In the OCI Console, go to Profile → SMTP Credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uQDNQ9K-5llBBZIL" /></figure><p>Generate SMTP credentials and copy the username, password, and relay host endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1-e3T7wd4a8g6Ywf" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zRI_M48Jz2urLoXG" /></figure><p>There is one more piece of information you need for your Postfix configuration. Before you leave the console, click the Navigation menu in the upper left, navigate to Developer Services then select Application Integration — Email Delivery. Once at the Email Delivery screen, click Configuration in the left-hand side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wQl9rbNpMJDss4yP" /></figure><p>Copy the Relay Host Public Endpoint and SMTP Ports for use in the next task. Save for use later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2SpM-zJuzIOtz2W0" /></figure><h3>Method 1: Combine Postfix and Mailx?</h3><ul><li>Postfix provides advanced email handling and routing capabilities, making it suitable for production setups.</li><li>Mailx is lightweight and simple, perfect for quickly sending emails during testing.</li></ul><p>Log in to your Linux VM and install Postfix:</p><pre>sudo dnf install -y postfix</pre><p>Allow SMTP traffic through the firewall:</p><pre>sudo firewall-cmd --zone=public --add-service=smtp --permanent<br>sudo firewall-cmd --reload</pre><p>Remove the sendmail package (if installed) and set Postfix as the default Mail Transfer Agent:</p><pre>sudo dnf remove -y sendmail<br>sudo alternatives --set mta /usr/sbin/sendmail.postfix</pre><p>Enable and start Postfix:</p><pre>sudo systemctl enable --now postfix</pre><h3>Configure Postfix</h3><p>Backup the Postfix configuration file:</p><pre>sudo cp /etc/postfix/main.cf /etc/postfix/main.bak</pre><p>Edit main.cf and add:</p><pre>sudo vi /etc/postfix/main.cf<br>relayhost = smtp.email.us-ashburn-1.oci.oraclecloud.com:587<br>smtp_tls_security_level = may<br>smtp_sasl_auth_enable = yes<br>smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd<br>smtp_sasl_security_options =</pre><p>Create and secure the sasl_passwd file:</p><pre>sudo vi /etc/postfix/sasl_passwd<br>#echo &quot;server:port user:pass&quot; | sudo tee /etc/postfix/sasl_passwd<br>echo &quot;smtp.email.us-ashburn-1.oci.oraclecloud.com:587 user:pass&quot; | sudo tee /etc/postfix/sasl_passwd<br>#<br>sudo chown root:root /etc/postfix/sasl_passwd &amp;&amp; sudo chmod 600 /etc/postfix/sasl_passwd #Change the permissions on the sasl_passwd file<br>sudo postmap hash:/etc/postfix/sasl_passwd #Generate the SASL Hash</pre><p>Reload Postfix:</p><pre>sudo postfix reload</pre><h3>Test Email Delivery</h3><p>Install Mailx:</p><pre>sudo dnf install -y mailx</pre><p>Send a test email:</p><pre>#echo &quot;This is a test message.&quot; | mailx -s &quot;Test&quot; -r APPROVEDSENDER@YOURDOMAIN.com RECEPIENTEMAIL@DOMAIN.com<br>echo &quot;This is a test message.&quot; | mailx -s &quot;Test&quot; -r help@m*****l.info *****@gmail.com</pre><p>Check Postfix logs for troubleshooting:</p><pre>sudo tail -f /var/log/maillog</pre><h3>Method 2: Standalone Usage of Mailx</h3><p>In the alternative Mailx-only setup I mentioned earlier:</p><ul><li>Mailx connects directly to the SMTP server (OCI Email Delivery) without relying on Postfix or any other MTA.</li><li>This removes the need for Postfix configuration, making the process more straightforward.</li></ul><p>Install Mailx</p><pre>sudo dnf install -y postfix</pre><p>Configure Mailx</p><pre>sudo cat /etc/mail.rc<br>set smtp=smtp://smtp.email.us-ashburn-1.oci.oraclecloud.com:587<br>set smtp-auth-user=&#39;your_smtp_username&#39;<br>set smtp-auth-password=&#39;your_smtp_password&#39;<br>set smtp-auth=plain<br>set smtp-use-starttls<br>set ssl-verify=ignore</pre><p>Send a Test Email</p><pre>echo &quot;This is a test email from Mailx.&quot; | mailx -s &quot;Test Email&quot; -r help@m*****l.info *****@gmail.com</pre><h3>Method 3: Using Python smtplib</h3><p>Python’s smtplib provides a lightweight solution for sending emails programmatically.</p><h3>Install Python</h3><p>Ensure Python is installed on your system:</p><pre>sudo dnf install python3 python3-pip<br>python --version</pre><h3>Save the Script</h3><p>Open a text editor (e.g., nano or vim) and create a new file:</p><pre>sudo nano send_email.py</pre><pre>import smtplib<br>from email.mime.text import MIMEText<br><br># SMTP Configuration<br>SMTP_SERVER = &quot;smtp.email.us-ashburn-1.oci.oraclecloud.com&quot;<br>SMTP_PORT = 587<br>SMTP_USERNAME = &quot;your_smtp_username&quot;<br>SMTP_PASSWORD = &quot;your_smtp_password&quot;<br><br># Email Content<br>msg = MIMEText(&quot;This is a test email sent using Python.&quot;)<br>msg[&quot;Subject&quot;] = &quot;Test Email&quot;<br>msg[&quot;From&quot;] = &quot;help@mshimul.info&quot;  # Replace with your approved sender address<br>msg[&quot;To&quot;] = &quot;shimul.cse.buet@gmail.com&quot;  # Replace with recipient address<br><br>try:<br>    with smtplib.SMTP(SMTP_SERVER, SMTP_PORT) as server:<br>        server.starttls()  # Initiate secure connection<br>        server.login(SMTP_USERNAME, SMTP_PASSWORD)  # Authenticate with SMTP server<br>        server.sendmail(msg[&quot;From&quot;], msg[&quot;To&quot;], msg.as_string())  # Send email<br>        print(&quot;Email sent successfully!&quot;)<br>except Exception as e:<br>    print(f&quot;Failed to send email: {e}&quot;)</pre><h3>Run the Script</h3><p>Run the Python script using the following command:</p><pre>python3 send_email.py</pre><h3>Verify Email Delivery</h3><ul><li>Check the recipient’s inbox (e.g., *****@gmail.com) for the email.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*r7XXvOyonaJyaJX6" /></figure><ul><li>If the email is not delivered, check for errors printed by the script or refer to the logs.</li></ul><h3>Method 4. Node.js with Nodemailer</h3><p>Nodemailer is a popular library for sending emails using Node.js.</p><h3>Steps:</h3><p>Install Node.js:</p><pre>sudo dnf install -y nodejs</pre><p>Install Nodemailer:</p><pre>npm init -y<br>npm install nodemailer</pre><h3>Create and Run a Script to Send Email</h3><p>Now, you can use nodemailer to send an email.</p><h3>Create a New File</h3><p>Create a new JavaScript file:</p><pre>nano sendEmail.js</pre><p>Paste the following code into the file:</p><pre>const nodemailer = require(&#39;nodemailer&#39;);<br><br>// Configure the SMTP transporter<br>const transporter = nodemailer.createTransport({<br>    host: &#39;smtp.email.us-ashburn-1.oci.oraclecloud.com&#39;,<br>    port: 587,<br>    secure: false, // use STARTTLS<br>    auth: {<br>        user: &#39;your_smtp_username&#39;,<br>        pass: &#39;your_smtp_password&#39;,<br>    },<br>});<br><br>// Email content<br>const mailOptions = {<br>    from: &#39;help@mshimul.info&#39;, // Approved sender address<br>    to: &#39;shimul.cse.buet@gmail.com&#39;, // Recipient address<br>    subject: &#39;Test Email from Node.js&#39;,<br>    text: &#39;This is a test email sent using Node.js and Nodemailer.&#39;,<br>};<br><br>// Send the email<br>transporter.sendMail(mailOptions, (error, info) =&gt; {<br>    if (error) {<br>        return console.log(&#39;Error:&#39;, error);<br>    }<br>    console.log(&#39;Email sent successfully:&#39;, info.response);<br>});</pre><p>Save and exit the file (Ctrl + O, Enter, Ctrl + X).</p><h3>Run the Script</h3><p>Execute the script with Node.js:</p><pre>node sendEmail.js</pre><h3>Verify Email Delivery</h3><p>Check the recipient’s inbox (e.g., *****@gmail.com) to verify that the email was sent successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/0*rZ4MPSg8pCwHl9Xv" /></figure><h3>Method 5: Using curl</h3><p>Prepare an Email File</p><pre>sudo nano email.txt</pre><pre>From: help@m*****l.info<br>To: *****@gmail.com<br>Subject: Test Email from curl<br><br>This is a test email sent using curl.</pre><p>Send the Email</p><pre>curl --url &quot;smtp://smtp.email.us-ashburn-1.oci.oraclecloud.com:587&quot; \<br>     --ssl-reqd \<br>     --mail-from &quot;help@m*****l.info&quot; \<br>     --mail-rcpt &quot;*****@gmail.com&quot; \<br>     --upload-file email.txt \<br>     --user &quot;your_smtp_username:your_smtp_password&quot;</pre><h3>Verify Email Delivery</h3><p>Check the recipient’s inbox (e.g., *****@gmail.com) to verify that the email was sent successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*BQyLQ-yY4fJYJkEY" /></figure><h3>Conclusion</h3><p>Testing OCI Email Delivery can be achieved through a variety of methods, including Postfix, Mailx, Python, Node.js, and curl. Each approach offers unique advantages depending on your requirements. By following this guide, you can confidently set up and verify your OCI Email Delivery configuration, ensuring reliable and secure email communication in your cloud environment.</p><p>Source: <a href="https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/view-workshop?wid=4002">OCI Email Delivery</a></p><p>Try this configuration in your environment, and let us know your feedback or questions!</p><p>Thanks for visiting! I share insights on leadership, career growth, and transformative tech trends. Follow on <a href="https://www.linkedin.com/in/monir/">LinkedIn</a>, <a href="http://twitter.com/mshimul">Twitter,</a> or <a href="http://www.facebook.com/mshimul">Facebook</a> for inspiration and engaging conversations about innovation and progress.</p><p><a href="http://bd.linkedin.com/in/monir">Kh. M. Moniruzzaman</a> drives strategic planning, digital transformation, and emerging technologies, empowering organizations and teams to innovate and create impactful global advancements.</p><p>Recent Posts You May Enjoy:</p><ul><li><a href="https://www.linkedin.com/newsletters/the-idea-factory-7280036398584250368/">View my newsletter</a></li><li><a href="https://www.linkedin.com/pulse/sales-vs-presales-unspoken-tug-of-war-corporate-world-moniruzzaman-b1tle/?trackingId=T2j%2FoLrsRoacFsfryEffDw%3D%3D">Sales vs. Presales: The Unspoken Tug-of-War in the Corporate World</a></li><li><a href="https://www.linkedin.com/pulse/mysterious-new-years-eve-night-shanghai-kh-m-moniruzzaman-0l7kc/?trackingId=tqoBYLkITdSzpeseyhaP4g%3D%3D">A Mysterious New Year’s Eve: A Night in Shanghai</a></li><li><a href="https://www.linkedin.com/pulse/leadership-like-driving-dhaka-traffic-chaotic-doable-moniruzzaman-cvkvc/?trackingId=T2j%2FoLrsRoacFsfryEffDw%3D%3D">Leadership Is Like Driving in Dhaka Traffic: Chaotic but Doable</a></li><li><a href="https://www.linkedin.com/pulse/perfectionism-why-trying-perfect-imperfect-world-bad-moniruzzaman-rzdhc/?trackingId=T2j%2FoLrsRoacFsfryEffDw%3D%3D">Perfectionism: Why Trying to Be Perfect in an Imperfect World is a Perfectly Bad Idea</a></li><li><a href="https://www.linkedin.com/pulse/understanding-self-signed-certificates-signed-ca-kh-m-moniruzzaman-wrqqc/?trackingId=T2j%2FoLrsRoacFsfryEffDw%3D%3D">Understanding Self-Signed Certificates and Certificates Signed by a Certificate Authority (CA)</a></li><li><a href="https://medium.com/@moniruzzamanshimul">medium@moniruzzamanshimul</a></li></ul><p>Disclaimer: The insights and opinions shared in my posts are my own and do not reflect the official views of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39701d1b4178" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Self-Signed Certificates and Certificates Signed by a Certificate Authority (CA)]]></title>
            <link>https://medium.com/@moniruzzamanshimul/understanding-self-signed-certificates-and-certificates-signed-by-a-certificate-authority-ca-3e5672690d9c?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e5672690d9c</guid>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[ca]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[certificate]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 03:10:54 GMT</pubDate>
            <atom:updated>2024-12-24T03:10:54.563Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of cybersecurity and encryption, certificates play a pivotal role in securing communications between systems. While there are multiple ways to generate and use certificates, understanding the difference between self-signed certificates and those signed by a Certificate Authority (CA) is essential for choosing the right approach for your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29VnPI8DJ6Mt3WGkI9wVAw.png" /><figcaption>Source:DALL-E</figcaption></figure><p>This blog will walk you through the processes of generating both types of certificates, comparing their differences, and clarifying when to use each method.</p><h3>What is a Self-Signed Certificate?</h3><p>A self-signed certificate is a certificate where the issuer (the entity that signs the certificate) is the same as the subject (the entity the certificate is issued for). Essentially, you act as your own Certificate Authority.</p><h3>Steps to Create a Self-Signed Certificate</h3><h3>1. Generate a Private Key</h3><p>The private key is the foundation of the certificate. It is used to encrypt and decrypt data securely.</p><pre>openssl genrsa -out private.key 2048</pre><ul><li>This command generates a 2048-bit private key and saves it as private.key.</li></ul><h3>2. Generate the Certificate</h3><p>Using the private key, you create a certificate that is self-signed.</p><pre>openssl req -x509 -new -key private.key -days 365 -out cert.crt -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=YourOrg/CN=example.com&quot;</pre><ul><li>-x509: Indicates that this is a self-signed certificate.</li><li>-days 365: Specifies the certificate’s validity (1 year in this case).</li><li>-subj: Provides details such as country ©, state (ST), locality (L), organization (O), and common name (CN).</li></ul><h3>3. Verify the Certificate</h3><p>You can inspect the certificate to ensure it has been generated correctly.</p><pre>openssl x509 -in cert.crt -text -noout</pre><ul><li>This command displays the certificate’s details in a readable format.</li></ul><h3>What is a Certificate Signed by a Certificate Authority (CA)?</h3><p>A Certificate Authority (CA) acts as a trusted third party that issues certificates to verify the identity of servers, systems, or users. In this setup, the CA signs server certificates, and clients trust certificates signed by the CA.</p><h3>Steps to Create a Certificate Authority and Sign Certificates</h3><h3>Step 1: Generate the CA Private Key</h3><p>The CA’s private key is used to sign other certificates.</p><pre>openssl genrsa -out ca.key 2048</pre><ul><li>This command generates a private key for the CA.</li></ul><h3>Step 2: Generate the CA Certificate</h3><p>Using the private key, create a self-signed certificate for the CA itself.</p><pre>openssl req -x509 -new -key ca.key -days 1024 -out ca.crt -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=YourOrg/CN=YourCA&quot;</pre><ul><li>This creates the CA’s certificate (ca.crt), which will be used to sign other certificates.</li></ul><h3>Step 3: Generate the Server Private Key</h3><p>Create a private key for the server.</p><pre>openssl genrsa -out server.key 2048</pre><h3>Step 4: Generate a Certificate Signing Request (CSR)</h3><p>A CSR contains the server’s details and public key. It is sent to the CA for signing.</p><pre>openssl req -new -key server.key -out server.csr -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=YourOrg/CN=example.com&quot;</pre><ul><li>The CSR (server.csr) is generated using the server’s private key.</li></ul><h3>Step 5: Sign the Server Certificate with the CA</h3><p>Use the CA’s certificate and private key to sign the server’s CSR.</p><pre>openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 500 -sha256</pre><ul><li>This command produces the server’s signed certificate (server.crt).</li></ul><h3>Step 6: Verify the Server Certificate</h3><p>Check the signed certificate to confirm its details.</p><pre>openssl x509 -in server.crt -text -noout</pre><ul><li>This command verifies the server’s certificate.</li></ul><h3>Comparison: Self-Signed vs. CA-Signed Certificates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hlcxir5CWFd3FNuq" /></figure><h3>When to Use Each Method</h3><h3>Use a Self-Signed Certificate When:</h3><ul><li>You need a certificate quickly for internal testing.</li><li>You are securing a single application or server.</li><li>Trust is managed manually, and clients don’t need automatic validation (e.g., local development).</li></ul><h3>Use a CA-Signed Certificate When:</h3><ul><li>You have multiple servers or applications to secure.</li><li>You want a scalable setup with a centralized trust model.</li><li>You are replicating real-world Public Key Infrastructure (PKI) setups for testing.</li></ul><h3>Conclusion</h3><p>Both self-signed certificates and CA-signed certificates have their unique purposes. While self-signed certificates are suitable for simple and short-term needs, a CA-signed approach is essential for scalable, secure setups where trust between systems is critical.</p><p>Understanding these methods allows you to make informed decisions and implement SSL/TLS encryption effectively in your environments. If you’re working on a complex setup and need guidance, don’t hesitate to explore advanced certificate management techniques or seek professional advice.</p><p>Happy encrypting!</p><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e5672690d9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Laravel with Oracle Database on Ubuntu 22.04]]></title>
            <link>https://medium.com/@moniruzzamanshimul/integrating-laravel-with-oracle-database-on-ubuntu-22-04-1b4d38583b84?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b4d38583b84</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[autonomous-database]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Sun, 22 Dec 2024 13:20:43 GMT</pubDate>
            <atom:updated>2024-12-23T05:04:09.016Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>Integrating Laravel, one of the most popular PHP frameworks, with Oracle Autonomous Database (ADB) provides a powerful solution for building secure, scalable, and high-performance web applications. However, setting up this integration requires careful configuration to ensure compatibility and seamless communication between Laravel and Oracle’s cloud infrastructure.</p><p>This guide provides step-by-step instructions, from system preparation to testing the database connection, ensuring you can execute the setup without errors. Each step is explained with clear instructions and best practices, making it ideal for developers aiming for a reliable Laravel-Oracle integration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*DAbeF6PXMLtlLTly397XEw.png" /><figcaption>Source: OpenAI(DALL-E)</figcaption></figure><p>Table of Compatible Versions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*oP0VQxYL0gNYv3gNq9ttog.png" /></figure><h3>Step-by-Step Guide</h3><h4>1. Update and Install Required Packages</h4><p>Run the following commands to update your system and install required packages:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y<br>sudo apt install -y apache2 php8.1 php8.1-cli php8.1-dev php-pear libaio1 unzip curl build-essential<br>sudo apt install -y php8.1-mbstring php8.1-xml php8.1-curl php8.1-intl<br>sudo phpenmod mbstring xml curl intl<br>sudo systemctl restart apache2<br>php -m | grep -E &quot;mbstring|xml|curl|intl&quot;</pre><p>Open the HTTP port (80):</p><pre>sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT<br>sudo netfilter-persistent save<br>sudo systemctl restart apache2</pre><h4>2. Install Oracle Instant Client</h4><p>Download and unzip Oracle Instant Client:</p><pre>wget https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-basic-linux.x64-21.16.0.0.0dbru.zip<br>wget https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip<br>wget https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip<br><br>sudo unzip instantclient-basic-linux.x64-21.16.0.0.0dbru.zip -d /opt/oracle<br>sudo unzip instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip -d /opt/oracle<br>sudo unzip instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip -d /opt/oracle</pre><p>Configure library paths:</p><pre>echo &#39;/opt/oracle/instantclient_21_16&#39; | sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf<br>sudo ldconfig</pre><h4>3. Configure Oracle Wallet</h4><p>Set up Oracle Wallet for database access:</p><pre>sudo mkdir -p /opt/oracle/wallet<br>sudo unzip /home/ubuntu/Wallet_adbtest.zip -d /opt/oracle/wallet</pre><p>Edit sqlnet.ora to include wallet location:</p><pre>sudo nano /opt/oracle/wallet/sqlnet.ora<br>#Add the following:<br>WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY=&quot;/opt/oracle/wallet&quot;)))<br>SSL_SERVER_DN_MATCH=yes</pre><h4>4. Set Environment Variables</h4><p>Add Oracle paths to environment variables:</p><pre>sudo sed -i &#39;s|&quot;$|:/opt/oracle/instantclient_21_16&quot;|&#39; /etc/environment<br>echo &#39;export TNS_ADMIN=/opt/oracle/wallet&#39; &gt;&gt; ~/.bashrc<br>source ~/.bashrc<br>#Verify:<br>echo $TNS_ADMIN</pre><h4>5. Test Oracle Connection</h4><p>Test connectivity to Oracle DB:</p><pre>sqlplus admin/BE***#11@adb***_high</pre><h4>6. Install PHP OCI8 Extension</h4><p>Install OCI8 PHP extension:</p><pre>sudo pecl install oci8-3.2.1<br>#When prompted, provide the Instant Client directory:<br>instantclient,/opt/oracle/instantclient_21_16</pre><p>Enable OCI8 in PHP:</p><pre>echo &#39;extension=oci8.so&#39; | sudo tee -a /etc/php/8.1/cli/php.ini /etc/php/8.1/apache2/php.ini<br>sudo systemctl restart apache2<br>php -m | grep oci8</pre><h4>7. Install Laravel</h4><p>Install Composer and Laravel:</p><pre>sudo apt update<br>sudo apt install curl php-cli unzip<br>curl -sS https://getcomposer.org/installer | php<br>sudo mv composer.phar /usr/local/bin/composer<br>cd /var/www/<br>sudo composer create-project --prefer-dist laravel/laravel oracle-demo</pre><p>Install Laravel OCI8 package:</p><pre>composer require yajra/laravel-oci8</pre><h4>8. Configure Laravel for Oracle</h4><p>Edit .env:</p><pre>DB_CONNECTION=oracle<br>DB_PORT=1522<br>DB_DATABASE=adb***_high<br>DB_USERNAME=ADMIN<br>DB_PASSWORD=&#39;BE***11&#39;</pre><p>Edit config/database.php:</p><pre>&#39;oracle&#39; =&gt; [<br>    &#39;driver&#39;        =&gt; &#39;oracle&#39;,<br>    &#39;tns&#39;           =&gt; env(&#39;DB_DATABASE&#39;, &#39;&#39;),<br>    &#39;host&#39;          =&gt; &#39;&#39;,<br>    &#39;port&#39;          =&gt; env(&#39;DB_PORT&#39;, &#39;1522&#39;),<br>    &#39;database&#39;      =&gt; env(&#39;DB_DATABASE&#39;, &#39;&#39;),<br>    &#39;username&#39;      =&gt; env(&#39;DB_USERNAME&#39;, &#39;&#39;),<br>    &#39;password&#39;      =&gt; env(&#39;DB_PASSWORD&#39;, &#39;&#39;),<br>    &#39;charset&#39;       =&gt; &#39;AL32UTF8&#39;,<br>    &#39;prefix&#39;        =&gt; &#39;&#39;,<br>    &#39;prefix_schema&#39; =&gt; &#39;&#39;,<br>],</pre><p>Add OCI8 Service Provider in config/app.php:</p><pre>&#39;providers&#39; =&gt; [<br>    Yajra\Oci8\Oci8ServiceProvider::class,<br>],</pre><h4>9. Set Up Apache for Laravel</h4><p>Edit Apache configuration:</p><pre>sudo nano /etc/apache2/sites-available/000-default.conf</pre><p>Set DocumentRoot:</p><pre>DocumentRoot /var/www/oracle-demo/public<br>&lt;Directory /var/www/oracle-demo/public&gt;<br>    Options Indexes FollowSymLinks<br>    AllowOverride All<br>    Require all granted<br>&lt;/Directory&gt;</pre><p>Enable mod_rewrite and restart Apache:</p><pre>sudo a2enmod rewrite<br>sudo systemctl restart apache2<br>sudo chown -R www-data:www-data /var/www/oracle-demo<br>sudo chmod -R 775 /var/www/oracle-demo<br>sudo systemctl restart apache2</pre><h4>10. Create a Test Route</h4><p>Edit routes/web.php:</p><pre>use Illuminate\Support\Facades\DB;<br><br>Route::get(&#39;/test-db&#39;, function () {<br>    try {<br>        $data = DB::select(&#39;SELECT * FROM dual&#39;);<br>        return response()-&gt;json($data);<br>    } catch (\Exception $e) {<br>        return response()-&gt;json([&#39;error&#39; =&gt; $e-&gt;getMessage()]);<br>    }<br>});</pre><p>Clear and cache configuration:</p><pre>php artisan config:clear<br>php artisan config:cache</pre><h4>11. Test Laravel and Oracle Connection</h4><p>Visit the test route in your browser:</p><pre>http://&lt;your-server-ip&gt;/test-db</pre><p>Expected output:</p><pre>[<br>    {<br>        &quot;dummy&quot;: &quot;X&quot;<br>    }<br>]</pre><h3>Summary</h3><p>This guide helps you set up Laravel with Oracle Database using Instant Client and configure Laravel for seamless database integration. If you encounter issues, revisit steps for PHP extensions, Oracle Wallet, or Laravel configuration.</p><p>Disclaimer: The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b4d38583b84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comprehensive Guide: Installing Web Servers and Web Applications on OCI VMs and Integrating with…]]></title>
            <link>https://medium.com/@moniruzzamanshimul/comprehensive-guide-installing-web-servers-and-web-applications-on-oci-vms-and-integrating-with-b45071e6a186?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/b45071e6a186</guid>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[web-services]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 02:51:34 GMT</pubDate>
            <atom:updated>2024-12-14T02:51:34.840Z</atom:updated>
            <content:encoded><![CDATA[<h3>Comprehensive Guide: Installing Web Servers and Web Applications on OCI VMs and Integrating with OCI Load Balancer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPOS0YbJXvFb5n3OqYFw2w.png" /><figcaption>Source:OpenAI(DALL-E Image)</figcaption></figure><p>This guide combines setting up Linux-based web servers (Apache, Nginx, and Tomcat), Python-based applications (Flask), Node.js applications, and Windows-based web services (IIS) on Oracle Cloud Infrastructure (OCI) Virtual Machines (VMs). It includes OS-level and VCN-level configurations, web server and application deployment, and integration with OCI Load Balancer for scalability and high availability.</p><h3>1. Prerequisites</h3><h4>OCI Setup</h4><ul><li><strong>OCI Account</strong>: Ensure you have access to create compute instances, networking components, and load balancers.</li><li><strong>VCN Configuration</strong>:</li><li>Virtual Cloud Network (VCN) with:</li><li><strong>Subnets</strong>: Public subnets for VMs.</li><li><strong>Security Rules</strong>:</li><li>Allow inbound traffic for:</li><li>HTTP (port 80)</li><li>HTTPS (port 443)</li><li>Custom ports (e.g., 8080 for Tomcat).</li></ul><h4>System Requirements</h4><ul><li>SSH client for Linux-based VMs.</li><li>RDP client for Windows-based VMs.</li></ul><h3>2. Setting Up OCI VMs</h3><h4>Create a Compute Instance</h4><ol><li>Navigate to <strong>Compute &gt; Instances</strong> in the OCI Console.</li><li>Create a new instance with:</li></ol><ul><li><strong>OS</strong>: Select:</li><li>Ubuntu or Oracle Linux 8 (OL8) for Linux-based deployments.</li><li>Windows Server for IIS-based applications.</li><li><strong>Shape</strong>: Choose the required compute resources.</li></ul><p>3. Attach the instance to the appropriate <strong>VCN</strong> and subnet.</p><h3>3. Configuring OS Firewalls</h3><h4>Linux (Ubuntu/RHEL/OL8)</h4><ol><li><strong>Ubuntu</strong>:</li></ol><pre>sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT<br>sudo netfilter-persistent save</pre><p><strong>2. RHEL/OL8</strong>:</p><pre>sudo yum install firewalld -y<br>sudo systemctl start firewalld<br>sudo systemctl enable firewalld<br>sudo firewall-cmd --permanent --add-port=80/tcp<br>sudo firewall-cmd --reload</pre><h4>Windows Server (IIS)</h4><ul><li>Firewall rules are automatically configured when you enable IIS. If needed, manually open the required ports using the Windows Firewall utility.</li></ul><h3>4. Deploying Web Servers</h3><h4>Apache</h4><ol><li><strong>Ubuntu</strong>:</li></ol><pre>sudo apt update<br>sudo apt install apache2 -y<br>sudo systemctl start apache2<br>sudo systemctl enable apache2</pre><p><strong>2. RHEL/OL8</strong>:</p><pre>sudo yum install httpd -y<br>sudo systemctl start httpd<br>sudo systemctl enable httpd</pre><h4>Nginx</h4><ol><li><strong>Ubuntu</strong>:</li></ol><pre>sudo apt update<br>sudo apt install nginx -y<br>sudo systemctl start nginx<br>sudo systemctl enable nginx</pre><p>2. RHEL/OL8:</p><pre>sudo yum install nginx -y<br>sudo systemctl start nginx<br>sudo systemctl enable nginx</pre><h4>Tomcat</h4><ol><li><strong>Common for Linux</strong>:</li></ol><pre>sudo yum install java-11-openjdk -y  # RHEL/OL8<br>sudo apt install openjdk-11-jdk -y  # Ubuntu<br><br>wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.72/bin/apache-tomcat-9.0.72.tar.gz<br>tar -xvzf apache-tomcat-9.0.72.tar.gz<br>sudo mv apache-tomcat-9.0.72 /opt/tomcat<br>/opt/tomcat/bin/startup.sh</pre><h3>5. Deploying Web Applications</h3><h4>Python (Flask)</h4><ol><li><strong>Install Python</strong>:</li></ol><ul><li><strong>Ubuntu</strong>:</li></ul><pre>sudo apt install python3 python3-pip -y</pre><p><strong>RHEL/OL8</strong>:</p><pre>sudo yum install python3 python3-pip -y</pre><p><strong>2. Install Flask</strong>:</p><pre>pip3 install flask</pre><p>3. Create Flask App:</p><pre>from flask import Flask<br>app = Flask(__name__)<br><br>@app.route(&#39;/&#39;)<br>def hello_world():<br>    return &#39;Welcome to Flask on OCI!&#39;<br><br>if __name__ == &#39;__main__&#39;:<br>    app.run(host=&#39;0.0.0.0&#39;, port=80)</pre><p><strong>4. Run the Application</strong>:</p><pre>sudo python3 app.py</pre><h4>Node.js</h4><ol><li><strong>Install Node.js</strong>:</li></ol><ul><li><strong>Ubuntu</strong>:</li></ul><pre>sudo apt install nodejs npm -y</pre><p><strong>RHEL/OL8</strong>:</p><pre>sudo yum install nodejs npm -y</pre><p><strong>2. Create Node.js App</strong>:</p><pre>const http = require(&#39;http&#39;);<br><br>const server = http.createServer((req, res) =&gt; {<br>    res.writeHead(200, {&#39;Content-Type&#39;: &#39;text/plain&#39;});<br>    res.end(&#39;Welcome to Node.js on OCI!&#39;);<br>});<br><br>server.listen(80, () =&gt; {<br>    console.log(&#39;Server running on port 80&#39;);<br>});</pre><p><strong>3. Run the Application</strong>:</p><pre>node app.js</pre><h4>Windows (IIS)</h4><p><strong>Install IIS</strong>:</p><ul><li>Use the <strong>Add Roles and Features Wizard</strong> in <strong>Server Manager</strong> to enable the Web Server (IIS) role.</li></ul><p><strong>Deploy Website</strong>:</p><ul><li>Place HTML or ASP.NET files in the C:\inetpub\wwwroot folder.</li></ul><p><strong>Test IIS</strong>:</p><ul><li>Access http://&lt;vm_public_ip&gt; in a browser.</li></ul><h3>6. Configuring OCI Load Balancer</h3><p><strong>Create a Load Balancer</strong>:</p><ul><li>Navigate to <strong>Networking &gt; Load Balancers</strong> in the OCI Console.</li><li>Select a <strong>Public Load Balancer</strong>.</li></ul><p><strong>Add Backend Servers</strong>:</p><ul><li>Add VMs running Apache, Nginx, Flask, Node.js, Tomcat, or IIS as backend servers.</li></ul><p><strong>Health Checks</strong>:</p><ul><li>Define health checks:</li><li><strong>Protocol</strong>: HTTP</li><li><strong>Path</strong>: /</li></ul><p><strong>Create a Listener</strong>:</p><ul><li>Set up HTTP (port 80) or HTTPS (port 443) listeners.</li></ul><p><strong>Test Load Balancer</strong>:</p><ul><li>Access the Load Balancer’s public IP in your browser.</li></ul><h3>7. Enhancements</h3><h4>Scaling:</h4><ul><li>Use OCI Instance Pools to auto-scale backend VMs based on traffic.</li></ul><h4>SSL Termination:</h4><ul><li>Terminate HTTPS connections at the Load Balancer level using SSL certificates.</li></ul><h4>Custom Domains:</h4><ul><li>Use OCI DNS to route custom domain traffic to the Load Balancer.</li></ul><h4>Database Integration:</h4><ul><li>Integrate with OCI-managed databases like MySQL, Oracle DB, or PostgreSQL.</li></ul><h3>8. Conclusion</h3><p>This comprehensive guide demonstrates deploying web servers and applications on OCI VMs, configuring firewalls, and integrating them with OCI Load Balancer. It covers both Linux-based and Windows-based setups, ensuring flexibility and scalability for various web service architectures.</p><h3>Disclaimer:</h3><p>The views expressed in this document are my own and do not necessarily reflect those of my employer. This blog is intended for educational purposes and is based on personal experience with cloud infrastructure</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b45071e6a186" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Mount OCI Object Storage as a Persistent Drive on Windows VM]]></title>
            <link>https://medium.com/@moniruzzamanshimul/how-to-mount-oci-object-storage-as-a-persistent-drive-on-windows-vm-4dd965d9fa08?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dd965d9fa08</guid>
            <category><![CDATA[object-storage]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Fri, 13 Dec 2024 03:07:41 GMT</pubDate>
            <atom:updated>2024-12-13T03:07:41.901Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31RO_65UlXZFl305G8qqtw.png" /><figcaption>Source:OpenAI(DALL-E Image)</figcaption></figure><p>If you’re leveraging <strong>Rclone</strong> for mounting <strong>OCI Object Storage</strong> on your Windows machine, you know how critical it is to ensure that your mounted drives stay persistent across system reboots. Thankfully, <strong>NSSM (Non-Sucking Service Manager)</strong> provides a simple way to run Rclone as a Windows service. Here’s a step-by-step guide tailored specifically for mounting OCI Object Storage as a drive.</p><h4>Why Use NSSM for Rclone?</h4><ol><li><strong>Persistence Across Reboots</strong>: Ensures that your OCI Object Storage is always mounted after system restarts.</li><li><strong>Background Operation</strong>: Runs Rclone as a service in the background without needing a terminal window.</li><li><strong>Automatic Recovery</strong>: Restarts the service automatically in case of a crash.</li></ol><h3>Step-by-Step Guide</h3><h4>1. Install Required Tools</h4><p><strong>Download and Install NSSM</strong>:</p><ul><li>Visit the official NSSM website: <a href="https://nssm.cc/download">Download NSSM</a>.</li><li>Extract the downloaded ZIP file to a folder, e.g., C:\nssm.</li></ul><p><strong>Install Rclone</strong>:</p><ul><li>Download Rclone from <a href="https://rclone.org/downloads/">Rclone Downloads</a>.</li><li>Place the extracted files in a directory, e.g., C:\rclone.</li></ul><p><strong>Install WinFsp</strong>:</p><ul><li>Download from the <a href="https://winfsp.dev/rel/">WinFsp website</a>.</li><li>Follow the installation instructions to complete the setup.</li></ul><p><strong>Set Up Your OCI Rclone Configuration</strong>:</p><ul><li>Run rclone config to configure your OCI Object Storage remote:</li><li>Select New Remote and provide a name (e.g., oci).</li><li>Choose S3 Compatible as the storage type.</li><li>Enter your <strong>Access Key</strong>, <strong>Secret Key</strong>, and <strong>Endpoint URL</strong> (e.g., https://objectstorage.&lt;region&gt;.oraclecloud.com).</li><li>Test the connection to ensure it’s working.</li></ul><h4>2. Test the Rclone Mount Command</h4><p>Before setting up the service, ensure your Rclone mount command works as expected:</p><pre>C:\rclone\rclone.exe mount --vfs-cache-mode full oci:&lt;bucket-name/path&gt; X:</pre><ul><li>Replace oci with your Rclone remote configuration name.</li><li>Replace &lt;bucket-name/path&gt; with your OCI Object Storage bucket path.</li><li>Replace X: with the desired drive letter.</li></ul><p>Verify that the drive is successfully mounted and accessible in File Explorer.</p><h4>3. Use NSSM to Create a Service</h4><p><strong>Open Command Prompt as Administrator</strong>:</p><pre>cd C:\nssm</pre><p><strong>Install the Service</strong>:</p><pre>nssm install OCIStorageService</pre><p><strong>Configure the Service</strong>:</p><ul><li>In the NSSM GUI that appears:</li><li><strong>Path</strong>: Browse and select C:\rclone\rclone.exe.</li><li><strong>Startup Directory</strong>: Enter C:\rclone.</li><li><strong>Arguments</strong>: Enter the mount command arguments, for example:</li></ul><pre>mount --vfs-cache-mode full oci:&lt;bucket-name/path&gt; X:</pre><p><strong>Click “Install Service”</strong> to complete the setup.</p><h4>4. Start and Manage the Service</h4><p><strong>Start the Service</strong>:</p><pre>nssm start OCIStorageService</pre><p><strong>Verify the Service</strong>:</p><ul><li>Open <strong>Services</strong> (press Win + R, type services.msc, and hit Enter).</li><li>Locate OCIStorageService and ensure its status is set to <strong>Running</strong>.</li></ul><p><strong>Set to Start Automatically</strong>:</p><ul><li>Right-click the service, select <strong>Properties</strong>, and set <strong>Startup type</strong> to <strong>Automatic</strong>.</li></ul><h4>5. Verify the Mounted Drive</h4><ul><li>Open File Explorer and check the drive letter (e.g., X:).</li><li>Access and manage files in your OCI Object Storage bucket as if they were stored locally.</li></ul><h3>Additional Tips</h3><p><strong>Customize Volume Name</strong>: Use the --volname flag to give your mounted drive a custom name:</p><pre>--volname &quot;\\OCIStorage\Backup&quot;</pre><p><strong>Enable Logging</strong>: Add the --log-file flag to monitor the service:</p><pre>--log-file C:\rclone\oci_mount.log</pre><p><strong>Test Flags</strong>: Experiment with Rclone flags like --network-mode for advanced use cases.</p><h3>Why This Matters</h3><p>By running Rclone as a Windows service with NSSM, you ensure your OCI Object Storage is always accessible, automated, and reliable. This setup is perfect for use cases like automated backups, seamless cloud integration, and persistent access to remote files.</p><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dd965d9fa08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up OpenVPN Access Server on Ubuntu 22.04 LTS]]></title>
            <link>https://medium.com/@moniruzzamanshimul/setting-up-openvpn-access-server-on-ubuntu-22-04-lts-4cb9490514ef?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cb9490514ef</guid>
            <category><![CDATA[openvpn]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[oci]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Fri, 06 Dec 2024 04:10:35 GMT</pubDate>
            <atom:updated>2024-12-06T04:10:35.007Z</atom:updated>
            <content:encoded><![CDATA[<p>In this guide, we’ll walk through the process of setting up OpenVPN Access Server on Ubuntu 22.04 LTS (x86_64). OpenVPN Access Server offers a robust and secure VPN solution that’s straightforward to deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*NpvtUz4O-yrp1s6S5eGrBg.png" /><figcaption>Source:OpenAI(DALL-E)</figcaption></figure><h3>Step 1: System Preparation</h3><h3>Update System Packages and Configure Timezone</h3><p>Start by updating your system and setting the correct timezone:</p><pre>apt update<br>apt upgrade -y<br>apt install -y tzdata<br>dpkg-reconfigure tzdata</pre><h3>Step 2: Install Required Packages</h3><p>Install necessary utilities to prepare for adding the OpenVPN repository:</p><pre>apt update &amp;&amp; apt -y install ca-certificates wget net-tools gnupg</pre><h3>Step 3: Add OpenVPN Access Server Repository</h3><p>Add the official OpenVPN repository to your system:</p><pre>mkdir -p /etc/apt/keyrings<br>wget https://packages.openvpn.net/as-repo-public.asc -qO /etc/apt/keyrings/as-repository.asc<br>echo &quot;deb [arch=amd64 signed-by=/etc/apt/keyrings/as-repository.asc] http://packages.openvpn.net/as/debian jammy main&quot; &gt; /etc/apt/sources.list.d/openvpn-as-repo.list</pre><h3>Step 4: Install OpenVPN Access Server</h3><p>Install the Access Server package:</p><pre>apt update &amp;&amp; apt -y install openvpn-as</pre><h3>Step 5: Verify Installation</h3><p>Once the installation completes, the server outputs the following information:</p><pre>Access Server 2.14.1 has been successfully installed in /usr/local/openvpn_as<br>Configuration log file has been written to /usr/local/openvpn_as/init.log<br><br>Access Server Web UIs are available here:<br>Admin UI: https://[Your-IP]:943/admin<br>Client UI: https://[Your-IP]:943<br><br>Login as &quot;openvpn&quot; with the default password provided during installation.</pre><h3>Step 6: Configure OCI Network Security Groups</h3><p>Before accessing the Admin UI, ensure the required ingress rules are configured in Oracle Cloud Infrastructure (OCI):</p><p><strong>Navigate to the Subnet</strong>:</p><ul><li>In the OCI Console, go to the subnet associated with your VM.</li></ul><p><strong>Add Ingress Rules</strong>:</p><ul><li><strong>TCP</strong>: Ports 443, 943, 945</li><li><strong>UDP</strong>: Port 1194</li></ul><p><strong><em>Note</em></strong><em>: No additional OS-level firewall configuration is required.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BLiKSZKnChaFrFkagMrbqw.png" /></figure><h3>Step 8: Configure the Server</h3><p><strong>Login To Admin UI</strong></p><p>Now you can login to the Admin UI via <a href="https://[your">https://[your</a> public IP or your domain name]/admin. The admin UI uses a self-signed cert, so accept the cert to continue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Uu2fI9cwZOYi6VtZfETp7A.png" /></figure><p>Login with the username specified in the init script and the password you created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*lxyhFzNrxGVNo8bfaP_cdQ.png" /></figure><p>Accept the EULA (again).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*capUR3gYNtxndr-fuIIZ3Q.png" /></figure><p>At this point, the internal IP address has been configured as the server name.</p><p><strong>Note:</strong> If you do not update this setting, NONE of your clients will be able to connect to your VPN server since by default it is set to a non-routable (private) IP address!</p><p>We’ll need to update this to be our public IP (or even better — domain name). To change, click on Configuration (#1) and Network Settings (#2).</p><h3>Update Hostname</h3><ol><li>Navigate to <strong>Configuration</strong> &gt; <strong>Network Settings</strong>.</li><li>Update the hostname to your public IP or domain name.</li><li>Save the changes and update the running server</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xse28qjsDh255dbzctgCGg.png" /></figure><p>Update the Hostname and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*db5kBdPYCKwKwy8hiToViQ.png" /></figure><p>After saving, update the running server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*f0C9O0DvcKyWp0fdjccdOA.png" /></figure><p>Next, go to the ‘VPN Settings’.</p><h3>Configure VPN Settings</h3><ol><li>Go to <strong>VPN Settings</strong> and ensure that internet traffic is routed through the VPN.</li><li>Add valid DNS servers for seamless browsing.</li></ol><p>Verify that internet traffic will be routed through the VPN. Add valid DNS servers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qEIF8ZWllc-9cheCsskSSw.png" /></figure><h3>Step 9: Create a User</h3><ol><li>Navigate to <strong>User Management</strong> &gt; <strong>User Permissions</strong>.</li><li>Add a new user and set a password.</li><li>Update the server to apply the changes.</li></ol><p>Click on ‘User Management’ and then ‘User Permissions’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*AofV6ERd09vJ5aRfxz4jYQ.png" /></figure><p>Add a user and set the password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EgY7ZgyjIsM-pMBQRcfkzA.png" /></figure><p>Update the server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kciLBYi78Px_BZ3HMcsvAA.png" /></figure><h3>Step 10: Connect to the VPN</h3><h3>Download OpenVPN Client</h3><p>Download the appropriate OpenVPN Connect Client for your operating system:</p><ul><li><strong>Windows</strong>: <a href="https://openvpn.net/client-connect-vpn-for-windows/">OpenVPN Connect for Windows</a></li><li><strong>MacOS</strong>: <a href="https://openvpn.net/client-connect-vpn-for-mac-os/">OpenVPN Connect for MacOS</a></li></ul><h3>Configure the Client</h3><ol><li>Import the VPN profile provided by the Admin UI.</li><li>Connect to the VPN server.</li></ol><p>Upon first launch, you’ll need to configure the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*ODIVLL6bD5ZCbhnLQTEurg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*HwdDk3S-rze6RzeIkL84Qg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*NyRoLKANkirlfpww1OIMQA.png" /></figure><p>Import profile, you’ll be connected after import.</p><h3>Step 11: Test Your VPN Connection</h3><p>Visit an <a href="https://www.whatismyip.com/ip-address-lookup/">IP-check website</a> before and after connecting to the VPN. You’ll notice a change in your IP address, indicating that traffic is now routed through the VPN.</p><h3>Before:</h3><p>Your public IP and location will reflect your ISP details.</p><h3>After:</h3><p>Your IP and location will reflect your VPN server.</p><p>Source:</p><ul><li><a href="https://openvpn.net/as-docs/installation.html#installing-access-server-44949">Installing Access Server</a></li><li><a href="https://openvpn.net/as-docs/installation-troubleshooting.html">Troubleshooting an Access Server Installation</a></li><li><a href="https://blogs.oracle.com/developers/post/launching-your-own-free-private-vpn-in-the-oracle-cloud">Launching Your Own Free Private VPN In The Oracle Cloud</a></li></ul><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cb9490514ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load Balancing SSL Traffic in Oracle Cloud Infrastructure (OCI)]]></title>
            <link>https://medium.com/@moniruzzamanshimul/load-balancing-ssl-traffic-in-oracle-cloud-infrastructure-oci-a5bc06de9949?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5bc06de9949</guid>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[oci]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 15:06:25 GMT</pubDate>
            <atom:updated>2024-12-05T15:06:25.805Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6Vom6KLcoj7h_ZA25FU7g.png" /><figcaption>Source:OpenAI (DALL·E)</figcaption></figure><p>Oracle Cloud Infrastructure (OCI) provides a robust Load Balancing service that ensures seamless distribution of incoming client requests among backend servers. This blog explains how OCI Load Balancer handles HTTP and SSL (Secure Sockets Layer) traffic, enabling secure and efficient data transport.</p><h3>Introduction to OCI Load Balancer</h3><p>OCI’s Load Balancer is a fully managed service that evenly distributes client traffic among backend servers. This improves fault tolerance and enhances application performance.</p><p>For this example, let’s consider a simple scenario:</p><ul><li>Two compute instances running Apache HTTP Server listen on port 80.</li><li>An OCI Load Balancer routes HTTP traffic to these servers in a round-robin fashion.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*aj3Wc5kYZ7eWFkQSgzCPSw.png" /></figure><p>Here’s how you can configure Apache and set up the backend servers:</p><pre>sudo dnf update -y<br>sudo dnf install httpd -y<br>sudo systemctl start httpd<br>sudo systemctl enable httpd<br>sudo firewall-cmd --permanent --add-service=http<br>sudo firewall-cmd --reload<br>sudo bash -c &#39;echo &quot;Hostname: $(hostname)&lt;br&gt;Private IP: $(hostname -I | awk &#39;\&#39;&#39;{print $1}&#39;\&#39;&#39;)&quot; &gt; /var/www/html/index.html&#39;<br>sudo chmod 644 /var/www/html/index.html<br>sudo systemctl restart httpd</pre><p>When you send a request through the Load Balancer, responses alternate between backend servers, demonstrating a round-robin traffic distribution.</p><p><strong>Handling SSL Traffic in OCI</strong></p><p>Unsecured traffic (HTTP) has practical limitations. To address security concerns, OCI supports SSL (TLS v1.2), ensuring secure communication. There are three primary use cases for SSL traffic:</p><ol><li><strong>SSL Termination</strong></li></ol><p>In this scenario:</p><ul><li>SSL traffic from the client terminates at the Load Balancer.</li><li>The Load Balancer forwards the data to backend servers over HTTP.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*dRaEAYTVG7fBKBswzkY75A.png" /></figure><p><strong>Configuration Steps:</strong></p><ol><li>Install Apache HTTP Server on backend servers and allow HTTP traffic only.</li><li>Generate and upload a self-signed SSL certificate for the Load Balancer:</li></ol><pre>sudo dnf install mod_ssl -y<br>sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key \<br>-x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=Oracle/OU=LB-SSL/CN=129.80.151.45/emailAddress=admin@example.com&quot;<br># Load Balancer&#39;s Public IP 129.80.151.45</pre><p>3. Configure a Listener on the Load Balancer to listen on port 443 and associate it with the uploaded certificate.</p><p><strong>Key Observations:</strong></p><ul><li>The client establishes an SSL connection with the Load Balancer.</li><li>Backend servers handle only HTTP requests.</li></ul><p><strong>2. SSL Tunneling</strong></p><p>Here:</p><ul><li>SSL traffic is tunneled through the Load Balancer and terminates at the backend servers.</li><li>The Load Balancer does not decrypt the SSL traffic.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9M34SJ3oeCJIlm5zR6wwXA.png" /></figure><p><strong>Configuration Steps:</strong></p><ol><li>Install mod_ssl on the backend servers and enable HTTPS traffic only.</li><li>Generate self-signed certificates for the backend servers.</li></ol><pre>sudo dnf install mod_ssl -y<br>sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key \<br>-x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=Oracle/OU=VM_SSL/CN=10.0.0.220/emailAddress=admin@example.com&quot;<br># VM&#39;s Private IP 10.0.0.220</pre><p>3. Configure the Load Balancer to use TCP protocol without SSL termination</p><p><strong>Key Observations:</strong></p><ul><li>The client establishes a direct SSL connection with the backend servers.</li><li>The Load Balancer routes encrypted traffic without decryption.</li></ul><p><strong>3. End-to-End SSL</strong></p><p>This setup ensures:</p><ul><li>SSL connections from the client terminate at the Load Balancer.</li><li>The Load Balancer initiates new SSL connections to backend servers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LgvDOe7394waSOl3NjYTDw.png" /></figure><p><strong>Configuration Steps:</strong></p><ol><li>Configure the backend servers as in SSL Tunneling.</li><li>Enable SSL on the Load Balancer and choose a certificate for backend communication.</li></ol><pre>#Generate the CA Private Key:<br>openssl genrsa -out ca.key 2048<br>#Generate the CA Certificate:<br>openssl req -x509 -new -nodes -key ca.key -sha256 -days 365 -out ca.crt \<br>-subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=Oracle/OU=CA/CN=Oracle-VM-CA/emailAddress=admin@example.com&quot;<br><br>#Generate the Server Private Key:<br>openssl genrsa -out server.key 2048<br>#Generate the Certificate Signing Request (CSR):<br>openssl req -new -key server.key -out server.csr -subj &quot;/C=BD/ST=Dhaka/L=Dhaka/O=Oracle/OU=VM_SSL/CN=10.0.0.13/emailAddress=admin@example.com&quot;<br><br>#Sign the Server Certificate with the CA:<br>openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 365 -sha256</pre><p>Cert-SSL: server.crt, ca.crt &amp; server.key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*VaxdbONvlyNhpo8dKyUlLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5HAsflcoPS3cztJiwloEpw.png" /></figure><p><strong>Key Observations:</strong></p><ul><li>The client connects to the Load Balancer using an SSL certificate.</li><li>The Load Balancer initiates a second SSL connection to backend servers.</li></ul><h3>Summary</h3><p>OCI’s Load Balancer provides comprehensive support for SSL traffic management, enhancing application security. Depending on your requirements, you can choose from the following use cases:</p><ul><li><strong>SSL Termination:</strong> Secure communication between clients and the Load Balancer.</li><li><strong>SSL Tunneling:</strong> Full end-to-end encryption, with no decryption at the Load Balancer.</li><li><strong>End-to-End SSL:</strong> Double encryption for additional security and data inspection capabilities.</li></ul><p>By leveraging these configurations, organizations can ensure secure and efficient traffic distribution in OCI environments.</p><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><p>source: <a href="https://www.ateam-oracle.com/post/load-balancing-ssl-traffic-in-oci">https://www.ateam-oracle.com/post/load-balancing-ssl-traffic-in-oci</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5bc06de9949" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing and Configuring Apache HTTP Server with HTTPS on Oracle Linux 8]]></title>
            <link>https://medium.com/@moniruzzamanshimul/installing-and-configuring-apache-http-server-with-https-on-oracle-linux-8-6bc5d04d491c?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bc5d04d491c</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[tls]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 09:15:59 GMT</pubDate>
            <atom:updated>2024-12-05T03:05:47.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFr8W3Ic5tRzagJloORYiA.png" /><figcaption>Source: OpenAI</figcaption></figure><p>This blog provides a comprehensive guide to installing and configuring Apache HTTP Server (httpd) with HTTPS on Oracle Linux 8. We’ll also cover how to integrate this setup with an Oracle Cloud Infrastructure (OCI) Load Balancer and enforce HTTPS redirection.</p><h3>Step 1: Install Apache HTTP Server</h3><p>Start by updating your system and installing Apache:</p><pre>sudo dnf update -y<br>sudo dnf install httpd -y</pre><p>Once installed, enable and start the Apache service:</p><pre>sudo systemctl start httpd<br>sudo systemctl enable httpd</pre><h3>Step 2: Configure Firewall Rules</h3><p>To allow traffic to your server, open HTTP (port 80) and HTTPS (port 443) services in the firewall:</p><pre>sudo firewall-cmd --permanent --add-service=http<br>sudo firewall-cmd --permanent --add-service=https<br>sudo firewall-cmd --reload</pre><h3>Step 3: Test Apache HTTP Server</h3><p>Create a simple index page to confirm the server is running:</p><pre>sudo bash -c &#39;echo &quot;OK&quot; &gt; /var/www/html/index.html&#39;<br>#sudo bash -c &#39;echo &quot;Hostname: $(hostname)&lt;br&gt;Private IP: $(hostname -I | awk &#39;\&#39;&#39;{print $1}&#39;\&#39;&#39;)&quot; &gt; /var/www/html/index.html&#39;<br>sudo chmod 644 /var/www/html/index.html<br>sudo systemctl restart httpd</pre><p>Test the HTTP server by navigating to your server’s IP address or running:</p><pre>curl http://&lt;your-server-ip&gt;</pre><h3>Step 4: Enable HTTPS with a Self-Signed Certificate</h3><p>To secure the server with HTTPS, you’ll need to install SSL and generate a self-signed certificate.</p><p><strong>Install the Apache SSL module:</strong></p><pre>sudo dnf install mod_ssl -y</pre><p><strong>Generate a Self-Signed SSL Certificate:</strong> Use the following command to create a certificate and private key:</p><pre>#sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -subj<br>sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -subj &quot;/C=XX/ST=State/L=City/O=Organization/OU=Department/CN=localhost/emailAddress=admin@example.com&quot; </pre><p>Replace the placeholder values:</p><ul><li>C=XX: Your country code (e.g., US, BD).</li><li>ST: Your state or province.</li><li>L: Your locality or city.</li><li>O: Your organization name.</li><li>OU: Your organizational unit.</li><li>CN: Common Name, typically localhost or your server&#39;s hostname.</li><li>emailAddress: An appropriate email address.</li></ul><h3>Step 5: Configure Apache for HTTPS</h3><p>Open the Apache SSL configuration file:</p><pre>sudo vi /etc/httpd/conf.d/ssl.conf</pre><p>Set the paths to your self-signed certificate and key:</p><pre>SSLCertificateFile /etc/pki/tls/certs/localhost.crt<br>SSLCertificateKeyFile /etc/pki/tls/private/localhost.key</pre><p>Restart Apache to apply the changes:</p><pre>sudo systemctl restart httpd</pre><p>Test the HTTPS server:</p><pre>curl -k https://localhost</pre><h3>Step 6: Trust the Self-Signed Certificate</h3><p>To avoid using the -k flag with tools like curl, add your self-signed certificate to the system&#39;s trusted CA store:</p><pre>sudo cp /etc/pki/tls/certs/localhost.crt /etc/pki/ca-trust/source/anchors/<br>sudo update-ca-trust</pre><p>Test again without the -k flag:</p><pre>curl https://localhost</pre><h3>Step 7: Configure OCI Load Balancer with a Managed Certificate</h3><p><strong>Navigate to the OCI Console</strong>: Go to <strong>Networking &gt; Load Balancers</strong>.</p><p><strong>Upload the SSL Certificate to OCI</strong>:</p><ul><li>Navigate to <strong>Load Balancers &gt; Certificates</strong>.</li><li>Click <strong>Create Certificate</strong> and choose <strong>Managed Certificate</strong>.</li><li>Upload your certificate and key:</li><li><strong>Certificate File</strong>: /etc/pki/tls/certs/localhost.crt</li><li><strong>Private Key File</strong>: /etc/pki/tls/private/localhost.key</li></ul><p><strong>Create an HTTPS Listener</strong>:</p><ul><li>Go to <strong>Listeners</strong> and click <strong>Create Listener</strong>.</li><li>Configure:</li><li><strong>Protocol</strong>: HTTPS</li><li><strong>Port</strong>: 443</li><li><strong>Certificate Name</strong>: Select the managed certificate you just created.</li><li><strong>Backend Set</strong>: Select the backend set pointing to your Apache server.</li></ul><h3>Step 8: Enforce HTTPS Redirection</h3><h4>At OCI Load Balancer Level:</h4><ol><li>Edit the HTTP Listener (port 80).</li><li>Set the listener to redirect HTTP traffic to the HTTPS listener (port 443).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bvzyxExQJskLh_kb" /><figcaption>source: <a href="https://www.ateam-oracle.com/post/oci-load-balancer-url-redirect-configuration-a-best-practice">https://www.ateam-oracle.com/post/oci-load-balancer-url-redirect-configuration-a-best-practice</a></figcaption></figure><h3>Step 9: Test the Setup</h3><p><strong>Test HTTP Redirection</strong>:</p><pre>curl -I http://&lt;load-balancer-public-ip&gt;</pre><p>It should return 301 Moved Permanently.</p><p><strong>Test HTTPS</strong>:</p><pre>curl -I https://&lt;load-balancer-public-ip&gt;</pre><p>Open the URL in a browser:</p><pre>http://&lt;load-balancer-public-ip&gt; -&gt; https://&lt;load-balancer-public-ip&gt;</pre><h3>Conclusion</h3><p>You’ve successfully configured Apache HTTP Server with HTTPS on Oracle Linux 8, integrated it with an OCI Load Balancer using a managed certificate, and enforced HTTPS redirection. This ensures secure and efficient communication for your web server.</p><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bc5d04d491c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NGINX on OKE with SSL via OCI Load Balancer]]></title>
            <link>https://medium.com/@moniruzzamanshimul/nginx-on-oke-with-ssl-via-oci-load-balancer-44e23d277747?source=rss-d3df8a28b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/44e23d277747</guid>
            <category><![CDATA[oke]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Moniruzzaman Shimul]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 17:56:56 GMT</pubDate>
            <atom:updated>2024-12-02T17:58:25.859Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OuVhvW2XYEM5n6-9R7daag.png" /><figcaption>Source: OpenAI (DALL·E)</figcaption></figure><p>In this blog, we’ll deploy an NGINX application in Kubernetes using Oracle Cloud Infrastructure (OCI) Load Balancer for SSL termination. We’ll adopt a process that includes creating a self-signed CA certificate, generating a TLS key and certificate, and configuring NGINX and OCI to enable HTTPS.</p><h3>1. Prerequisites</h3><p>Before you begin, ensure you have:</p><ul><li>A Kubernetes cluster running on OCI (e.g., OKE — Oracle Kubernetes Engine).</li><li>Access to kubectl configured for your cluster.</li><li>The openssl command-line tool for generating keys and certificates.</li></ul><h3>2. Key and Certificate Generation</h3><h4>Step 1: Generate the TLS Key and Certificate</h4><p>Use the following commands to create the TLS private key and self-signed certificate:</p><pre>openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj &quot;/CN=nginxsvc/O=nginxsvc&quot;</pre><p>This creates:</p><ul><li>tls.key: The private key for your server.</li><li>tls.crt: The corresponding self-signed certificate.</li></ul><h4>Step 2: Generate a CA Key and Certificate</h4><p>Create a CA private key and self-signed certificate:</p><pre>openssl genrsa -out ca.key 2048<br>openssl req -x509 -new -nodes -key ca.key -subj &quot;/CN=nginxsvc/O=nginxsvc&quot; -days 10000 -out ca.crt</pre><p>This creates:</p><ul><li>ca.key: Private key for the Certificate Authority (CA).</li><li>ca.crt: Self-signed CA certificate to validate TLS certificates.</li></ul><h3>3. Kubernetes Configuration</h3><h4>Step 1: Create a Kubernetes Secret</h4><p>Store the TLS key, certificate, and CA certificate in a Kubernetes secret:</p><pre>kubectl create secret generic ca-ser-secret \<br>    --from-file=tls.crt=tls.crt \<br>    --from-file=tls.key=tls.key \<br>    --from-file=ca.crt=ca.crt</pre><h3>4. Configuring NGINX</h3><p>We’ll define an NGINX configuration to use the certificates for SSL. The configuration will be stored in a Kubernetes ConfigMap.</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: nginx-config<br>data:<br>  nginx.conf: |<br>    events { }<br><br>    http {<br>        server {<br>            listen 80;<br>            server_name _;<br><br>            location / {<br>                root   /usr/share/nginx/html;<br>                index  index.html index.htm;<br>            }<br>        }<br><br>        server {<br>            listen 443 ssl;<br>            server_name _;<br><br>            ssl_certificate /etc/nginx/tls/tls.crt;<br>            ssl_certificate_key /etc/nginx/tls/tls.key;<br><br>            # Optional for client authentication<br>            ssl_client_certificate /etc/nginx/tls/ca.crt;<br>            ssl_verify_client optional;<br><br>            location / {<br>                root   /usr/share/nginx/html;<br>                index  index.html index.htm;<br>            }<br>        }<br>    }</pre><p>Apply the ConfigMap:</p><pre>kubectl apply -f nginx-config.yaml</pre><h3>5. Deploy NGINX</h3><p>Define a Kubernetes deployment for NGINX, mounting the TLS certificates and the configuration.</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        volumeMounts:<br>        - name: nginx-config<br>          mountPath: /etc/nginx/nginx.conf<br>          subPath: nginx.conf<br>        - name: tls-secret<br>          mountPath: /etc/nginx/tls<br>          readOnly: true<br>        ports:<br>        - containerPort: 80<br>        - containerPort: 443<br>      volumes:<br>      - name: nginx-config<br>        configMap:<br>          name: nginx-config<br>      - name: tls-secret<br>        secret:<br>          secretName: ca-ser-secret</pre><p>Apply the deployment:</p><pre>kubectl apply -f nginx-deployment.yaml</pre><h3>6. Expose NGINX with OCI Load Balancer</h3><p>Create a LoadBalancer service with annotations to configure SSL.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-service<br>  annotations:<br>    oci.oraclecloud.com/load-balancer-type: &quot;lb&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-ssl-ports: &quot;443&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-tls-backendset-secret: ca-ser-secret<br>    service.beta.kubernetes.io/oci-load-balancer-shape: &quot;flexible&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: &quot;10&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: &quot;100&quot;<br>spec:<br>  selector:<br>    app: nginx<br>  type: LoadBalancer<br>  ports:<br>  - name: http<br>    port: 80<br>    targetPort: 80<br>  - name: https<br>    port: 443<br>    targetPort: 443</pre><p>Apply the service:</p><pre>kubectl apply -f nginx-service.yaml</pre><h3>7. Verify the Deployment</h3><p><strong>Check the Pods and Service:</strong></p><pre>kubectl get all</pre><p>Test the HTTP Connection:</p><pre>curl http://&lt;LoadBalancer_IP&gt;</pre><p>You should see the default NGINX welcome page.</p><p>Test the HTTPS Connection:</p><pre>curl -k https://&lt;LoadBalancer_IP&gt;</pre><h3>8. Manual Step: Enable SSL in OCI Console</h3><p>If HTTPS does not work as expected, you may need to enable SSL manually:</p><ol><li><strong>Log in to OCI Console</strong>.</li><li>Navigate to <strong>Networking &gt; Load Balancers &gt; Listeners</strong>.</li><li>Locate the listener for port <strong>443</strong> and enable <strong>Use SSL</strong>.</li><li>Save the changes and test HTTPS again.</li></ol><h3>9. Final YAML</h3><p>Here’s the combined YAML for deployment and service:</p><pre># Deployment for NGINX<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        volumeMounts:<br>        - name: nginx-config<br>          mountPath: /etc/nginx/nginx.conf<br>          subPath: nginx.conf<br>        - name: tls-secret<br>          mountPath: /etc/nginx/tls<br>          readOnly: true<br>        ports:<br>        - containerPort: 80<br>        - containerPort: 443<br>      volumes:<br>      - name: nginx-config<br>        configMap:<br>          name: nginx-config<br>      - name: tls-secret<br>        secret:<br>          secretName: ca-ser-secret<br>---<br># LoadBalancer Service<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-service<br>  annotations:<br>    oci.oraclecloud.com/load-balancer-type: &quot;lb&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-ssl-ports: &quot;443&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-tls-backendset-secret: ca-ser-secret<br>    service.beta.kubernetes.io/oci-load-balancer-shape: &quot;flexible&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: &quot;10&quot;<br>    service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: &quot;100&quot;<br>spec:<br>  selector:<br>    app: nginx<br>  type: LoadBalancer<br>  ports:<br>  - name: http<br>    port: 80<br>    targetPort: 80<br>  - name: https<br>    port: 443<br>    targetPort: 443</pre><h3>Conclusion</h3><p>This guide demonstrates how to deploy NGINX in Kubernetes (OKE) with SSL using OCI Load Balancer.</p><p><strong>Disclaimer:</strong> The views expressed in this document are my own and do not necessarily reflect those of my employer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44e23d277747" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>