<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Ariq Naufal]]></title><description><![CDATA[Average Sysadmin Enjoyer]]></description><link>https://ariq.nauf.al/blog/</link><image><url>https://ariq.nauf.al/blog/favicon.png</url><title>Ariq Naufal</title><link>https://ariq.nauf.al/blog/</link></image><generator>Ghost 5.2</generator><lastBuildDate>Wed, 28 Jan 2026 11:00:14 GMT</lastBuildDate><atom:link href="https://ariq.nauf.al/blog/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Wireguard Mesh Private Network Setup]]></title><description><![CDATA[<h2 id="private-network-plan">Private Network Plan</h2><!--kg-card-begin: html--><table>
<thead>
<tr>
<th>VPS</th>
<th>Location</th>
<th>Internal IP</th>
<th>Private Key</th>
<th>Public Key</th>
</tr>
</thead>
<tbody>
<tr>
<td>VPS1</td>
<td>DE</td>
<td>192.168.1.1</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS2</td>
<td>NL</td>
<td>192.168.1.2</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS3</td>
<td>US</td>
<td>192.168.1.3</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;</code></td></tr></tbody></table>]]></description><link>https://ariq.nauf.al/blog/wireguard-mesh-private-network-setup/</link><guid isPermaLink="false">684f87d462fd8e00013ea443</guid><category><![CDATA[How To]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Private Network]]></category><category><![CDATA[Wireguard]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Mon, 16 Jun 2025 04:44:32 GMT</pubDate><content:encoded><![CDATA[<h2 id="private-network-plan">Private Network Plan</h2><!--kg-card-begin: html--><table>
<thead>
<tr>
<th>VPS</th>
<th>Location</th>
<th>Internal IP</th>
<th>Private Key</th>
<th>Public Key</th>
</tr>
</thead>
<tbody>
<tr>
<td>VPS1</td>
<td>DE</td>
<td>192.168.1.1</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS2</td>
<td>NL</td>
<td>192.168.1.2</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS3</td>
<td>US</td>
<td>192.168.1.3</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS4</td>
<td>JP</td>
<td>192.168.1.4</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
</tbody>
</table><!--kg-card-end: html--><p>I have multiple chickens around the world, Germany (DE), Netherland (NL), Atlanta (US), Japan (JP).</p><h2 id="install-wireguard">Install Wireguard</h2><p>I want to make all of them connected in a private network with software called Wireguard. First thing to do is, install wireguard on each VPS.</p><pre><code>sudo apt update
sudo apt install wireguard -y</code></pre><p>On each VPS, generate private key and public key and save it to the private network plan.</p><pre><code>wg genkey | tee privatekey | wg pubkey &gt; publickey</code></pre><!--kg-card-begin: html--><table>
<thead>
<tr>
<th>VPS</th>
<th>Location</th>
<th>Internal IP</th>
<th>Private Key</th>
<th>Public Key</th>
</tr>
</thead>
<tbody>
<tr>
<td>VPS1</td>
<td>DE</td>
<td>192.168.1.1</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS2</td>
<td>NL</td>
<td>192.168.1.2</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS3</td>
<td>US</td>
<td>192.168.1.3</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
<tr>
<td>VPS4</td>
<td>JP</td>
<td>192.168.1.4</td>
<td><code>&lt;save_this&gt;</code></td>
<td><code>&lt;save_this&gt;</code></td>
</tr>
</tbody>
</table><!--kg-card-end: html--><p>To check what&apos;s private key and public key code, you can try</p><pre><code>cat /etc/wireguard/private.key
cat /etc/wireguard/public.key</code></pre><h2 id="configure-wireguard">Configure Wireguard</h2><p>Start configure wireguard by create wg0.conf in /etc/wireguard</p><pre><code>nano /etc/wireguard/wg0.conf</code></pre><p>Take a look on this wg0.conf template. This is wg0.conf in VPS1.</p><p>The [Interface] part is configured on each VPS, and you can copy-paste the [Peer] part to VPS 2, VPS3, VPS4.</p><pre><code>[Interface]
PrivateKey = &lt;VPS1_PRIVATE_KEY&gt;
Address = 192.168.1.1/24
ListenPort = 51820

[Peer]
PublicKey = &lt;VPS2_PUBLIC_KEY&gt;
Endpoint = &lt;VPS2_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.2/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS3_PUBLIC_KEY&gt;
Endpoint = &lt;VPS3_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.3/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS4_PUBLIC_KEY&gt;
Endpoint = &lt;VPS4_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.4/32
PersistentKeepalive = 25</code></pre><p><strong>In VPS2</strong> <code>/etc/wireguard/wg0.conf</code>, the [Interface] part is VPS2&apos;s private key while the [Peer] rest is VPS1, VPS3, VPS4 Endpoint and Public Key.</p><pre><code>[Interface]
PrivateKey = &lt;VPS2_PRIVATE_KEY&gt;
Address = 192.168.1.2/24
ListenPort = 51820

[Peer]
PublicKey = &lt;VPS1_PUBLIC_KEY&gt;
Endpoint = &lt;VPS1_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.1/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS3_PUBLIC_KEY&gt;
Endpoint = &lt;VPS3_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.3/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS4_PUBLIC_KEY&gt;
Endpoint = &lt;VPS4_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.4/32
PersistentKeepalive = 25</code></pre><p><strong>In VPS3</strong> <code>/etc/wireguard/wg0.conf</code>, the [Interface] part is VPS3&apos;s private key while the [Peer] rest is VPS1, VPS2, VPS4 Endpoint and Public Key.</p><pre><code>[Interface]
PrivateKey = &lt;VPS3_PRIVATE_KEY&gt;
Address = 192.168.1.3/24
ListenPort = 51820

[Peer]
PublicKey = &lt;VPS1_PUBLIC_KEY&gt;
Endpoint = &lt;VPS1_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.1/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS2_PUBLIC_KEY&gt;
Endpoint = &lt;VPS2_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.2/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS4_PUBLIC_KEY&gt;
Endpoint = &lt;VPS4_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.4/32
PersistentKeepalive = 25</code></pre><p><strong>In VPS4</strong> <code>/etc/wireguard/wg0.conf</code>, the [Interface] part is VPS3&apos;s private key while the [Peer] rest is VPS1, VPS2, VPS3 Endpoint and Public Key.</p><pre><code>[Interface]
PrivateKey = &lt;VPS4_PRIVATE_KEY&gt;
Address = 192.168.1.4/24
ListenPort = 51820

[Peer]
PublicKey = &lt;VPS1_PUBLIC_KEY&gt;
Endpoint = &lt;VPS1_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.1/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS2_PUBLIC_KEY&gt;
Endpoint = &lt;VPS2_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.2/32
PersistentKeepalive = 25

[Peer]
PublicKey = &lt;VPS3_PUBLIC_KEY&gt;
Endpoint = &lt;VPS3_PUBLIC_IP&gt;:51820
AllowedIPs = 192.168.1.3/32
PersistentKeepalive = 25</code></pre><h2 id="enable-ip-forwarding">Enable IP Forwarding</h2><p>IP forwarding is needed in WireGuard for routing network traffic between different networks. Each VPS needed to enable IP forwarding to make sure Wireguard can forward packet from one network interface to another.</p><pre><code>echo &quot;net.ipv4.ip_forward=1&quot; | sudo tee -a /etc/sysctl.conf
sudo sysctl -p</code></pre><h2 id="start-enable-and-verify">Start, Enable and Verify</h2><p>On each VPS, you can start wireguard and enable it</p><pre><code>sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0</code></pre><p>Ping each peer in VPS1-4</p><pre><code>ping 192.168.1.1
ping 192.168.1.2
ping 192.168.1.3
ping 192.168.1.4</code></pre><p>Verify connection with <code>wg</code> command:</p><pre><code>root@dev1:~# wg
interface: wg0
  public key: XhKt0cj8i08RH6(hidden)1RlanzvPpLUbF2tEuGi42Y=
  private key: (hidden)
  listening port: 51820

peer: b8Z4BW7(hidden)mewbixy9BBUiFCfXT5bAOJOGegCk=
  endpoint: &lt;VPS2_PUBLIC_KEY&gt;:51820
  allowed ips: 192.168.1.2/32
  latest handshake: 32 seconds ago
  transfer: 771.45 KiB received, 511.61 KiB sent
  persistent keepalive: every 25 seconds

peer: rxrjgABUZL5Run(hidden)3DOwYk28L0jeoNyWFc=
  endpoint: &lt;VPS4_PUBLIC_KEY&gt;:51820
  allowed ips: 192.168.1.4/32
  latest handshake: 1 minute, 47 seconds ago
  transfer: 1.25 MiB received, 452.12 KiB sent
  persistent keepalive: every 25 seconds

peer: w8leUHPQwxt6u(hidden)2eNVqBZSledcCwzTZ+g7VU=
  endpoint: &lt;VPS3_PUBLIC_KEY&gt;:51820
  allowed ips: 192.168.1.3/32
  latest handshake: 2 minutes, 2 seconds ago
  transfer: 2.10 MiB received, 1.28 MiB sent
  persistent keepalive: every 25 seconds
</code></pre><p>Congrats, now you have full mesh private network connectivity with Wireguard.</p><p>You can also setup this quickly by add each VPS in Private Network connectivity with <a href="https://tailscale.com/">Tailscale</a>, its free~</p>]]></content:encoded></item><item><title><![CDATA[I came looking for Chicken and I found Octopus [BFCM 2024]]]></title><description><![CDATA[<p>Hallo, long time no post..</p><blockquote>The last Friday of November (Black Friday) and the next monday (Cyber Monday) <a href="https://lowendtalk.com/discussion/182485/black-friday-cyber-monday-official-megathread-flash-sale-2022/p1">LowEndTalk </a>and <a href="https://lowendspirit.com/">LowEndSpirit</a> always create a mega thread which some providers create black Friday and Cyber Monday sales.</blockquote><p>Every year i tried join that BF CM sales, but unfortunately i got no</p>]]></description><link>https://ariq.nauf.al/blog/im-looking-for-chicken-then-i-found-baby-octopus/</link><guid isPermaLink="false">67bc242c62fd8e00013ea167</guid><category><![CDATA[Black Friday]]></category><category><![CDATA[SysAdmin Life]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Tue, 03 Dec 2024 17:57:09 GMT</pubDate><media:content url="https://ariq.nauf.al/blog/content/images/2024/12/9cfg92.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://ariq.nauf.al/blog/content/images/2024/12/9cfg92.jpg" alt="I came looking for Chicken and I found Octopus [BFCM 2024]"><p>Hallo, long time no post..</p><blockquote>The last Friday of November (Black Friday) and the next monday (Cyber Monday) <a href="https://lowendtalk.com/discussion/182485/black-friday-cyber-monday-official-megathread-flash-sale-2022/p1">LowEndTalk </a>and <a href="https://lowendspirit.com/">LowEndSpirit</a> always create a mega thread which some providers create black Friday and Cyber Monday sales.</blockquote><p>Every year i tried join that BF CM sales, but unfortunately i got no luck in 2023.</p><p><strong>But</strong></p><p>in 2024, i got chances to bought some limited offers,</p><p>Like:</p><ul><li>mxroute - mail hosting plan</li></ul><pre><code>Storage: 25GB
Domains: Unlimited
Email Accounts: Unlimited
Outbound limit (per email address): 300/hour
Quantity: 30
$10/3yr</code></pre><ul><li>prohosting24 - vps</li></ul><pre><code>https://prohosting24.de/blackfriday

4C/16G/200GB at 4&#x20AC;/m (very limited &#x1F97A;)
6C/24G/300GB at 7,45&#x20AC;/m
8C/32G/400GB at 9,95&#x20AC;/m

Plus 20 % for free on top on all account top ups until cyber monday!
</code></pre><ul><li>and lastly;<strong> the legendary Virmach with their un&#xB7;sus&#xB7;tain&#xB7;a&#xB7;ble offers</strong> &#x2728;</li></ul><h2 id="virmach-bfcm-2024">Virmach BFCM 2024</h2><p>This isn&apos;t my first time to buy VPS (Virtual Private Servers) from Virmach. In 2020 i&apos;ve bought a small chicken (sometimes we call VPS a chicken &#x1F602;)</p><pre><code>BF-SPECICAL-2020

1 cores
768 MB
15 GB SSD
1 IPV4
1.46TB Bandwidth

for Only $4.51 USD/year</code></pre><p>Literally; only $4.51/year in 2020.</p><p>So this year, i visited their exclusive Black Friday VPS Sales page:</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://vps.blackfriday/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">VPS Black Friday - Cheapest VPS Flash Deals</div><div class="kg-bookmark-description"></div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://vps.blackfriday/favicon.ico" alt="I came looking for Chicken and I found Octopus [BFCM 2024]"><span class="kg-bookmark-author">VPSBlackFriday</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://vps.blackfriday/img/linux-white.svg" alt="I came looking for Chicken and I found Octopus [BFCM 2024]"></div></a></figure><p>They are rotating 3 VPS offers which something like this:</p><pre><code>
83% OFF*
OFFER #1063
$
40.63
PER YEAR

    VIRT
    KVM
    RYZEN SKU# V0M-XD
    RAM
    5632MB
    DDR4 RAM
    CPU
    4 Core
    CPU vCORE
    HDD
    90GB
    SSD (NVMe)
    BANDWIDTH
    12800GB
    BANDWIDTH
    IPs
    1 IPv4
    DEDICATED IPv4

    0h 11m 19s

ORDER NOW
82% OFF*
OFFER #1061
$
9.72
PER YEAR
$10.23

    VIRT
    KVM
    RYZEN SKU# V02-00
    RAM
    1536MB
    DDR4 RAM
    CPU
    1 Core
    CPU vCORE
    HDD
    30GB
    SSD (NVMe)
    &lt;span&gt;BANDWIDTH&lt;/span&gt;
    1536GB
    BANDWIDTH
    IPs
    1 IPv4
    DEDICATED IPv4

    0h 10m 46s

ORDER NOW
82% OFF*
OFFER #1064
$
20.21
PER YEAR

    VIRT
    KVM
    RYZEN SKU# V03-X2
    RAM
    3584MB
    DDR4 RAM
    CPU
    2 Core
    CPU vCORE
    HDD
    80GB
    SSD (NVMe)
    &lt;span&gt;BANDWIDTH&lt;/span&gt;
    2048GB
    BANDWIDTH
    IPs
    1 IPv4
    DEDICATED IPv4

1h 12m 6s</code></pre><p>I&apos;m also check their offer thread in <a href="https://lowendspirit.com/discussion/8605/virmach-2024-ryzen-nvme-vps-black-friday-flash-deals-check-inside-for-offers#latest">LowEndSpirit</a>, maybe they also have give extra discount or maybe puzzle trick to get a coupon. The puzzle is about to find a coupon in some enigma chiper text that given from Virmach staff to LES members.</p><p><em>I literally don&apos;t know about enigma decrypt; Vigen&#xE8;re cipher. But i tried to participate as possible, because that was nearly the end of Cyber Monday event.</em></p><p>Some members tried to decrypted it, and few hours later, a member with username Wonder_Woman tried to <a href="https://lowendspirit.com/discussion/comment/194612/#Comment_194612">analyzed</a> and to help us find a coupon. We decided to bruteforce a coupon code <em>together </em>by list of random text that was given from him/her. &#x1F602;</p><p>Some codes like this:</p><pre><code>LZ[A-Z]FSRAU
PTWAPT[A-Z]K
[A-Z]QJCKUPK
[A-Z]REMOGAR
VF[A-Z]BUVPI
T[A-Z]YAUZUO
F[A-Z]SGLUQT
LW[A-Z]ASJQZ</code></pre><p>and... until the last minutes of given time by Virmach staff. We still didn&apos;t have luck.</p><p><em>VirMach turns out to be a good guy, again and again. </em> They give that 50% recurring code off for free by Private Message (PM) to participants in LES at that time &#x1F606;</p><p>So I checked again what VPS they offered to in their <a href="https://vps.blackfriday/">sales page</a> at that time; i found this:</p><pre><code>Offer #1020
SKU: RYZEN SKU# V02-XD
1 cores
1776MB RAM
720GB NVMe Storage
8 IPv4
20480GB Bandwidth
NYC METRO
$37.50 per YEAR</code></pre><p>and then i decided to bought... only $18.75 per year to get that vps.</p><p>I call this vps as <code>Octopus / Baby Kraken.</code>&#x1F419; <em>Octopus have 8 legs as this VPS have 8 IPV4 </em>&#x1F60E;</p><p>Until now i don&apos;t know what to do to that VPS; Maybe for backup purpose and some experience with that 8 IPs.</p><figure class="kg-card kg-image-card"><img src="https://ariq.nauf.al/blog/content/images/2024/12/9cfg92.jpg" class="kg-image" alt="I came looking for Chicken and I found Octopus [BFCM 2024]" loading="lazy"></figure><p><strong><em>I came looking for chicken and i found octopus.</em></strong></p><p>Thank you for reading ~</p><p></p>]]></content:encoded></item><item><title><![CDATA[My September 2023 Roundup]]></title><description><![CDATA[<p>Hey, it&apos;s me again. Ariq.</p><p>Several months have passed since my last post on <a href="https://ariq.nauf.al/blog/100daystooffload/">March 2023: 100DaystoOffload</a>, and now I&apos;m going to write this September 2023 before I forget.</p><p>In this month, September 2023, I watched the legendary series: <a href="https://www.imdb.com/title/tt0903747/">Breaking Bad</a>. I watch this series season</p>]]></description><link>https://ariq.nauf.al/blog/my-september-2023-roundup/</link><guid isPermaLink="false">67bc242c62fd8e00013ea166</guid><category><![CDATA[Journal]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Tue, 26 Sep 2023 18:12:16 GMT</pubDate><content:encoded><![CDATA[<p>Hey, it&apos;s me again. Ariq.</p><p>Several months have passed since my last post on <a href="https://ariq.nauf.al/blog/100daystooffload/">March 2023: 100DaystoOffload</a>, and now I&apos;m going to write this September 2023 before I forget.</p><p>In this month, September 2023, I watched the legendary series: <a href="https://www.imdb.com/title/tt0903747/">Breaking Bad</a>. I watch this series season 1 to eps Felina (end of season 5) from the beginning of September, till the end of September this month.</p><blockquote>Congratulations if you already have watched this series too! Yes, it should be called the Legendary series because it&apos;s 2010-2013. Oh man, it&apos;s <strong>A decade ago</strong>!</blockquote><p>It all makes sense to me now, why the short videos and the memes of Breaking Bad are everywhere. Very popular and long last forever exists on the Internet.</p><!--kg-card-begin: html--><iframe src="https://giphy.com/embed/xT0GqgeTVaAdWZD1uw" width="480" height="266" frameborder="0" class="giphy-embed" allowfullscreen></iframe><p><a href="https://giphy.com/gifs/xT0GqgeTVaAdWZD1uw">via GIPHY</a></p><!--kg-card-end: html--><figure class="kg-card kg-embed-card"><iframe width="200" height="113" src="https://www.youtube.com/embed/fK9nofPKpoc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen title="Breaking bad jesse pinkman yes hell yeah!!!"></iframe></figure><p>The story plot is good &#x2B50;&#x2B50;&#x2B50;&#x2B50;&#x2B50; (five-star for me), never makes me bored at all.</p><p>I loved the way the main character transforms way over the seasons, which is Walter White a.k.a Heisenberg from a lame <em>bullyable </em>chemist teacher to a Heisenberg, a man with a full ego, and arrogance; like he wants to be <a href="https://www.youtube.com/watch?v=79tVuhwVSKQ">better than everyone else.</a></p><blockquote>Despite his criminal mastermind, the reason he did it for the family, until on Season 5 last episode, he said that all of it, it was for him. He is being alive &quot;alive&quot; with the name of Heisenberg, because on his cancer that he have and he liked it very much.</blockquote><p>and the other main character Jesse Pinkman with his well-known quote</p><ul><li>This ain&apos;t chemistry, this is art, cooking is an art and the s*** I cook is the bomb</li><li>YESSSS, HELL YEAH</li><li>&#x201C;You don&#x2019;t need a criminal lawyer. You need a <em>criminal</em> lawyer.&#x201D;</li></ul><p>and so on, you can check his line <a href="https://parade.com/696239/lindsaylowe/happy-birthday-aaron-paul-10-of-jesses-best-breaking-bad-quotes/">on other site</a>.</p><p>Well, I can find other interesting characters too, like Hank, Saul Goodman, Gus Fring, Mike, Hector Salamanca, and Salamanca siblings. All actor has their own strong character. No wonder it&apos;s rated 9.5/10 in IMDB.</p><p>My favorite character is <a href="https://breakingbad.fandom.com/wiki/Gustavo_Fring">Gus Fring</a>. A professional chicken man &quot;Colonel Sanders&quot; in the Breaking Bad series has side job (a big side job) which he always monitors and instructs the employees, including main characters to make <em>baby</em>-blue with his superlab.</p><!--kg-card-begin: html--><iframe src="https://giphy.com/embed/BRWAInZmzzBm0" width="480" height="267" frameborder="0" class="giphy-embed" allowfullscreen></iframe><p><a href="https://giphy.com/gifs/someone-help-gratitude-BRWAInZmzzBm0">See the way Gus Fring instruct and smiling to hide plain sight via GIPHY</a></p><!--kg-card-end: html--><p>I can describe a few words for him:</p><ul><li>a gentleman</li><li>a professional businessman</li><li>a good customer services, always serve with his smile &quot;what can i do for you :) &quot;</li><li>a philanthrope</li><li>an iconic actor</li><li><strong>wise choice of words</strong></li><li>even if he chose to not talk at all, his eyes said it all</li><li>always maintain eye contact to overcome to everyone</li><li>always 10 steps ahead of main character (until being trapped with hector salamanca)</li><li>a good negotiator</li></ul><p>um, maybe I guess I should continue watching <em>Better Call Saul</em> series to see his appearance again.</p><p>Update:</p><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F440;</div><div class="kg-callout-text">I finished watching all seasons of Better Call Saul in October 2023.&#xA0;</div></div><p>You should watch this series man, <a href="https://www.netflix.com/id-en/title/70143836">it&apos;s on Netflix</a>!</p><figure class="kg-card kg-embed-card"><iframe width="200" height="113" src="https://www.youtube.com/embed/lo2X30VAew8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen title="Every Time &quot;Cook&quot; is Said in Breaking Bad"></iframe></figure><p><strong>JESSE : WE NEED TO COOK</strong></p><figure class="kg-card kg-embed-card"><iframe width="200" height="113" src="https://www.youtube.com/embed/bYlA8747tNA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen title="How Breaking Bad Created the Most Terrifying Villains on Television"></iframe></figure>]]></content:encoded></item><item><title><![CDATA[100DaysToOffload]]></title><description><![CDATA[<p>I&apos;ve been blogging since 2018 on <a href="https://naufal.web.id/">my other personal blog</a>, which is only posted in Indonesia (cause it&apos;s my native language). And I start a new personal blog in March 2022 as I said <a href="https://ariq.nauf.al/blog/lorem-ipsum-dolor-sit-amet/">before</a>:</p><blockquote class="kg-blockquote-alt">this is my first attempt to create an english blog.</blockquote><p>And</p>]]></description><link>https://ariq.nauf.al/blog/100daystooffload/</link><guid isPermaLink="false">67bc242c62fd8e00013ea118</guid><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[SysAdmin Life]]></category><category><![CDATA[Journal]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Tue, 21 Mar 2023 06:38:57 GMT</pubDate><content:encoded><![CDATA[<p>I&apos;ve been blogging since 2018 on <a href="https://naufal.web.id/">my other personal blog</a>, which is only posted in Indonesia (cause it&apos;s my native language). And I start a new personal blog in March 2022 as I said <a href="https://ariq.nauf.al/blog/lorem-ipsum-dolor-sit-amet/">before</a>:</p><blockquote class="kg-blockquote-alt">this is my first attempt to create an english blog.</blockquote><p>And I made it! I posted 100 posts in english on this blog about my hobbies, my work, and my journey. Let&apos;s wrap this up.</p><h2 id="2-reason">2 Reason</h2><p>Around 2021, I read <a href="https://medium.com/free-code-camp/every-developer-should-have-a-blog-heres-why-and-how-to-stick-with-it-5fd55a247fbf">flaviocopes</a> medium about &quot;Every developer should have a blog. Here&#x2019;s why, and how to stick with it.&quot;</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://medium.com/free-code-camp/every-developer-should-have-a-blog-heres-why-and-how-to-stick-with-it-5fd55a247fbf"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Every developer should have a blog. Here&#x2019;s why, and how to stick with it.</div><div class="kg-bookmark-description">Interested in learning JavaScript? Get my JavaScript Handbook</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://cdn-static-1.medium.com/_/fp/icons/Medium-Avatar-500x500.svg" alt><span class="kg-bookmark-author">We&#x2019;ve moved to freeCodeCamp.org/news</span><span class="kg-bookmark-publisher">Flavio Copes</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://miro.medium.com/v2/resize:fit:1200/1*SnptA4K2xnDL0tn7X9V1RQ.jpeg" alt></div></a></figure><p>He said that a developer&apos;s blog can &quot;learn much faster and <strong>Kick start your career</strong>&quot;, and I believe it. </p><blockquote>Giri Kuncoro (a CNCF ambassador) said on the <a href="https://youtu.be/Z89Yid_MqDM">webinar</a> that contributing to Open Source can be a way to improve existing skills, meet people with similar interests, grow our reputation. [<a href="https://ariq.nauf.al/blog/i-get-lift-scholarship-2022-sysadmin-superstar/">my blog post about it</a>]</blockquote><p>Perhaps it&apos;s similar to the path I choose, I tried to make a little contribution to the Internet with my blog post &#x1F929;</p><p>and in December 2021 I found this <a href="https://100daystooffload.com/">100 Days To Offload</a> challenge, so I decided to begin to write starting 2022.</p><blockquote>Tell us about your dog, your cat, your fish tank, or whatever hobbies you have. Someone will find it interesting. [<a href="https://100daystooffload.com/">100DaysToOffload</a>]</blockquote><blockquote class="kg-blockquote-alt">Just. Write.</blockquote><p>So, there are 2 reasons: <a href="https://flaviocopes.com/">Flaviocopes</a> and <a href="https://100daystooffload.com/">100DaysToOffload</a>.</p><h2 id="popular-posts">Popular Posts</h2><p>Since I talk a lot about my hobbies and my work. I made my several posts into number one on specific keyword ranking on Google, such as:</p><ul><li>OR-CBAT-15 [<a href="https://ariq.nauf.al/blog/solving-or-cbat-15-gcp-free-trial-problem/">Solving OR-CBAT-15 GCP free trial problem</a>]</li><li>Install RF Online on Windows Server [<a href="https://ariq.nauf.al/blog/install-rf-online-private-server-on-windows-server/">Install RF Online Private Server on Windows Server</a>]</li></ul><p>Some people trying to contact me on Instagram and Twitter directly about the post. </p><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F64F;</div><div class="kg-callout-text">Actually &quot;OR-CBAT-15&quot; is a Google Cloud problem, I&apos;m sorry can&apos;t help you guys, the problem that I solved <a href="https://ariq.nauf.al/blog/solving-or-cbat-15-gcp-free-trial-problem/">on the post</a> is maybe fixed in 2023, or maybe<em> it&apos;s an accidental thing</em>. You should contact about it to Google Cloud Platform staff directly.</div></div><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F64F;</div><div class="kg-callout-text">and for &quot;Install RF Online on Windows Server&quot;, I&apos;m sorry can&apos;t help for a specific problem to setup it. There is RF-Dev discord which all of RF Online development community gathers on there, come join: <a href="https://discord.com/invite/JrrvR3s">discord</a>.</div></div><p>and my post [<a href="https://ariq.nauf.al/blog/securely-sharing-storage-with-nfs-and-tailscale/">NFS and Tailscale</a>] was featured in <a href="https://tailscale.com/blog/2022-04-newsletter/">April 2022 Tailscale newsletter</a>. Alhamdulillah (All praises due to Allah )</p><figure class="kg-card kg-image-card"><img src="https://media.tenor.com/j-aCffXYuPYAAAAd/khabib-not-me.gif" class="kg-image" alt="https://media.tenor.com/j-aCffXYuPYAAAAd/khabib-not-me.gif" loading="lazy"></figure><blockquote class="kg-blockquote-alt">It&apos;s not through our own efforts alone but due to the abilities and talents given to us by Allah. <a href="https://twitter.com/IlmFeed/status/1629791018399801346?lang=en">&#xB9;</a></blockquote><h2 id="backlink-never-hurts">Backlink never hurts</h2><p>As time goes by, I run out of ideas as to what should I post. So I check nearby neighbors on the Internet to make me inspired to write again.</p><p>To appreciate them, I will put their link on my blog post (Yes it&apos;s a<strong> dofollow </strong>link, not nofollow) maybe can boost their SEO a bit.</p><h2 id="to-be-continued">To be continued</h2><p>Anyway, I am confident enough to post about my hobbies or my work in english on this blog. (because with the help of Grammarly of course &#x1F923;)</p><p>And Insya Allah, I will try to post again especially <a href="https://ariq.nauf.al/blog/tag/how-to/">How To: Series</a> but I don&apos;t know if it will be #100DaysToOffload part 2 like <a href="https://lazybear.io/posts/2nd-round-of-100daystooffload/">lazybear did</a>. </p><p>Last but not least, thank you <a href="https://kevq.uk/">Kev</a> for this challenge, and thank you guys on the Internet for reading my blog!</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/100daystooffload-hof.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/100daystooffload-hof.jpg" loading="lazy"><figcaption><a href="https://100daystooffload.com/">100DaysToOffload</a></figcaption></figure>]]></content:encoded></item><item><title><![CDATA[How to: Fail2Ban]]></title><description><![CDATA[<p>Hello, fellow SysAdmin &#x1F977;</p><p>In the last few days on March 2023, Alhamdulillah I made several posts about <a href="https://ariq.nauf.al/blog/tag/fail2ban/">Fail2Ban</a>:</p><ul><li><a href="https://ariq.nauf.al/blog/protect-ssh-with-fail2ban/">Protect SSH with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-mysql-auth-with-fail2ban/">Protect MySQL Auth with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-nginx-auth-with-fail2ban/">Protect Nginx Auth with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-wordpress-login-in-docker-container-with-fail2ban/">Protect Wordpress Login in Docker container with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/fail2ban-with-cloudflare/">Fail2ban with Cloudflare</a></li><li><a href="https://ariq.nauf.al/blog/email-notification-fail2ban-with-msmtp/">Email Notification Fail2ban with MSMTP</a></li></ul><p>This</p>]]></description><link>https://ariq.nauf.al/blog/fail2ban/</link><guid isPermaLink="false">67bc242c62fd8e00013ea162</guid><category><![CDATA[How To]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Fail2Ban]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Mon, 20 Mar 2023 18:18:20 GMT</pubDate><media:content url="https://ariq.nauf.al/blog/content/images/2023/04/how-to-fail2ban-ariq.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://ariq.nauf.al/blog/content/images/2023/04/how-to-fail2ban-ariq.jpg" alt="How to: Fail2Ban"><p>Hello, fellow SysAdmin &#x1F977;</p><p>In the last few days on March 2023, Alhamdulillah I made several posts about <a href="https://ariq.nauf.al/blog/tag/fail2ban/">Fail2Ban</a>:</p><ul><li><a href="https://ariq.nauf.al/blog/protect-ssh-with-fail2ban/">Protect SSH with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-mysql-auth-with-fail2ban/">Protect MySQL Auth with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-nginx-auth-with-fail2ban/">Protect Nginx Auth with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/protect-wordpress-login-in-docker-container-with-fail2ban/">Protect Wordpress Login in Docker container with Fail2Ban</a></li><li><a href="https://ariq.nauf.al/blog/fail2ban-with-cloudflare/">Fail2ban with Cloudflare</a></li><li><a href="https://ariq.nauf.al/blog/email-notification-fail2ban-with-msmtp/">Email Notification Fail2ban with MSMTP</a></li></ul><p>This is my first time to learn a firewall besides CSF and UFW.</p><blockquote><a href="https://www.fail2ban.org/wiki/index.php/Main_Page" rel="nofollow">Fail2ban</a> scans log files (e.g. <code>/var/log/httpd/error_log</code>) and bans IPs that show the malicious signs like too many password failures, seeking for exploits, etc. Generally Fail2ban is then used to update <a href="https://wiki.archlinux.org/title/Firewall">firewall</a> rules to reject the IP addresses for a specified amount of time, although any other arbitrary action (e.g. sending an email) could also be configured. [<a href="https://wiki.archlinux.org/title/fail2ban">ArchLinux wiki</a>]</blockquote><h3 id="installation-fail2ban">Installation Fail2Ban</h3><p>To begin start using fail2ban, install the package with:</p><figure class="kg-card kg-code-card"><pre><code>apt install fail2ban</code></pre><figcaption>for Debian based system</figcaption></figure><figure class="kg-card kg-code-card"><pre><code>sudo yum update
sudo yum install epel-release
sudo yum update
sudo yum install fail2ban</code></pre><figcaption>for CentOS 8</figcaption></figure><h3 id="configuring-fail2ban">Configuring Fail2Ban</h3><p>The essential file when configuring fail2ban is a file with name <code>jail.local</code>. Jail.local contains all profiles to define services that we want to protect or you can call it &quot;jail&quot;.</p><p>Basically <code>jail.local</code> override settings on <code>jail.conf</code> which is you should not to modify <code>jail.conf</code> directly, because <code>jail.conf</code> will probably be overwritten or improved in a distribution update.</p><p>in <code>jail.local</code> file, you can modify it to your needs.</p><p>[Default] settings will be applied in every jail and on jail section will override [default]. For example:</p><figure class="kg-card kg-code-card"><pre><code>[DEFAULT]
ignoreip = 127.0.0.1/8 # Your IP address
ignorecommand =
bantime = 604800
findtime = 100
maxretry = 2
enabled = false
mta = msmtp

[sshd]

enabled = true
filter = sshd
banaction = iptables-allports
logpath = %(sshd_log)s
findtime = 1d
maxretry = 5

[cf-wplogin]

enabled = true
port = http,https
filter = wplogin
logpath = /var/lib/docker/containers/*/*-json.log
banaction = cloudflare-apiv4
            iptables-allports
bantime = 86400</code></pre><figcaption>example jail.local</figcaption></figure><p>You can see there are 2 same <code>findtime</code> and <code>maxretry</code> on different jails.</p><blockquote>For specific [sshd] jail means that if there is failed attempt <strong>5 times</strong> within <strong>1 day</strong>, then the IP will be banned for <strong>604800 seconds</strong>.</blockquote><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F44D;</div><div class="kg-callout-text">[sshd] jail define <code>findtime</code> and <code>maxretry</code> so it will override [default] settings.</div></div><blockquote>For [cf-wplogin] jail means that if there is failed attempt <strong>twice </strong>within <strong>100 seconds</strong>, then the IP will be banned for <strong>86400 seconds</strong>.</blockquote><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F44D;</div><div class="kg-callout-text">[cf-wplogin] jail doesn&apos;t define <code>findtime</code> and <code>maxretry</code>, so it will use [default] settings. But it is defined <code>bantime</code>, so IPs will be banned for only <strong>86400 seconds</strong> rather than using [default] which is 604800 seconds.</div></div><p>I do recommend you guys read more about fail2ban on <a href="https://wiki.archlinux.org/title/fail2ban">Archwiki</a> or <a href="https://github.com/fail2ban/fail2ban/wiki">the official github repository</a>.</p><p>I hope it&apos;s useful, best regards</p><p>-Average SysAdmin</p>]]></content:encoded></item><item><title><![CDATA[Email Notification Fail2ban with MSMTP]]></title><description><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>Notification is an essential part of setting up Fail2ban and setting up email notifications in Fail2ban requires a mail server to send emails.</p>]]></description><link>https://ariq.nauf.al/blog/email-notification-fail2ban-with-msmtp/</link><guid isPermaLink="false">67bc242c62fd8e00013ea161</guid><category><![CDATA[Firewall]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Fail2Ban]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Mon, 20 Mar 2023 15:13:41 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>Notification is an essential part of setting up Fail2ban and setting up email notifications in Fail2ban requires a mail server to send emails. </p><p>I&apos;ve tried to configure sendmail (following <a href="https://lowendspirit.com/discussion/5288/how-to-setup-a-mail-relay-server-to-relay-mail-through-mxroute-centos-alma-rocky">this tutorial</a>) to send an email with smtp port but it requires many steps to be performed to start using it. And then I found out about sSMTP, it works but Archwiki said:</p><blockquote>sSMTP is unmaintained. Consider using something like <a href="https://wiki.archlinux.org/title/Msmtp">msmtp</a> or <a href="https://wiki.archlinux.org/title/OpenSMTPD">OpenSMTPD</a> instead. [<a href="https://wiki.archlinux.org/title/SSMTP">Archwiki/ssmtp</a>]</blockquote><p>So I decided to use msmtp to make my ubuntu server send email easily.</p><h3 id="step-1-installation-of-msmtp">Step 1: Installation of msmtp</h3><p>I use Ubuntu (a Debian-based system), install msmtp with the following command:</p><pre><code>sudo apt-get install msmtp msmtp-mta</code></pre><p>The configuration file is as follows:</p><pre><code>sudo nano /etc/msmtprc</code></pre><p>and then use the following settings for smtp account:</p><figure class="kg-card kg-code-card"><pre><code>defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log
account        myprofile
host           changeme.hostname.com
port           587
from           email@mydomain.com
user           email@mydomain.com
password       password
account default : myprofile
domain mydomain.com</code></pre><figcaption>/etc/msmtprc</figcaption></figure><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><p>Replace with your smtp server configuration. For example:</p><ul><li>Replace <code>myprofile</code> with your email provider&apos;s name</li><li>Replace <code>changeme.hostname.com</code> to your server smtp hostname</li><li>Replace <code>mydomain.com</code> in the domain section to your domain name.</li><li>msmtp log will be created on <code>/root/.msmtp.log</code></li></ul></div></div><p>Save the file, and change permission with <code>chmod 600 /etc/msmtprc</code> because the file contains the user and password in <em>plain text.</em></p><blockquote>Chmod 600 means that <br>(U)ser / owner can read, can write and can&apos;t execute.<br>(G)roup can&apos;t read, can&apos;t write and can&apos;t execute. <br>(O)thers can&apos;t read, can&apos;t write and can&apos;t execute.</blockquote><p>next step is to configure Fail2ban</p><h3 id="step-2-configure-fail2ban">Step 2: Configure Fail2ban</h3><p>Create a new action.d with the name <code>msmtp-whois.conf</code></p><pre><code>nano /etc/fail2ban/action.d/msmtp-whois.conf</code></pre><p>and add the following code below:</p><figure class="kg-card kg-code-card"><pre><code># Fail2Ban configuration file
#
# MSMTP

[Definition]

# Option:  actionban
# Notes.:  command executed when banning an IP. Take care that the
#          command is executed with Fail2Ban user rights.
# Tags:    See jail.conf(5) man page
# Values:  CMD
#

actionban =   printf %%b &quot;Subject: [Fail2Ban] &lt;name&gt;: BANNED IP &lt;ip&gt;!
              Date: `LC_ALL=C date +&quot;%%a, %%d %%h %%Y %%T %%z&quot;`
              From: &lt;sendername&gt; &lt;&lt;sender&gt;&gt;
              To: &lt;destination&gt;\n
              Hi,\n
              The jail &lt;name&gt; has banned ip &lt;ip&gt; after &lt;failures&gt; attempts against &lt;name&gt;.\n
              Here is some info about the IP: https://db-ip.com/&lt;ip&gt; \n
              Regards,\n
              Fail2Ban&quot; | &lt;mailcmd&gt; &lt;destination&gt;

# Option:  actionunban
# Notes.:  command executed when unbanning an IP. Take care that the
#          command is executed with Fail2Ban user rights.
# Tags:    See jail.conf(5) man page
# Values:  CMD
#
actionunban = printf %%b &quot;Subject: [Fail2Ban] &lt;name&gt;: UNBANNED IP &lt;ip&gt;
              Date: `LC_ALL=C date +&quot;%%a, %%d %%h %%Y %%T %%z&quot;`
              From: &lt;sendername&gt; &lt;&lt;sender&gt;&gt;
              To: &lt;destination&gt;\n
              Hi,\n
              Fail2ban has unbanned ip https://db-ip.com/&lt;ip&gt; successfully. \n
              Regards,\n
              Fail2Ban&quot; | &lt;mailcmd&gt; &lt;destination&gt;

[Init]

# Your system mail command
#
mailcmd = /usr/bin/msmtp -a default
</code></pre><figcaption><code>/etc/fail2ban/action.d/msmtp-whois.conf</code></figcaption></figure><p>This fail2ban action will send an email notification whenever IPs get banned or unbanned.</p><p>Open your <code>/etc/fail2ban/jail.local</code> </p><pre><code>nano /etc/fail2ban/jail.local</code></pre><p>add the following in the <code>[DEFAULT]</code> section, if you want to send email notifications to all jails:</p><pre><code>[DEFAULT]
...
mta = msmtp
action = %(action_mw)s[from=noreply@mydomain.com, sender=noreply@mydomain.com, destination=myother@otherdomain.com, sendername=Fail2Ban]</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><ul><li>From and Sender: The email account it sends from</li><li>Destination: Where you want to send the notification.</li><li>Sendername: Name of the sender</li></ul></div></div><p>But if you want to send email notifications in only one specific jail, add <code>action</code> to the <code>[jail]</code> section.</p><h3 id="step-3-lets-try-it-out">Step 3: Let&apos;s try it out</h3><p>I use this <code>cf-wplogin</code> jail from <a href="https://ariq.nauf.al/blog/fail2ban-with-cloudflare/">Fail2ban with Cloudflare tutorial</a> to test.</p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban.gif" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban.gif" loading="lazy"></figure><h3 id="email-result">Email result</h3><p>Fail2ban successfully sends email notifications, and the email result will look like this:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban2.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban2.jpg" loading="lazy"><figcaption>Banned IP email</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban3.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/msmtp-fail2ban3.jpg" loading="lazy"><figcaption>Unbanned IP email</figcaption></figure><p><em><strong>problem: </strong></em><br>- <em><strong>At this time I posted (20/03/2023) Gmail not receiving any my msmtp email, I am still this figuring out</strong></em><br>- Resolved. Domain dkim, spf txt must been validated before sent mail.<br></p><p>Reference:</p><ul><li><a href="https://technicalramblings.com/blog/how-to-add-email-notifications-to-fail2ban/#email">technicalramblings.com</a></li><li><a href="https://sylvaindurand.org/send-emails-with-msmtp/">sylvaindurand.org</a></li><li><a href="https://wiki.archlinux.org/title/msmtp">wiki.archlinux.org/title/msmtp</a></li></ul><p>If you guys are interested more about configuring fail2ban notifications, you may read fail2ban notifications to <a href="https://technicalramblings.com/blog/adding-ban-unban-notifications-from-fail2ban-with-pushover/#setting-up-pushover">pushover</a>, <a href="https://github.com/shafiqsaaidin/fail2ban-telegram-notification">telegram</a>, or even to <a href="https://technicalramblings.com/blog/adding-ban-unban-notifications-from-fail2ban-to-discord/">discord</a>!</p><p>Thank you for reading!</p>]]></content:encoded></item><item><title><![CDATA[Save Links to Read it later]]></title><description><![CDATA[<p>Recently, I&apos;ve been looking for a service to save links on the Internet that I will open/read it later or anime or series to watch later because of the limited time I have.</p><p>And I found <a href="getpocket.com">Pocket</a> (getpocket.com) and realize it&apos;s already integrated with</p>]]></description><link>https://ariq.nauf.al/blog/save-links-to-read-it-later/</link><guid isPermaLink="false">67bc242c62fd8e00013ea160</guid><category><![CDATA[Random]]></category><category><![CDATA[100DaysToOffload]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Sun, 19 Mar 2023 04:08:07 GMT</pubDate><content:encoded><![CDATA[<p>Recently, I&apos;ve been looking for a service to save links on the Internet that I will open/read it later or anime or series to watch later because of the limited time I have.</p><p>And I found <a href="getpocket.com">Pocket</a> (getpocket.com) and realize it&apos;s already integrated with Firefox all this time (the web browser that I use).</p><p>To start saving links, just click the &quot;Save to Pocket&quot; button on the right of the current URL.</p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/pocket-watch-later.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/pocket-watch-later.jpg" loading="lazy"></figure><p>There are some open-source versions of &quot;read it later&quot; apps like <a href="https://github.com/wallabag/wallabag">wallabag</a> and <a href="https://github.com/omnivore-app/omnivore">omnivore</a>, <em>maybe I&apos;ll try to deploy it in my spare time.</em></p><p>Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[Fail2ban with Cloudflare]]></title><description><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>In this case, I want to protect an app in Docker container with Fail2ban which uses Cloudflare CDN. </p><h3 id="prerequisites">Prerequisites</h3><p>This tutorial was <strong>adapted</strong></p>]]></description><link>https://ariq.nauf.al/blog/fail2ban-with-cloudflare/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15f</guid><category><![CDATA[Firewall]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Fail2Ban]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Sat, 18 Mar 2023 17:35:54 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>In this case, I want to protect an app in Docker container with Fail2ban which uses Cloudflare CDN. </p><h3 id="prerequisites">Prerequisites</h3><p>This tutorial was <strong>adapted </strong>from my other fail2ban guide (<a href="https://ariq.nauf.al/blog/protect-wordpress-login-in-docker-container-with-fail2ban/">Protect Wordpress Login in Docker container with Fail2Ban</a>) and enables Cloudflare CDN &quot;<strong>the orange cloud</strong>&quot; on the subdomain. So, in order to follow these steps (Step 1, Step 2 and so on), you may adapt your jail config or deploy the same WP container first:</p><ul><li>Install Docker Engine (<a href="https://docs.docker.com/engine/install/ubuntu/">docs</a>)</li><li>A docker-compose wordpress-mysql (<a href="https://github.com/docker/awesome-compose/tree/master/wordpress-mysql">gists</a>)</li><li>Nginx proxy, if you deployed WP on a different port</li><li>Install curl package with <code>apt install curl</code></li></ul><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://gist.github.com/naufdotal/299e748f078f705d04d8788c54ad94aa"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Protect Wordpress Login in Docker container with Fail2Ban</div><div class="kg-bookmark-description">Protect Wordpress Login in Docker container with Fail2Ban - compose.yaml</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://gist.github.com/fluidicon.png" alt><span class="kg-bookmark-author">Gist</span><span class="kg-bookmark-publisher">262588213843476</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://github.githubassets.com/images/modules/gists/gist-og-image.png" alt></div></a></figure><h3 id="step-1-add-a-new-fail2ban-jail">Step 1: Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail named &quot;cf-wplogin&quot;:</p><pre><code>[cf-wplogin]

enabled = true
port = http,https
filter = wplogin
chain = DOCKER-USER
logpath = /var/lib/docker/containers/*/*-json.log
banaction = cloudflare-apiv4
            iptables-allports</code></pre><h3 id="step-2-create-a-custom-fail2ban-filter">Step 2: Create a Custom Fail2ban Filter</h3><p>Create a new filter file : <code>nano <strong>/</strong>etc/fail2ban/filter.d/wplogin.conf</code></p><pre><code>[Definition]
failregex = {&quot;log&quot;:&quot;&lt;HOST&gt; -.*POST.*wp-login.php.*
ignoreregex =</code></pre><h3 id="step-3-create-a-fail2ban-action">Step 3: Create a Fail2ban action</h3><p>Create a new action file: <strong><code>nano /etc/fail2ban/action.d/cloudflare-apiv4.conf</code></strong></p><figure class="kg-card kg-code-card"><pre><code>#
# Author: Gilbn from https://technicalramblings.com
# Adapted Source: https://github.com/fail2ban/fail2ban/blob/master/config/action.d/cloudflare.conf and https://guides.wp-bullet.com/integrate-fail2ban-cloudflare-api-v4-guide/
#
# To get your Cloudflare API key: https://dash.cloudflare.com/profile use the Global API Key
#

[Definition]

# Option:  actionstart
# Notes.:  command executed once at the start of Fail2Ban.
# Values:  CMD
#
actionstart =

# Option:  actionstop
# Notes.:  command executed once at the end of Fail2Ban
# Values:  CMD
#
actionstop =

# Option:  actioncheck
# Notes.:  command executed once before each actionban command
# Values:  CMD
#
actioncheck =

# Option:  actionban
# Notes.:  command executed when banning an IP. Take care that the
#          command is executed with Fail2Ban user rights.
# Tags:      IP address
#            number of failures
#            unix timestamp of the ban time
# Values:  CMD

actionban = curl -s -X POST &quot;https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules&quot; \
            -H &quot;X-Auth-Email: &lt;cfuser&gt;&quot; \
            -H &quot;X-Auth-Key: &lt;cftoken&gt;&quot; \
            -H &quot;Content-Type: application/json&quot; \
            --data &apos;{&quot;mode&quot;:&quot;block&quot;,&quot;configuration&quot;:{&quot;target&quot;:&quot;ip&quot;,&quot;value&quot;:&quot;&lt;ip&gt;&quot;},&quot;notes&quot;:&quot;Fail2ban &lt;name&gt;&quot;}&apos;

# Option:  actionunban
# Notes.:  command executed when unbanning an IP. Take care that the
#          command is executed with Fail2Ban user rights.
# Tags:      IP address
#            number of failures
#            unix timestamp of the ban time
# Values:  CMD
#

actionunban = curl -s -X DELETE &quot;https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/$( \
              curl -s -X GET &quot;https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?mode=block&amp;configuration_target=ip&amp;configuration_value=&lt;ip&gt;&amp;page=1&amp;per_page=1&amp;match=all&quot; \
             -H &quot;X-Auth-Email: &lt;cfuser&gt;&quot; \
             -H &quot;X-Auth-Key: &lt;cftoken&gt;&quot; \
             -H &quot;Content-Type: application/json&quot; | awk -F&quot;[,:}]&quot; &apos;{for(i=1;i&lt;=NF;i++){if($i~/&apos;id&apos;\042/){print $(i+1);}}}&apos; | tr -d &apos;&quot;&apos; | sed -e &apos;s/^[ \t]*//&apos; | head -n 1)&quot; \
             -H &quot;X-Auth-Email: &lt;cfuser&gt;&quot; \
             -H &quot;X-Auth-Key: &lt;cftoken&gt;&quot; \
             -H &quot;Content-Type: application/json&quot;

[Init]

# Name of the jail in your jail.local file. default = [jail name]
name = default

# Option: cfuser
# Notes.: Replaces &lt;cfuser&gt; in actionban and actionunban with cfuser value below
# Values: Your CloudFlare user account

cfuser = [email&#xA0;protected]

# Option: cftoken (Global API Key)
# Notes.: Replaces &lt;cftoken&gt; in actionban and actionunban with cftoken value below
# Values: Your CloudFlare API key 
cftoken = YOUR-API-KEY
</code></pre><figcaption>This action script taken from <a href="https://technicalramblings.com/blog/cloudflare-fail2ban-integration-with-automated-set_real_ip_from-in-nginx/">technicalramblings.com</a></figcaption></figure><p>As you can notice, the actionban and actionunban is curl command to cloudflare restapi.</p><p>You can get your cloudflare api key from your profile page. Use the &quot;Global Api Key&quot;</p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/cf-global-apikey.png" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/cf-global-apikey.png" loading="lazy"></figure><p>After adding a new jail, filter, and action, Fail2ban should be restarted. Restart fail2ban with:</p><pre><code>sudo systemctl stop fail2ban
sudo systemctl start fail2ban</code></pre><h3 id="step-4-nginx">Step 4: Nginx </h3><p>As I mentioned earlier, these steps adapted from (<a href="https://ariq.nauf.al/blog/protect-wordpress-login-in-docker-container-with-fail2ban/">Protect Wordpress Login in Docker container with Fail2Ban</a>) which a wordpress container running on 127.0.0.1 port 8080 and proxied to 80 with NGINX. </p><p>Next step is configuring nginx so that it won&apos;t just ban the Cloudflare CDN IP but the actual IP of the visitor. Create a file named <code>cf-realip.conf</code> in <code>/etc/nginx/conf.d</code> directory and add the following:</p><figure class="kg-card kg-code-card"><pre><code>set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;</code></pre><figcaption><code>/etc/nginx/conf.d/cf-realip.conf</code></figcaption></figure><p>These IPs are Cloudflare&apos;s IPs, you can get the list at <a href="https://www.cloudflare.com/ips/"><a href="https://www.cloudflare.com/ips-v4">https://www.cloudflare.com/ips</a></a></p><p>And edit your main nginx.conf:</p><pre><code>nano /etc/nginx/nginx.conf</code></pre><p>Add the following code:</p><pre><code>##
# CF Real IP
##
include /etc/nginx/conf.d/cf-realip.conf;
real_ip_header X-Forwarded-For;</code></pre><p>restart your nginx with:</p><pre><code>service nginx restart</code></pre><h3 id="step-5-lets-try-it-out">Step 5: Let&apos;s try it out!</h3><p>Check the jail status with the following command:</p><pre><code>fail2ban-client status cf-wplogin</code></pre><pre><code>Output:
root@server:~# fail2ban-client status cf-wplogin
Status for the jail: cf-wplogin
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     0
|  `- File list:        /var/lib/docker/containers/599f2f26530ec5b26cbd5d542a3034ef6f54fdd78b32587ef7e33f8518e2493d/599f2f26530ec5b26cbd5d542a3034ef6f54fdd78b32587ef7e33f8518e2493d-json.log
 /var/lib/docker/containers/d1dbe55aed91c1f2e4095eb05a5a14dd0750e13b88e49b9786623e5903c22dc6/d1dbe55aed91c1f2e4095eb05a5a14dd0750e13b88e49b9786623e5903c22dc6-json.log
`- Actions
   |- Currently banned: 0
   |- Total banned:     0
   `- Banned IP list:
</code></pre><p>And the last step, let&apos;s try creating an error to trigger fail2ban jail with open your wordpress login in your web browser:</p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/wordpress-docker-nginx-fail2ban.gif" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/wordpress-docker-nginx-fail2ban.gif" loading="lazy"></figure><p>If you are trying to access other subdomain, cloudflare will display this error 1006 Access Denied, because your IP has been banned entirely.</p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/cloudflare-waf-fail2ban2.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/cloudflare-waf-fail2ban2.jpg" loading="lazy"></figure><h3 id="list-blocked-ip">List Blocked IP</h3><p>To get a list of blocked IPs in your server, run the following command:</p><pre><code>fail2ban-client status cf-wplogin</code></pre><pre><code>Output:
root@server:~# fail2ban-client status cf-wplogin
Status for the jail: cf-wplogin
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     3
|  `- File list:        /var/lib/docker/containers/599f2f26530ec5b26cbd5d542a3034ef6f54fdd78b32587ef7e33f8518e2493d/599f2f26530ec5b26cbd5d542a3034ef6f54fdd78b32587ef7e33f8518e2493d-json.log
 /var/lib/docker/containers/d1dbe55aed91c1f2e4095eb05a5a14dd0750e13b88e49b9786623e5903c22dc6/d1dbe55aed91c1f2e4095eb05a5a14dd0750e13b88e49b9786623e5903c22dc6-json.log
`- Actions
   |- Currently banned: 1
   |- Total banned:     1
   `- Banned IP list: 192.168.0.6
</code></pre><p>You can also check the list of banned IP on Cloudflare dashboard -&gt; Your domain -&gt; Security -&gt; WAF (Web Application Firewall) -&gt; Tools</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/cloudflare-waf-fail2ban.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/cloudflare-waf-fail2ban.jpg" loading="lazy"><figcaption>my IP successfully banned in Cloudflare</figcaption></figure><h3 id="unblock-ip">Unblock IP</h3><p>To unblock banned IPs, run the following command:</p><pre><code>fail2ban-client set cf-wplogin unbanip 192.168.0.6</code></pre><div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x203C;&#xFE0F;</div><div class="kg-callout-text">You need to unban ip with fail2ban-client, and cannot unban IP directly on Cloudflare dashboard, otherwise, you still cannot access your site because the server still bans your ip ( look at <code>banaction</code> section in jail.local <code>iptables-allports</code>)</div></div><p>Reference:</p><ul><li><a href="https://technicalramblings.com/blog/cloudflare-fail2ban-integration-with-automated-set_real_ip_from-in-nginx/#nginx">technicalramblings.com</a></li></ul><p>Thank you for reading!</p>]]></content:encoded></item><item><title><![CDATA[Protect Wordpress Login in Docker container with Fail2Ban]]></title><description><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><h3 id="step-1-add-a-new-fail2ban-jail">Step 1: Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail &quot;wplogin&</p>]]></description><link>https://ariq.nauf.al/blog/protect-wordpress-login-in-docker-container-with-fail2ban/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15c</guid><category><![CDATA[Firewall]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Fail2Ban]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Fri, 17 Mar 2023 17:17:22 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><h3 id="step-1-add-a-new-fail2ban-jail">Step 1: Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail &quot;wplogin&quot; if it doesn&apos;t exist:</p><pre><code>[wplogin]

enabled = true
port = http,https
filter = wplogin
chain = DOCKER-USER
logpath = /var/lib/docker/containers/*/*-json.log
banaction = docker-action</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><p>This jail will use a new filter named <code>wplogin</code> (we will create later) and use default settings to ban, which is my configuration:<br><code>bantime = 604800</code><br><code>findtime = 100</code><br><code>maxretry = 2</code></p><p>means that if there is a failed attempt twice within 100 seconds, then the IP will be banned for 604800 seconds.</p><p>The log file for the Docker container to be monitored is located on the Docker host under <code>/var/lib/docker/containers/&lt;CONTAINERID&gt;/&lt;CONTAINERID&gt;-json.log</code></p></div></div><h3 id="step-2-create-a-custom-fail2ban-filter">Step 2: Create a Custom Fail2ban Filter</h3><p>Create a new filter file on<strong> /etc/fail2ban/filter.d/wplogin.conf</strong></p><pre><code>[Definition]
failregex = {&quot;log&quot;:&quot;&lt;HOST&gt; -.*POST.*wp-login.php.*
ignoreregex =</code></pre><h3 id="step-3-create-a-fail2ban-action">Step 3: Create a Fail2ban action</h3><p>Create a new action file: <strong>nano /etc/fail2ban/action.d/docker-action.conf</strong></p><pre><code>[Definition]

actionstart = iptables -N f2b-wplogin
              iptables -A f2b-wplogin -j RETURN
              iptables -I INPUT -p tcp -m multiport --dports 80,443 -j f2b-wplogin

actionstop = iptables -D INPUT -p tcp -m multiport --dports 80,443 -j f2b-wplogin
             iptables -F f2b-wplogin
             iptables -X f2b-wplogin

actioncheck = iptables -n -L INPUT | grep -q &apos;f2b-wplogin[ \t]&apos;

actionban = iptables -I f2b-wplogin 1 -s &lt;ip&gt; -j DROP

actionunban = iptables -D f2b-wplogin -s &lt;ip&gt; -j DROP</code></pre><p>After adding a new jail, filter, and action, Fail2ban should be restarted. Restart fail2ban with:</p><pre><code>sudo systemctl stop fail2ban
sudo systemctl start fail2ban</code></pre><h3 id="step-4-lets-try-it-out">Step 4: Let&apos;s try it out!</h3><p>Like the other tutorials [<a href="https://ariq.nauf.al/blog/protect-nginx-auth-with-fail2ban/">nginx-auth</a>, and <a href="https://ariq.nauf.al/blog/protect-ssh-with-fail2ban/">mysql-auth</a>], we need to test Fail2ban policies to ensure they block traffic as expected.</p><p>In order to test it, you need to:</p><ul><li>Install Docker Engine (<a href="https://docs.docker.com/engine/install/ubuntu/">docs</a>)</li><li>A docker-compose wordpress-mysql (<a href="https://github.com/docker/awesome-compose/tree/master/wordpress-mysql">gists</a>)</li><li>Nginx proxy, if you deployed WP on a different port</li></ul><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://gist.github.com/naufdotal/299e748f078f705d04d8788c54ad94aa"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Protect Wordpress Login in Docker container with Fail2Ban</div><div class="kg-bookmark-description">Protect Wordpress Login in Docker container with Fail2Ban - compose.yaml</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://gist.github.com/fluidicon.png" alt><span class="kg-bookmark-author">Gist</span><span class="kg-bookmark-publisher">262588213843476</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://github.githubassets.com/images/modules/gists/gist-og-image.png" alt></div></a></figure><p>After the container was deployed, we can check the list of docker containers using:</p><pre><code>root@server:~/wp# docker ps -a
CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS                                   NAMES
9c269ebb7a16   wordpress:latest       &quot;docker-entrypoint.s&#x2026;&quot;   12 minutes ago   Up 12 minutes   0.0.0.0:8080-&gt;80/tcp, :::8080-&gt;80/tcp   wp-wordpress-1
5ece75d940d0   mariadb:10.6.4-focal   &quot;docker-entrypoint.s&#x2026;&quot;   12 minutes ago   Up 12 minutes   3306/tcp, 33060/tcp                     wp-db-1
</code></pre><p>You can see my WP container ID is <code>9c269ebb7a16</code></p><p>Now, check the jail status with the following command:</p><figure class="kg-card kg-code-card"><pre><code>root@server:~/wp#  fail2ban-client status wplogin
Status for the jail: wplogin
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     0
|  `- File list:        /var/lib/docker/containers/9c269ebb7a16e891383c388b7eeb21f6cdb01e803c33508ba39d6153991e9a5f/9c269ebb7a16e891383c388b7eeb21f6cdb01e803c33508ba39d6153991e9a5f-json.log
 /var/lib/docker/containers/5ece75d940d06a39b0e7de6b65548080735982b1276bca19f802bbbea9851b2c/5ece75d940d06a39b0e7de6b65548080735982b1276bca19f802bbbea9851b2c-json.log
`- Actions
   |- Currently banned: 0
   |- Total banned:     0
   `- Banned IP list:
</code></pre><figcaption>Fail2ban successfully monitored both containers</figcaption></figure><p>My Fail2ban log path/file list <strong>matches </strong>with my wp and mysql container.</p><p>Now open your wordpress site, and install wordpress as usual (like http://yourdomain.com/wp-admin/install.php) until you can log in on wp-login.php.</p><p>And the last step, let&apos;s try creating an error to trigger fail2ban jail.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/wordpress-docker-nginx-fail2ban.gif" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/wordpress-docker-nginx-fail2ban.gif" loading="lazy"><figcaption>Protect Wordpress Login in Docker container with Fail2Ban</figcaption></figure><h3 id="list-blocked-ip">List Blocked IP</h3><p>To get a list of blocked IPs in your server, run the following command:</p><pre><code>fail2ban-client status wplogin</code></pre><pre><code>Output
root@server:~/wp# fail2ban-client status wplogin
Status for the jail: wplogin
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     6
|  `- File list:        /var/lib/docker/containers/6390d681392a6a38830f51e8fb5ea7e9c8c3a2fedc57383de3fe816f2d8838d6/6390d681392a6a38830f51e8fb5ea7e9c8c3a2fedc57383de3fe816f2d8838d6-json.log /var/lib/docker/containers/b344eed0327b7645da323249b8d44c5d19e403f87a441840d8da9301734dab13/b344eed0327b7645da323249b8d44c5d19e403f87a441840d8da9301734dab13-json.log
`- Actions
   |- Currently banned: 1
   |- Total banned:     1
   `- Banned IP list:   192.168.0.6
</code></pre><h3 id="unblock-ip">Unblock IP</h3><p>To unblock banned IPs, run the following command</p><pre><code>fail2ban-client set wplogin unbanip 192.168.0.6</code></pre><p>Thanks for reading!</p><p>Reference:</p><ul><li><a href="https://www.the-lazy-dev.com/en/install-fail2ban-with-docker/">https://www.the-lazy-dev.com/en/install-fail2ban-with-docker/</a> (a bit inaccurate, fixed by <a href="https://github.com/fail2ban/fail2ban/wiki/Fail2Ban-and-Docker">fail2ban wiki</a>)</li></ul>]]></content:encoded></item><item><title><![CDATA[Install NGINX with Brotli Easily]]></title><description><![CDATA[<p><a href="https://github.com/google/brotli">Brotli</a> is a high-performance, lossless compression algorithm developed and maintained by Google. It can be used by web servers to compress files like <code>.html</code> and <code>.css</code> files and increase the perforce of websites and reduce their bandwidth requirements.</p><p><a href="https://www.nginx.com/">NGINX</a> does not provide a compiled brotli module for their open-source version.</p>]]></description><link>https://ariq.nauf.al/blog/install-nginx-with-brotli-easily/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15e</guid><category><![CDATA[NGINX]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Thu, 16 Mar 2023 08:44:01 GMT</pubDate><content:encoded><![CDATA[<p><a href="https://github.com/google/brotli">Brotli</a> is a high-performance, lossless compression algorithm developed and maintained by Google. It can be used by web servers to compress files like <code>.html</code> and <code>.css</code> files and increase the perforce of websites and reduce their bandwidth requirements.</p><p><a href="https://www.nginx.com/">NGINX</a> does not provide a compiled brotli module for their open-source version. This means that you will need to compile the NGINX brotli module from the source. But on this article, you can easily install nginx with brotli without compiling from source.</p><h3 id="install-nginx-with-brotli">Install NGINX with Brotli</h3><p>To install NGINX with Brotli easily without compiling as an advanced user does, I recommend installing it with <em>ppa: sury</em>.</p><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorials only work on Ubuntu variants, because using ppa repository</div></div><pre><code>add-apt-repository ppa:ondrej/nginx
apt update</code></pre><p>Install nginx as usual with:</p><pre><code>apt install nginx</code></pre><p>Your ubuntu machine should be installed nginx with latest stable version, check it with:</p><pre><code>nginx -V</code></pre><pre><code>Output:

nginx -V
nginx version: nginx/1.26.2
built with OpenSSL 3.0.13 30 Jan 2024
TLS SNI support enabled
configure arguments: --with-cc-opt=&apos;-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/nginx-do1QBJ/nginx-1.26.2=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/nginx-do1QBJ/nginx-1.26.2=/usr/src/nginx-1.26.2-1+ubuntu24.04.1+deb.sury.org+1 -fPIC -Wdate-time -D_FORTIFY_SOURCE=3&apos; --with-ld-opt=&apos;-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -fPIC&apos; --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_v3_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-mail_ssl_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_perl_module=dynamic --with-http_xslt_module=dynamic --with-mail=dynamic --with-stream=dynamic --with-stream_geoip_module=dynamic</code></pre><p>Install <code>libnginx-mod-brotli</code></p><pre><code>apt install libnginx-mod-brotli</code></pre><p>If you found an error <code>E: Package &apos;libnginx-mod-brotli&apos; has no installation candidate</code>, you can <a href="https://github.com/oerdnj/deb.sury.org/issues/2094#issuecomment-2239523866">try to install</a> </p><pre><code>apt install libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static</code></pre><p>on main configuration file <code>nginx.conf</code> http block { ... } , copy and paste the following contents into the editor:</p><figure class="kg-card kg-code-card"><pre><code>nano /etc/nginx/nginx.conf</code></pre><figcaption>open nginx.conf first with the editor</figcaption></figure><figure class="kg-card kg-code-card"><pre><code># Enable brotli
brotli on;
brotli_static on;
brotli_comp_level 6;

# File types to compress
brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;</code></pre><figcaption>copy paste this to /etc/nginx/nginx.conf on http block</figcaption></figure><p>Test nginx with:</p><pre><code>nginx -t</code></pre><figure class="kg-card kg-code-card"><pre><code>Output:
root@server:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful</code></pre><figcaption>This indicates that the nginx config syntax is ok</figcaption></figure><p>Restart nginx with</p><pre><code>service nginx restart</code></pre><h2 id="testing">Testing</h2><p>I need to test this nginx to confirm that brotli compressing is working as i expected. So, on this testing section, i will create a new simple nginx host, issue Let&apos;s encrypt SSL on it, and check with curl if brotli enabled or not.</p><p>Create a new nginx host conf in /etc/nginx/conf.d</p><pre><code>nano /etc/nginx/conf.d/newhost.conf</code></pre><pre><code>server {
    listen 80;
    server_name brotli.ns2.my.id;

root /var/www/html;
index index.nginx-debian.html;
location / {
                try_files $uri $uri/ =404;
        }
}
</code></pre><ul><li>Replace my server_name <code>brotli.ns2.my.id</code> to your domain name.</li></ul><p>After added a new simple nginx host with listen port 80 (http port), install certbot-nginx to easy issue SSL with Let&apos;s encrypt SSL and rewrite it to https enabled nginx host config.</p><pre><code>sudo apt-add-repository -r ppa:certbot/certbot
sudo apt install -y certbot python3-certbot-nginx</code></pre><p>Issue SSL with:</p><pre><code>certbot --nginx -d brotli.ns2.my.id</code></pre><ul><li>Replace <code>brotli.ns2.my.id</code> to your domain name</li></ul><pre><code class="language-bash">Output
root@server:# certbot --nginx -d brotli.ns2.my.id
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for brotli.ns2.my.id

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/brotli.ns2.my.id/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/brotli.ns2.my.id/privkey.pem
This certificate expires on 2025-04-20.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in t                        he background.

Deploying certificate
Successfully deployed certificate for brotli.ns2.my.id to /etc/nginx/conf.d/newhost.conf
Congratulations! You have successfully enabled HTTPS on https://brotli.ns2.my.id

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let&apos;s Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</code></pre><p>SSL has been deployed by certbot, and the previous nginx host config has been rewrited to redirect HTTP to HTTPS, and only use HTTPS.</p><pre><code class="language-bash">root@server:# cat brotli.conf
server {
    server_name brotli.ns2.my.id;

root /var/www/html;
index index.nginx-debian.html;
location / {
                try_files $uri $uri/ =404;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/brotli.ns2.my.id/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/brotli.ns2.my.id/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = brotli.ns2.my.id) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name brotli.ns2.my.id;
    return 404; # managed by Certbot
</code></pre><p>We&apos;ll use curl to make tell the server that we want brotli compression <code>-H &apos;Accept-Encoding: br&apos;</code> and then to only print the connection headers <code>-I</code> of the server&#x2019;s response:</p><pre><code class="language-bash">root@server:# curl -H &apos;Accept-Encoding: br&apos; -I https://brotli.ns2.my.id
HTTP/1.1 200 OK
Server: nginx/1.26.2
Date: Mon, 20 Jan 2025 08:15:57 GMT
Content-Type: text/html
Last-Modified: Tue, 17 Dec 2024 06:17:12 GMT
Connection: keep-alive
ETag: W/&quot;67611768-267&quot;
Content-Encoding: br
</code></pre><p>If <code>Content-Encoding: br</code> printed, your nginx has successfully enabled brotli compression. That&apos;s it!</p><p>Thank you for reading!</p>]]></content:encoded></item><item><title><![CDATA[Fix Geekbench test failed and low memory was detected.]]></title><description><![CDATA[<p>I ran <a href="https://github.com/masonr/yet-another-bench-script"><strong>yet-another-bench-script</strong></a><strong> (yabs) </strong>script with my new VPS and encountered an error.</p><p>Example yabs result:</p><pre><code>root@us:~# curl -sL yabs.sh | bash
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Yet-Another-Bench-Script
v2023-02-27
https://github.com/masonr/yet-another-bench-script
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

Fri Mar 10 04:30:37 UTC 2023
Basic System Information:

Uptime : 0 days, 15 hours, 30 minutes
Processor : AMD</code></pre>]]></description><link>https://ariq.nauf.al/blog/fix-geekbench-test-failed-and-low-memory-was-detected/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15d</guid><category><![CDATA[Troubleshoot]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Mon, 13 Mar 2023 07:34:53 GMT</pubDate><content:encoded><![CDATA[<p>I ran <a href="https://github.com/masonr/yet-another-bench-script"><strong>yet-another-bench-script</strong></a><strong> (yabs) </strong>script with my new VPS and encountered an error.</p><p>Example yabs result:</p><pre><code>root@us:~# curl -sL yabs.sh | bash
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Yet-Another-Bench-Script
v2023-02-27
https://github.com/masonr/yet-another-bench-script
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

Fri Mar 10 04:30:37 UTC 2023
Basic System Information:

Uptime : 0 days, 15 hours, 30 minutes
Processor : AMD EPYC 7551P 32-Core Processor
CPU cores : 1 @ 1999.999 MHz
AES-NI : &#x2714; Enabled
VM-x/AMD-V : &#x274C; Disabled
RAM : 969.5 MiB
Swap : 0.0 KiB
Disk : 902.3 GiB
Distro : Ubuntu 22.04.1 LTS
Kernel : 5.15.0-46-generic
VM Type : KVM
Basic Network Information:

Protocol : IPv6
ISP : HostHatch
ASN : AS63473 HostHatch, LLC
Host : HostHatch LLC
Location : Los Angeles, California (CA)
Country : United States
fio Disk Speed Tests (Mixed R/W 50/50):
Block Size 	4k (IOPS) 	64k (IOPS)
Read 	6.88 MB/s (1.7k) 	68.66 MB/s (1.0k)
Write 	6.90 MB/s (1.7k) 	69.07 MB/s (1.0k)
Total 	13.79 MB/s (3.4k) 	137.74 MB/s (2.1k)
		
Block Size 	512k (IOPS) 	1m (IOPS)
------ 	--- ---- 	---- ----
Read 	192.32 MB/s (375) 	181.73 MB/s (177)
Write 	202.54 MB/s (395) 	193.83 MB/s (189)
Total 	394.86 MB/s (770) 	375.56 MB/s (366)
iperf3 Network Speed Tests (IPv4):
Provider 	Location (Link) 	Send Speed 	Recv Speed 	Ping
Clouvider 	London, UK (10G) 	1.26 Gbits/sec 	1.40 Gbits/sec 	
Scaleway 	Paris, FR (10G) 	1.19 Gbits/sec 	busy 	145 ms
NovoServe 	North Holland, NL (40G) 	1.31 Gbits/sec 	busy 	148 ms
Uztelecom 	Tashkent, UZ (10G) 	845 Mbits/sec 	675 Mbits/sec 	240 ms
Clouvider 	NYC, NY, US (10G) 	1.94 Gbits/sec 	busy 	59.5 ms
Clouvider 	Dallas, TX, US (10G) 	3.19 Gbits/sec 	4.62 Gbits/sec 	29.2 ms
Clouvider 	Los Angeles, CA, US (10G) 	3.66 Gbits/sec 	4.84 Gbits/sec 	0.791 ms
iperf3 Network Speed Tests (IPv6):
Provider 	Location (Link) 	Send Speed 	Recv Speed 	Ping
^PClouvider 	London, UK (10G) 	busy 	busy 	
Scaleway 	Paris, FR (10G) 	1.43 Gbits/sec 	1.16 Gbits/sec 	152 ms
NovoServe 	North Holland, NL (40G) 	1.17 Gbits/sec 	1.20 Gbits/sec 	151 ms
Uztelecom 	Tashkent, UZ (10G) 	782 Mbits/sec 	669 Mbits/sec 	238 ms
Clouvider 	NYC, NY, US (10G) 	2.38 Gbits/sec 	2.90 Gbits/sec 	59.0 ms
Clouvider 	Dallas, TX, US (10G) 	3.97 Gbits/sec 	3.79 Gbits/sec 	29.0 ms
Clouvider 	Los Angeles, CA, US (10G) 	6.62 Gbits/sec 	4.78 Gbits/sec 	0.531 ms

Geekbench test failed and low memory was detected. Add at least 1GB of SWAP or use GB4 instead (higher compatibility with low memory systems).

YABS completed in 11 min 29 sec
root@usbackup:~# curl -sL yabs.sh | bash</code></pre><h3 id="how-to-fix">How to fix</h3><p>As we can see on my benchmark result, my ubuntu template didn&apos;t come with a swap (0.0 KiB). So to fix this error, add at least 1 GB of swap. Add swap with this method:</p><p>First, create a file that will be used as a swap:</p><pre><code>sudo fallocate -l 2G /swapfile</code></pre><p>Set the file permissions to <code>600</code> to prevent regular users to write and read the file:</p><pre><code>sudo chmod 600 /swapfile</code></pre><p>Create a Linux swap area on the file:</p><pre><code>sudo mkswap /swapfile</code></pre><pre><code class="language-output">Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=fde7d2c8-06ea-400a-9027-fd731d8ab4c8
</code></pre><p>Activate the swap file by running the following command:</p><pre><code>sudo swapon /swapfile</code></pre><p>Verify that the swap is active by using either the <code>swapon</code> or the <a href="https://linuxize.com/post/free-command-in-linux/"><code>free</code></a>command, as shown below:</p><pre><code>sudo swapon --show</code></pre><pre><code>Output
root@us:~# sudo swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file   2G  44M   -2</code></pre><p>As we can see, I added a 2GB Swap while my ram is 1GB.</p><p>However, if we reboot, the server will not retain the swap settings automatically. To make it permanent, add the swap file to our <code>/etc/fstab</code> file.</p><p>Back up the <code>/etc/fstab</code> file in case anything goes wrong:</p><pre><code class="language-bash">sudo cp /etc/fstab /etc/fstab.bak

</code></pre><p>Add the swap file information to the end of your <code>/etc/fstab</code> file by typing:</p><figure class="kg-card kg-code-card"><pre><code class="language-bash">/swapfile swap swap defaults 0 0</code></pre><figcaption>/etc/fstab</figcaption></figure><h3 id="re-run-yabs-script">Re-run yabs script</h3><p>Ran yabs script to benchmark again with:</p><pre><code>curl -sL yabs.sh | bash</code></pre><figure class="kg-card kg-code-card"><pre><code>root@usbackup:~# curl -sL yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2023-02-27                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Sat Mar 11 12:52:04 UTC 2023

Basic System Information:
---------------------------------
Uptime     : 1 days, 5 hours, 24 minutes
Processor  : AMD EPYC 7551P 32-Core Processor
CPU cores  : 1 @ 1999.999 MHz
AES-NI     : &#x2714; Enabled
VM-x/AMD-V : &#x274C; Disabled
RAM        : 981.2 MiB
Swap       : 2.0 GiB
Disk       : 902.3 GiB
Distro     : Ubuntu 20.04.3 LTS
Kernel     : 5.4.0-91-generic
VM Type    : KVM

Basic Network Information:
---------------------------------
Protocol   : IPv6
ISP        : HostHatch
ASN        : AS63473 HostHatch, LLC
Host       : HostHatch LLC
Location   : Los Angeles, California (CA)
Country    : United States

fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 6.35 MB/s     (1.5k) | 55.53 MB/s     (867)
Write      | 6.35 MB/s     (1.5k) | 56.09 MB/s     (876)
Total      | 12.71 MB/s    (3.1k) | 111.62 MB/s   (1.7k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 173.30 MB/s    (338) | 230.71 MB/s    (225)
Write      | 182.50 MB/s    (356) | 246.07 MB/s    (240)
Total      | 355.81 MB/s    (694) | 476.78 MB/s    (465)

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping
-----           | -----                     | ----            | ----            | ----
Clouvider       | London, UK (10G)          | 1.00 Gbits/sec  | 1.41 Gbits/sec  |
Scaleway        | Paris, FR (10G)           | 1.52 Gbits/sec  | busy            | 144 ms
NovoServe       | North Holland, NL (40G)   | 1.33 Gbits/sec  | 1.10 Gbits/sec  | 148 ms
Uztelecom       | Tashkent, UZ (10G)        | 638 Mbits/sec   | 468 Mbits/sec   | 243 ms
Clouvider       | NYC, NY, US (10G)         | busy            | busy            | 58.2 ms
Clouvider       | Dallas, TX, US (10G)      | 3.25 Gbits/sec  | 4.79 Gbits/sec  | 29.2 ms
Clouvider       | Los Angeles, CA, US (10G) | 3.54 Gbits/sec  | busy            | 0.994 ms

iperf3 Network Speed Tests (IPv6):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping
-----           | -----                     | ----            | ----            | ----
Clouvider       | London, UK (10G)          | busy            | busy            |
Scaleway        | Paris, FR (10G)           | busy            | busy            | 152 ms
NovoServe       | North Holland, NL (40G)   | 1.17 Gbits/sec  | 1.12 Gbits/sec  | 148 ms
Uztelecom       | Tashkent, UZ (10G)        | busy            | 589 Mbits/sec   | 243 ms
Clouvider       | NYC, NY, US (10G)         | busy            | busy            | 58.1 ms
Clouvider       | Dallas, TX, US (10G)      | 3.42 Gbits/sec  | 3.52 Gbits/sec  | 28.8 ms
Clouvider       | Los Angeles, CA, US (10G) | 7.18 Gbits/sec  | 6.23 Gbits/sec  | 0.686 ms

Geekbench 6 Benchmark Test:
---------------------------------
Test            | Value
                |
Single Core     | 486
Multi Core      | 276
Full Test       | https://browser.geekbench.com/v6/cpu/495970
</code></pre><figcaption>HostHatch Storage VPS Benchmark</figcaption></figure><p>Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[Protect Nginx Auth with Fail2Ban]]></title><description><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><h3 id="step-1-add-a-new-fail2ban-jail">Step 1: Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail &quot;nginx-http-auth&</p>]]></description><link>https://ariq.nauf.al/blog/protect-nginx-auth-with-fail2ban/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15b</guid><category><![CDATA[Firewall]]></category><category><![CDATA[Fail2Ban]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[Linux]]></category><category><![CDATA[NGINX]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Fri, 10 Mar 2023 07:11:52 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><h3 id="step-1-add-a-new-fail2ban-jail">Step 1: Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail &quot;nginx-http-auth&quot; if it doesn&apos;t exist:</p><pre><code>[nginx-http-auth]

enabled  = true
port     = http,https
logpath = %(nginx_error_log)s</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><p>This jail will use <code>nginx-http-auth</code> filter and use default settings to ban, which my configuration:<br><code>bantime = 604800</code><br><code>findtime = 100</code><br><code>maxretry = 2</code></p><p>means that if there is a failed attempt twice within 100 seconds, then the IP will be banned for 604800 seconds.</p></div></div><p>After saving <code>jail.local</code> file, restart fail2ban with:</p><pre><code>sudo systemctl restart fail2ban</code></pre><h3 id="step-2-create-a-htpasswd">Step 2: Create a htpasswd</h3><p>To start out with nginx authentication, you need to install <code>apache2-utils</code> package which serves the <code>htpasswd</code> utility.</p><p>Install the <code>apache2-utils</code> package on your server by typing:</p><pre><code>sudo apt update
sudo apt install apache2-utils</code></pre><p>Now, you have access to the <code>htpasswd</code> command. Specify a username at the end of the command to create a new entry within the file:</p><figure class="kg-card kg-code-card"><pre><code>sudo htpasswd -c /etc/nginx/.htpasswd ariq</code></pre><figcaption>This will create a htpasswd file on <code>/etc/nginx/</code> with username ariq</figcaption></figure><p>You will be asked to supply and confirm a password for the user.</p><p>To add additional users on the same <code>.htpasswd</code> file, leave out the -c :</p><pre><code>sudo htpasswd /etc/nginx/.htpasswd admin</code></pre><p>Let&apos;s see the contents of the file with cat:</p><pre><code>cat /etc/nginx/.htpasswd</code></pre><pre><code>Output:

root@server:~# cat /etc/nginx/.htpasswd
ariq:$apr1$x98Xk7n4$3wl.6fw6zpdHUUSfzYdv7/
admin:$apr1$mdVddE52$v5H7E9GEENz0NgWxEAjah1</code></pre><p>To begin setting up nginx authentication, add <code>auth_basic</code> and <code>auth_basic_user_file</code> on your active nginx virtual host. For example, I added on <code>/etc/nginx/conf.d/default.conf</code> :</p><pre><code>server {
  server_name pma.ns2.my.id;
  root /var/www/html/;
  index index.php index.html;

  auth_basic &quot;Restricted Content&quot;;
   auth_basic_user_file /etc/nginx/.htpasswd;

  location / {
    try_files $uri $uri/ /index.php;
  }</code></pre><h3 id="step-3-lets-try-it-out">Step 3: Let&apos;s try it out!</h3><p>Let&apos;s try creating an error to trigger fail2ban jail.</p><p>Open phpmyadmin url on a web browser, and then fill wrong input on username and password twice.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://ns2.my.id/unggah/2023/03/nginxauth-fail2ban2.gif" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/nginxauth-fail2ban2.gif" loading="lazy"><figcaption>Protect Nginx Auth with Fail2Ban</figcaption></figure><h3 id="list-blocked-ip">List Blocked IP</h3><p>To get a list of blocked IPs in your server, run the following command:</p><pre><code>fail2ban-client status nginx-http-auth</code></pre><h3 id="unblock-ip">Unblock IP</h3><p>To unblock banned IPs, run the following command</p><pre><code>fail2ban-client set nginx-http-auth unbanip 111.222.333.444</code></pre><p>Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[My First Time Unsplash Submission]]></title><description><![CDATA[<p>3 months ago (in December 2022), Alhamdulillah Allah The Giver of Gifts, the Most Gracious, and the Most Merciful invited me to His <em>sacred House </em>(<strong>Mecca / </strong>Makkah <em>al</em>-<em>Mukarramah</em>) and Prophet&apos;s Mosque (Medina / al-<em>Madinah al</em>-<em>Munawwarah</em>). I take many photos yet some of them are</p>]]></description><link>https://ariq.nauf.al/blog/my-first-time-unsplash-submission/</link><guid isPermaLink="false">67bc242c62fd8e00013ea15a</guid><category><![CDATA[Journal]]></category><category><![CDATA[100DaysToOffload]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Thu, 09 Mar 2023 15:58:40 GMT</pubDate><content:encoded><![CDATA[<p>3 months ago (in December 2022), Alhamdulillah Allah The Giver of Gifts, the Most Gracious, and the Most Merciful invited me to His <em>sacred House </em>(<strong>Mecca / </strong>Makkah <em>al</em>-<em>Mukarramah</em>) and Prophet&apos;s Mosque (Medina / al-<em>Madinah al</em>-<em>Munawwarah</em>). I take many photos yet some of them are good or blurry, or just selfies &#x1F605;</p><p>I used Unsplash as a cover on <a href="https://ariq.nauf.al/blog/cheapest-way-to-buy-vps-and-domain/">a post</a> a long time ago, and sometimes scroll to see the best work of experts.</p><p>So I decided to upload some photos with my device, but I didn&apos;t know the photos I uploaded should be reviewed first by the Unsplash team. </p><figure class="kg-card kg-image-card"><img src="https://ns2.my.id/unggah/2023/03/unsplash-naufal.jpg" class="kg-image" alt="https://ns2.my.id/unggah/2023/03/unsplash-naufal.jpg" loading="lazy"></figure><p>The recently uploaded photos are tagged as &quot;In Review&quot;. It takes around 24 hours to review, as stated by their community staff:</p><blockquote>Photos are usually assessed for curation and discoverability by the Editorial Team within 24 hours, however this time may be slightly longer if there&#x2019;s a higher than average number of submissions. <a href="https://medium.com/unsplash/unsplash-submissions-101-b06b59a640d">https://medium.com/unsplash/unsplash-submissions-101-b06b59a640d</a></blockquote><p>Most of my photos were accepted while 2 of them were flagged and can&apos;t be published in Unsplash.</p><pre><code>Your recent photo submission

Hey Ariq,

Thanks for submitting to Unsplash!

We wanted to let you know that unfortunately our system flagged your recent submission since it didn&#x2019;t meet the guidelines - specifically the image quality and/or editing.

Due to the high volume of submissions, we are unable to give specific critique or feedback on individual photos, however here&apos;s a list of the most common reasons that may apply in this case:

    Unclear photos
    Photos containing excess pixelation or spotting
    Selfies
    Extreme angles
    Excessive sun glare, &#x2018;Blown out&#x2019; sky
    Under or overexposed images
    Heavy vignetting
    Excessive grain
    Excessive use of filters
    Over-sharpened
    Over-saturated
    Picking single colors out on black and white photos
    Noise from over-editing
    Over-smoothing

You can read all submission guidelines here.

Discover handy resources.

Thanks for your understanding,

&#x2014; The Unsplash Team </code></pre><p>Check out my Unsplash page here:</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://unsplash.com/@naufdotal"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Ariq Naufal (@naufdotal) | Unsplash Photo Community</div><div class="kg-bookmark-description">See 6 of the best free to download photos, images, and wallpapers by Ariq Naufal on Unsplash.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://unsplash.com/apple-touch-icon.png" alt><span class="kg-bookmark-author">Unsplash</span><span class="kg-bookmark-publisher">Unsplash</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://images.unsplash.com/opengraph/1x1.png?auto=format&amp;fit=crop&amp;w=1200&amp;h=630&amp;q=60&amp;mark-w=64&amp;mark-align=top%2Cleft&amp;mark-pad=50&amp;blend-w=1&amp;mark=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2Flogo.png&amp;blend=https%3A%2F%2Fimages.unsplash.com%2Fopengraph%2F1x1.png%3Fauto%3Dformat%26fit%3Dcrop%26w%3D1200%26h%3D630%26q%3D60%26mark-align%3Dcenter%26mark-y%3D365%26mark%3Dhttps%253A%252F%252Fassets.imgix.net%252F~text%253Fauto%253Dformat%2526fit%253Dcrop%2526w%253D840%2526h%253D180%2526q%253D60%2526mark-align%253Dcenter%2526txt-color%253Dfff%2526txt-size%253D64%2526txt-align%253Dtop%25252Ccenter%2526fm%253Dpng%2526txt-font%253DHelvetica%25252520Neue%25252520Bol%2526txt%253DAriq%252520Naufal%26blend%3Dhttps%253A%252F%252Fimages.unsplash.com%252Fphoto-1678032873860-39dbb3ba7c33%253Fixlib%253Drb-4.0.3%2526w%253D1200%2526fit%253Dcrop%2526q%253D60%2526fm%253Djpg%2526crop%253Dfaces%25252Cedges%2526cs%253Dtinysrgb%2526auto%253Dformat%2526h%253D630%2526mark-w%253D160%2526mark-align%253Dcenter%2526mark-y%253D190%2526blend-mode%253Dnormal%2526blend-alpha%253D30%2526mark%253Dhttps%25253A%25252F%25252Fimages.unsplash.com%25252Fprofile-1678039001594-4aa55c0eeb39%25253Fixlib%25253Drb-4.0.3%252526crop%25253Dfaces%252526fit%25253Dcrop%252526w%25253D160%252526h%25253D160%252526auto%25253Dformat%252526q%25253D60%252526fm%25253Dpng%252526mask%25253Dellipse%2526blend%253D000000" alt></div></a></figure><p>Thank you for reading. </p>]]></content:encoded></item><item><title><![CDATA[Protect MySQL Auth with Fail2Ban]]></title><description><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>Since I have a <a href="https://ariq.nauf.al/blog/enable-remote-access-mariadb/">remote mysql server</a> that the public (Internet) can connect to, I&apos;ve been wondering <a href="https://ariq.nauf.al/blog/protect-mysql-auth-with-fail2ban/">how to protect mysql</a></p>]]></description><link>https://ariq.nauf.al/blog/protect-mysql-auth-with-fail2ban/</link><guid isPermaLink="false">67bc242c62fd8e00013ea159</guid><category><![CDATA[Firewall]]></category><category><![CDATA[100DaysToOffload]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Fail2Ban]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Thu, 09 Mar 2023 11:59:14 GMT</pubDate><content:encoded><![CDATA[<div class="kg-card kg-callout-card kg-callout-card-grey"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">This tutorial is part of the <a href="https://ariq.nauf.al/blog/fail2ban/">How to: Fail2Ban</a> tutorials series, you may check the main post to know what Fail2ban is, and how Fail2Ban works.</div></div><p>Since I have a <a href="https://ariq.nauf.al/blog/enable-remote-access-mariadb/">remote mysql server</a> that the public (Internet) can connect to, I&apos;ve been wondering <a href="https://ariq.nauf.al/blog/protect-mysql-auth-with-fail2ban/">how to protect mysql auth with Fail2ban</a>. </p><blockquote>We have discussed <a href="https://ariq.nauf.al/blog/protect-ssh-with-fail2ban/">Protect SSH with Fail2Ban</a> in the previous post.</blockquote><p>I have crawled google about this too and found this one [<a href="https://ipang.id/post/2021-04-16-mysqld-auth-fail2ban/">Setup mysqld-auth jail di fail2ban</a>], but it&apos;s not relevant to my latest mariadb (mariadb 10.6), the default log still on <code>/var/log/syslog</code>. &#xA0;</p><p>So, I am writing this one, maybe it could help someone (<em>and for a note to myself</em>):</p><h3 id="add-a-new-fail2ban-jail">Add a New Fail2ban Jail</h3><p>Edit <code>jail.local</code> file:</p><pre><code>sudo nano /etc/fail2ban/jail.local</code></pre><p>Add a new jail if it doesn&apos;t exist:</p><pre><code>[mysqld-auth]
enabled = true
port     = 3306
log-error = /var/log/syslog
logpath = /var/log/syslog
backend  = %(mysql_backend)s
</code></pre><p>I found out why my mariadb 10.6 is still using <code>var/log/syslog</code> to log rather than <code>/var/log/mysql/error.log</code> on <code>/etc/mysql/mariadb.conf.d</code> file, there is a comment:</p><pre><code># When running under systemd, error logging goes via stdout/stderr to journald
# and when running legacy init error logging goes to syslog due to
# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
# Enable this if you want to have error logging into a separate file
#log_error = /var/log/mysql/error.log
</code></pre><p>After save <code>jail.local</code>, restart fail2ban with:</p><pre><code>sudo systemctl restart fail2ban</code></pre><p>It is important to test your Fail2ban policies to ensure they block traffic as expected. So I tested it.</p><pre><code>root@sql2:~# fail2ban-client status mysqld-auth
Status for the jail: mysqld-auth
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     3
|  `- File list:        /var/log/syslog
`- Actions
   |- Currently banned: 1
   |- Total banned:     1
   `- Banned IP list:   192.168.0.6</code></pre><p>The banned IP list can&apos;t connect the remote database server with port 3306 but still can connect to other normal ports like ssh, or http/https ports.</p><h3 id="unblock-ip">Unblock IP</h3><p>To unblock banned IPs, run the following command</p><pre><code>fail2ban-client set mysqld-auth unbanip 192.168.0.6</code></pre><p>Thanks for reading!</p>]]></content:encoded></item><item><title><![CDATA[Enable Remote Access MariaDB]]></title><description><![CDATA[<p>Sometimes we only use MySQL for localhost, which means that your application and MySQL databases are on one server for simplicity. </p><p>And this guide will help you to enable remote access MySQL, so in case you want to build <u>a dedicated database server</u> and make it another server (for example</p>]]></description><link>https://ariq.nauf.al/blog/enable-remote-access-mariadb/</link><guid isPermaLink="false">67bc242c62fd8e00013ea158</guid><category><![CDATA[MySQL]]></category><category><![CDATA[LEMP Stack]]></category><category><![CDATA[Linux]]></category><category><![CDATA[100DaysToOffload]]></category><dc:creator><![CDATA[Ariq Naufal]]></dc:creator><pubDate>Wed, 08 Mar 2023 16:51:49 GMT</pubDate><content:encoded><![CDATA[<p>Sometimes we only use MySQL for localhost, which means that your application and MySQL databases are on one server for simplicity. </p><p>And this guide will help you to enable remote access MySQL, so in case you want to build <u>a dedicated database server</u> and make it another server (for example web server) to connect your database server.</p><h3 id="step-1-create-a-remote-mysql-user">Step 1: Create a Remote MySQL User</h3><p>We need to create a remote mysql user to allow connect it to our database server, open mysql root session with:</p><pre><code>mysql -u root</code></pre><p>and execute the following query:</p><pre><code>CREATE USER &apos;newremoteuser&apos;@&apos;%&apos; IDENTIFIED BY &apos;remote_password&apos;;</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><ul><li>Replace <code>newremoteuser</code> with your desired mysql username, and <code>remote_password</code> with mysql password</li><li>% means that this newremoteuser can connect to this database server from the Internet (any host).<br></li></ul></div></div><h3 id="step-2-remote-access-mariadb">Step 2: Remote Access MariaDB</h3><p>After we installed the latest MariaDB server (<a href="https://ariq.nauf.al/blog/install-the-lemp-linux-nginx-mariadb-and-php-on-ubuntu-22-04/#step-3-install-mariadb-database-server-latest-mariadb-10611">I&apos;ve posted this tutorial here</a>), open the configuration of your mariadb (<em>my version MariaDB 10.6</em>) with your favorite editor:</p><pre><code>nano /etc/mysql/mariadb.conf.d/50-server.cnf</code></pre><p>Scroll until you find <code>bind-address</code>, replace it with:</p><figure class="kg-card kg-code-card"><pre><code>bind-address            = 0.0.0.0</code></pre><figcaption>This bind address configuration will allow everyone on the internet to connect to your database server.</figcaption></figure><p>save it with <code>CTRL+X</code> and <code>Y</code>.</p><p>Restart your mysql / mariadb server with the following command:</p><pre><code>service mysql restart</code></pre><h3 id="step-3-check-remote-access">Step 3: Check Remote Access</h3><p>To start to check remote access of your database server is successfully configured or not, first log in to another server (for example web server). Install <code>mariadb-client</code> if you don&apos;t install it before, use the following command in the ssh session:</p><pre><code>mysql -u newremoteuser -p -h 47.44.44.44 -P 3306</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">Note</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><ul><li>Replace <code>newremoteuser</code> to your mysql user that was previously created on step 1.</li><li>Replace <code>47.44.44.444</code> to your database server&apos;s IP public address.</li></ul></div></div><h3 id="optional-check-firewall">Optional: Check Firewall</h3><p>If you are using default firewall Uncomplicated Firewall (<strong>UFW</strong>), use the following command to allow IP to connect remote mysql your database server:</p><figure class="kg-card kg-code-card"><pre><code>sudo ufw allow from 192.168.0.6 to any port 3306</code></pre><figcaption>Replace 192.168.0.6 with your mysql client&apos;s IP Address</figcaption></figure><p>If you are using Config Server Firewall (CSF), make sure to add port 3306 on an incoming connection (<strong>TCP_IN</strong>) &#xA0;(UDP_IN) to allow everyone on the Internet to connect remotely mysql your database server.</p><p>Or, you can add whitelisted IP on <code>/etc/csf/csf.allow</code> file:</p><figure class="kg-card kg-code-card"><pre><code>tcp|in|d=3306|s=192.168.0.6
udp|in|d=3306|s=192.168.0.6</code></pre><figcaption>Replace 192.168.0.6 with your mysql client&apos;s IP Address</figcaption></figure><p>Restart CSF with <code>csf -r</code> command to apply the configuration.</p><p>Thanks for reading!</p>]]></content:encoded></item></channel></rss>