<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Carrie</title>
    <description>The latest articles on Forem by Carrie (@carrie_luo1).</description>
    <link>https://forem.com/carrie_luo1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2050794%2F4ffc7324-3c05-4f39-8cb1-e2a77a57e9c7.jpg</url>
      <title>Forem: Carrie</title>
      <link>https://forem.com/carrie_luo1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/carrie_luo1"/>
    <language>en</language>
    <item>
      <title>Top 7 Free WAF Comparison</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Tue, 14 Apr 2026 15:22:32 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/top-7-free-waf-comparison-3a3e</link>
      <guid>https://forem.com/carrie_luo1/top-7-free-waf-comparison-3a3e</guid>
      <description>&lt;h1&gt;
  
  
  Free WAF Comparison
&lt;/h1&gt;

&lt;p&gt;WAF which is also known as the Web Application Firewall. Unlike traditional firewalls, WAF operates at the application layer and provides better protection for Web systems based on the HTTP/HTTPS protocol, safeguarding them from hacker attacks.&lt;/p&gt;

&lt;p&gt;A Web Application Firewall (WAF) is a security system that sits in front of a web application to inspect, filter, and block malicious traffic. It acts as an intermediary between the internet and your website or web application, examining HTTP requests and responses for potential threats.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Self-Hosted&lt;/th&gt;
&lt;th&gt;Web UI&lt;/th&gt;
&lt;th&gt;Anti-Exploit&lt;/th&gt;
&lt;th&gt;Deploy&lt;/th&gt;
&lt;th&gt;Anti-Bot&lt;/th&gt;
&lt;th&gt;Rate Limiting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloudflare&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;Reverse Proxy&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SafeLine WAF&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reverse Proxy&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ModSecurity&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SDK&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NAXSI&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Nginx Module&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAppSec&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SDK&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BunkerWeb&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;Nginx Module&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Haltdos WAF&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Nginx Module&lt;/td&gt;
&lt;td&gt;NO&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YES&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.cloudflare.com/" rel="noopener noreferrer"&gt;Cloudflare&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The Cloudflare WAF runs on the Cloudflare global network and sits in front of web applications to stop a wide range of real-time attacks using powerful rulesets, advanced rate limiting, exposed credential checks, uploaded content scanning, and other security measures.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9ldtf6ljwnbc0ii4nrr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9ldtf6ljwnbc0ii4nrr.png" width="800" height="462"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;SafeLine&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;SafeLine is a self-hosted &lt;strong&gt;&lt;code&gt;WAF(Web Application Firewall)&lt;/code&gt;&lt;/strong&gt; to protect your web apps from attacks and exploits.&lt;/p&gt;

&lt;p&gt;A web application firewall helps protect web apps by filtering and monitoring HTTP traffic between a web application and the Internet. It typically protects web apps from attacks such as &lt;code&gt;SQL injection&lt;/code&gt;, &lt;code&gt;XSS&lt;/code&gt;, &lt;code&gt;code injection&lt;/code&gt;, &lt;code&gt;os command injection&lt;/code&gt;, &lt;code&gt;CRLF injection&lt;/code&gt;, &lt;code&gt;ldap injection&lt;/code&gt;, &lt;code&gt;xpath injection&lt;/code&gt;, &lt;code&gt;RCE&lt;/code&gt;, &lt;code&gt;XXE&lt;/code&gt;, &lt;code&gt;SSRF&lt;/code&gt;, &lt;code&gt;path traversal&lt;/code&gt;, &lt;code&gt;backdoor&lt;/code&gt;, &lt;code&gt;bruteforce&lt;/code&gt;, &lt;code&gt;http-flood&lt;/code&gt;, &lt;code&gt;bot abused&lt;/code&gt;, among others.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsccj8vdcnl5g28ek1szh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsccj8vdcnl5g28ek1szh.png" width="800" height="500"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.modsecurity.org/" rel="noopener noreferrer"&gt;ModSecurity&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;ModSecurity is a classic open-source WAF project and has been very popular for many years.&lt;/p&gt;

&lt;p&gt;Technically, ModSecurity is not a "WAF" but a "WAF rule set". ModSecurity is the foundation of most WAFs; it does not include other common WAF features such as website management and log management, and it does not even have an interface. What ModSecurity has is only protection rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b7uc608e6cfw6qdfn4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b7uc608e6cfw6qdfn4a.png" width="512" height="257"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/nbs-system/naxsi" rel="noopener noreferrer"&gt;NAXSI&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;NAXSI means &lt;strong&gt;N&lt;/strong&gt;ginx &lt;strong&gt;A&lt;/strong&gt;nti &lt;strong&gt;X&lt;/strong&gt;SS &lt;strong&gt;S&lt;/strong&gt;QL &lt;strong&gt;I&lt;/strong&gt;njection.&lt;/p&gt;

&lt;p&gt;Technically, it is a third party nginx module, available as a package for many UNIX-like platforms. This module, by default, reads a small subset of simple and readable rules containing 99% of known patterns involved in website vulnerabilities.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As you may have noticed, the development of Naxsi has been stopped and the repository will be archived for historical reasons.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/bunkerity/bunkerweb" rel="noopener noreferrer"&gt;BunkerWeb&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;BunkerWeb based on NGINX under the hood, it will protect your web services to make them "secure by default". BunkerWeb integrates seamlessly into your existing environments and is fully configurable to meet your own use-cases .&lt;/p&gt;

&lt;p&gt;BunkerWeb contains primary security features as part of the core but can be easily extended with additional ones thanks to a plugin system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farxizdw4d57al0ei26uy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farxizdw4d57al0ei26uy.png" width="800" height="396"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.openappsec.io/" rel="noopener noreferrer"&gt;OpenAppSec&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;open-appsec is a machine learning security engine that preemptively and automatically prevents threats against Web Application &amp;amp; APIs.&lt;/p&gt;

&lt;p&gt;The open-appsec engine learns how users normally interact with your web application. It then uses this information to automatically detect requests that fall outside of normal operations, and conducts further analysis to decide whether the request is malicious or not.&lt;/p&gt;

&lt;p&gt;Upon every HTTP request, all parts are decoded, JSON and XML sections are extracted, and any IP-level access control is applied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj28axxl9iijpf392anui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj28axxl9iijpf392anui.png" width="800" height="663"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.haltdos.com/appsec/enterprise-web-application-firewall/" rel="noopener noreferrer"&gt;Haltdos WAF&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Haltdos WAF CE is a free version by Haltdos. It is a high-performance WAF and WAAP solution designed to safeguard Web Applications and APIs. Unlike many other open-source WAF solutions in the list, Haltdos uses a new HTTP request processing engine designed for handling performance, creating complex rules, and mitigating sophisticated attacks. Supports complex attack mitigation techniques such as captcha, rate limiting, anomaly detection, redirection, request termination, and connection termination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqda0wqu6e1p1v5p58j0c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqda0wqu6e1p1v5p58j0c.png" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>firewall</category>
      <category>freewaf</category>
    </item>
    <item>
      <title>SafeLine WAF running on Rootless Docker</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Thu, 09 Apr 2026 02:47:25 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/safeline-waf-running-on-rootless-docker-c2p</link>
      <guid>https://forem.com/carrie_luo1/safeline-waf-running-on-rootless-docker-c2p</guid>
      <description>&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;This article was originally written by obuno.&lt;/li&gt;
&lt;li&gt;Original source: &lt;a href="https://blog.synack.li/posts/safeline-on-rootless-docker/" rel="noopener noreferrer"&gt;https://blog.synack.li/posts/safeline-on-rootless-docker/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The technical details in this article have not been officially verified by the SafeLine team. Please test in a non-production environment and do not apply directly to production systems. SafeLine is not responsible for any damage or issues caused by improper use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;In today’s post we’ll get going at getting &lt;a href="https://github.com/chaitin/safeline" rel="noopener noreferrer"&gt;SafeLine&lt;/a&gt;&lt;br&gt;
 excellent WAF (Web Application Firewall) to agree at running on Rootless Docker setup.&lt;/p&gt;

&lt;h2 id="prerequisites"&gt;Prerequisites# &lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker installed in rootless mode (&lt;code&gt;dockerd-rootless-setuptool.sh install&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;SafeLine CE &lt;code&gt;compose.yaml&lt;/code&gt; and &lt;code&gt;.env&lt;/code&gt; present&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo&lt;/code&gt; access for sysctl (one-time)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Setting up Docker in Rootless mode is a bit beyond the goal of that article, you’ll find all you need &lt;a href="https://docs.docker.com/engine/security/rootless/" rel="noopener noreferrer"&gt;here.&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Once this has been done, let’s get down at making SafeLine run on such a setup. In order to build your SafeLine setup, you’d need to do this by hands. That means that you’d need to download the docker-compose file and create your own &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;That is what I did logged in as the docker running user:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;mkdir -p /home/user/data/safeline/&lt;br&gt;
cd /home/user/data/safeline/&lt;br&gt;
wget "&lt;a href="https://waf.chaitin.com/release/latest/compose.yaml" rel="noopener noreferrer"&gt;https://waf.chaitin.com/release/latest/compose.yaml&lt;/a&gt;"&lt;br&gt;
touch ".env"&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;cat &amp;gt; /home/user/data/safeline/.env &amp;lt;&amp;lt; 'EOF'&lt;br&gt;
SAFELINE_DIR=/home/user/data/safeline&lt;br&gt;
IMAGE_TAG=latest&lt;br&gt;
MGT_PORT=9443&lt;br&gt;
POSTGRES_PASSWORD="&amp;lt;apassword&amp;gt;"&lt;br&gt;
SUBNET_PREFIX=172.22.222&lt;br&gt;
IMAGE_PREFIX=chaitin&lt;br&gt;
ARCH_SUFFIX=&lt;br&gt;
RELEASE=&lt;br&gt;
REGION=-g&lt;br&gt;
MGT_PROXY=0&lt;br&gt;
EOF&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now comes a few identified issues, issues we will address further on:&lt;/p&gt;

&lt;h2 id="problem-1--ports-80443-not-binding-on-the-host"&gt;Problem 1 — Ports 80/443 not binding on the host:# &lt;/h2&gt;

&lt;p&gt;In rootless Docker, &lt;code&gt;network_mode: host&lt;/code&gt; does &lt;strong&gt;not&lt;/strong&gt; mean the real host network. Containers land in the rootlesskit network namespace instead. As a result, nginx inside &lt;code&gt;safeline-tengine&lt;/code&gt; binds to 80/443 correctly &lt;em&gt;inside&lt;/em&gt; the container, but those ports are never exposed to the real host interface. Additionally, rootless Docker cannot bind privileged ports (&amp;lt; 1024) without a sysctl change.&lt;/p&gt;

&lt;h2 id="problem-2--real-client-ips-not-visible-to-safeline-snat"&gt;Problem 2 — Real client IPs not visible to SafeLine (SNAT):# &lt;/h2&gt;

&lt;p&gt;Rootlesskit’s default port driver SNATs all incoming traffic before it reaches the container, so SafeLine/nginx sees the rootlesskit gateway IP instead of the real client IP. This breaks IP-based WAF features: block lists, rate limiting, geo-blocking and IP reputation rules all become ineffective. The fix is to switch the port driver to &lt;code&gt;slirp4netns&lt;/code&gt;, which handles port forwarding at a lower level and preserves the original source IP.&lt;/p&gt;

&lt;p&gt;Now let’s fix these issues:&lt;/p&gt;

&lt;h2 id="step-1--switch-rootlesskit-port-driver-to-slirp4netns"&gt;Step 1 — Switch rootlesskit port driver to slirp4netns# &lt;/h2&gt;

&lt;p&gt;This is the &lt;strong&gt;most important step&lt;/strong&gt; — it both enables privileged port binding and preserves real client IPs. With slirp4netns as the port driver, &lt;code&gt;CAP_NET_BIND_SERVICE&lt;/code&gt; via &lt;code&gt;setcap&lt;/code&gt; is no longer needed or effective; the sysctl approach (Step 2) is the only path for privileged ports.&lt;/p&gt;

&lt;p&gt;Create the Docker daemon override file (under your docker user owner):&lt;/p&gt;

bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;mkdir -p ~/.config/systemd/user/docker.service.d&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;cat &amp;gt; ~/.config/systemd/user/docker.service.d/override.conf &lt;span&gt;&amp;lt;&amp;lt; EOF&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;[Service]&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns"&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns"&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;EOF&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reload and restart the Docker user daemon:&lt;/p&gt;
&lt;br&gt;
bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;systemctl --user daemon-reload&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;systemctl --user stop docker&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;pkill rootlesskit          &lt;span&gt;# ensure full teardown&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;systemctl --user start docker&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;systemctl --user status docker&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify the driver is active:&lt;/p&gt;
&lt;br&gt;
bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;cat ~/.config/systemd/user/docker.service.d/override.conf&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;systemctl --user show docker &lt;span&gt;|&lt;/span&gt; grep Environment&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="step-2--lower-the-unprivileged-port-start-on-the-host"&gt;Step 2 — Lower the unprivileged port start on the host# &lt;/h2&gt;

&lt;p&gt;Required for binding ports 80/443 in rootless mode. With slirp4netns as the port driver, this is the &lt;strong&gt;only&lt;/strong&gt; supported method — &lt;code&gt;setcap cap_net_bind_service&lt;/code&gt; on rootlesskit does not work with the slirp4netns port driver.&lt;/p&gt;

bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# Temporary (verify first)&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;sudo sysctl -w net.ipv4.ip_unprivileged_port_start&lt;span&gt;=&lt;/span&gt;&lt;span&gt;80&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# Persistent (survives reboot)&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;echo&lt;/span&gt; &lt;span&gt;"net.ipv4.ip_unprivileged_port_start=80"&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; sudo tee /etc/sysctl.d/99-unprivileged-ports.conf&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;sudo sysctl --system&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify:&lt;/p&gt;
&lt;br&gt;
bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;sudo sysctl net.ipv4.ip_unprivileged_port_start&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# Expected: net.ipv4.ip_unprivileged_port_start = 80&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="step-3--fix-the-tengine-service-in-composeyaml"&gt;Step 3 — Fix the tengine service in compose.yaml# &lt;/h2&gt;

&lt;h3 id="why-this-is-needed"&gt;Why this is needed# &lt;/h3&gt;

&lt;p&gt;SafeLine’s default &lt;code&gt;compose.yaml&lt;/code&gt; uses &lt;code&gt;network_mode: host&lt;/code&gt; for tengine with no explicit port mappings. In rootless Docker this means nginx binds inside the rootlesskit netns only — invisible to the real host.&lt;/p&gt;

&lt;h3 id="the-fix"&gt;The fix# &lt;/h3&gt;

&lt;p&gt;Edit &lt;code&gt;compose.yaml&lt;/code&gt;. Find the &lt;code&gt;tengine&lt;/code&gt; service and &lt;strong&gt;remove&lt;/strong&gt; &lt;code&gt;network_mode: host&lt;/code&gt;, replacing it with explicit port mappings and a network assignment:&lt;/p&gt;

yamlCopy&lt;pre&gt;&lt;code data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;tengine&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;container_name&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;safeline-tengine&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;restart&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;always&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;image&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;${IMAGE_PREFIX}/safeline-tengine${REGION}${ARCH_SUFFIX}:${IMAGE_TAG}&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;ports&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;- &lt;span&gt;"80:80"&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;- &lt;span&gt;"443:443"&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;networks&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;safeline-ce&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;ipv4_address&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;${SUBNET_PREFIX}.x  &lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;# pick a free IP — see note below&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;volumes&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;# ... unchanged ...&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;environment&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;# ... unchanged ...&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;ulimits&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;nofile&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;131072&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;# network_mode: host   ← REMOVE this line&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;

&lt;p&gt;&lt;strong&gt;Finding a free IP:&lt;/strong&gt; Check &lt;code&gt;.env&lt;/code&gt; for &lt;code&gt;SUBNET_PREFIX&lt;/code&gt;, then review other containers'
&lt;code&gt;ipv4_address&lt;/code&gt; entries in &lt;code&gt;compose.yaml&lt;/code&gt; to pick an unused last octet.&lt;/p&gt;

&lt;p&gt;I went for this:&lt;br&gt;
&lt;code&gt;networks:&lt;/code&gt;&lt;br&gt;
&lt;code&gt;safeline-ce:&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ipv4_address: ${SUBNET_PREFIX}.6&lt;/code&gt;&lt;/p&gt;




&lt;/blockquote&gt;

&lt;h3 id="remove-any-sysctls-block-from-tengine-if-present"&gt;Remove any sysctls block from tengine (if present)# &lt;/h3&gt;

&lt;p&gt;If your compose file has this under tengine, remove it — it is not permitted with explicit port mappings:&lt;/p&gt;

yamlCopy&lt;pre&gt;&lt;code data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# REMOVE if present:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;sysctls&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;- &lt;span&gt;net.ipv4.ip_unprivileged_port_start=0&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;h2 id="step-4--bring-safeline-up"&gt;Step 4 — Bring SafeLine up# &lt;/h2&gt;

bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;cd&lt;/span&gt; /path/to/safeline&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;docker compose up -d&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;docker compose ps&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expected state — all containers &lt;code&gt;Up&lt;/code&gt;:&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;safeline-tengine    Up&lt;br&gt;
safeline-mgt        Up&lt;br&gt;
safeline-detector   Up&lt;br&gt;
safeline-pg         Up&lt;br&gt;
safeline-chaos      Up&lt;br&gt;
safeline-fvm        Up&lt;br&gt;
safeline-luigi      Up&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;h2 id="step-5--verify-port-binding-on-the-host"&gt;Step 5 — Verify port binding on the host# &lt;/h2&gt;

bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;ss -tlnp &lt;span&gt;|&lt;/span&gt; grep -E &lt;span&gt;':80|:443|:9443'&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Expected — slirp4netns owning all three ports:&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;LISTEN 0 1 0.0.0.0:80        0.0.0.0:*    users:(("slirp4netns",...))&lt;br&gt;
LISTEN 0 1 0.0.0.0:443       0.0.0.0:*    users:(("slirp4netns",...))&lt;br&gt;
LISTEN 0 1 0.0.0.0:9443      0.0.0.0:*    users:(("slirp4netns",...))&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also verify nginx is listening inside the container via &lt;code&gt;/proc&lt;/code&gt;:&lt;/p&gt;
&lt;br&gt;
bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;docker &lt;span&gt;exec&lt;/span&gt; safeline-tengine cat /proc/1/net/tcp &lt;span&gt;|&lt;/span&gt; awk &lt;span&gt;'{print $2}'&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; grep -E &lt;span&gt;"^00000000:(0050|01BB)"&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# 0x0050 = port 80, 0x01BB = port 443&lt;/span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;h2 id="step-6--configure-upstream-applications"&gt;Step 6 — Configure upstream applications# &lt;/h2&gt;

&lt;h3 id="connecting-tengine-to-an-external-app-network-optional"&gt;Connecting tengine to an external app network (optional)# &lt;/h3&gt;

&lt;p&gt;If your upstream apps live in a separate Docker compose stack, attach tengine to their network:&lt;/p&gt;

yamlCopy&lt;pre&gt;&lt;code data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;# In SafeLine compose.yaml&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;services&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;tengine&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;networks&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;safeline-ce&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;ipv4_address&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;${SUBNET_PREFIX}.x&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;      &lt;/span&gt;&lt;span&gt;your-app-network&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;            &lt;/span&gt;&lt;span&gt;# join the upstream network&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;aliases&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;          &lt;/span&gt;- &lt;span&gt;safeline-tengine&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;# Bottom of compose.yaml&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;networks&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;safeline-ce&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;external&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;your-app-network&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;external&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;name: actual_docker_network_name   # from&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;docker network ls&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Find the network name:&lt;/p&gt;
&lt;br&gt;
bashCopy&lt;pre&gt;&lt;code data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span&gt;docker network ls&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span&gt;docker inspect &amp;lt;upstream-container&amp;gt; &lt;span&gt;|&lt;/span&gt; grep -A &lt;span&gt;5&lt;/span&gt; Networks&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="adding-a-site-in-safeline-ui"&gt;Adding a site in SafeLine UI# &lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Browse to &lt;code&gt;https://&amp;lt;host&amp;gt;:9443&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add your upstream app (IP:port or container name — see note below)&lt;/li&gt;
&lt;li&gt;SafeLine generates nginx vhost configs in &lt;code&gt;/etc/nginx/sites-enabled/IF_backend_*&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;nginx reloads automatically&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id="upstream-addressing"&gt;Upstream addressing# &lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;172.1x.x.x:PORT&lt;/code&gt; (static IP)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Reliable if IPs are statically assigned in compose, I went for this&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;container_name:PORT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;SafeLine UI accepts it although nginx validation fails&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2 id="step-7--securing-the-safeline-admin-console-on-tcp9443"&gt;Step 7 — Securing the SafeLine Admin Console on TCP:9443# &lt;/h2&gt;

&lt;p&gt;⚠️ Obviously, securing any external access toward port TCP:9443 is highly recommended, I did that through UFW rules on the host itself, thus allowing inbound connectivity to TCP:9443 for tolerated IP stacks only.&lt;/p&gt;

&lt;p&gt;That’s it, you can now enjoy your Rootless SafeLine setup !&lt;br&gt;
Hope this helps,&lt;br&gt;
obuno&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>websecurity</category>
      <category>tutorial</category>
      <category>firewall</category>
    </item>
    <item>
      <title>Running a Self-Hosted WAF in the Real World: Notes from Using SafeLine</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Wed, 24 Dec 2025 06:46:59 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/running-a-self-hosted-waf-in-the-real-world-notes-from-using-safeline-2ceo</link>
      <guid>https://forem.com/carrie_luo1/running-a-self-hosted-waf-in-the-real-world-notes-from-using-safeline-2ceo</guid>
      <description>&lt;h2&gt;
  
  
  The problem that pushed me to look at a WAF
&lt;/h2&gt;

&lt;p&gt;Like many small teams, we didn’t start with a security team.&lt;br&gt;&lt;br&gt;
At first, the site was simple: a couple of APIs, a frontend, some admin endpoints hidden behind “security by obscurity”.&lt;/p&gt;

&lt;p&gt;Then traffic grew.&lt;/p&gt;

&lt;p&gt;Not the good kind.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credential stuffing on &lt;code&gt;/login&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Aggressive bots scraping pages that didn’t even matter&lt;/li&gt;
&lt;li&gt;Random scanners hitting &lt;code&gt;/wp-admin&lt;/code&gt;, &lt;code&gt;/phpmyadmin&lt;/code&gt;, and endpoints we never had&lt;/li&gt;
&lt;li&gt;Occasional bursts of traffic that weren’t large enough to be a DDoS, but enough to hurt stability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8awksezoto7o5s0xttdj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8awksezoto7o5s0xttdj.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nothing catastrophic, but enough to waste time and attention.&lt;br&gt;&lt;br&gt;
Rate limiting at the app level helped a bit, but it was reactive and incomplete.&lt;/p&gt;

&lt;p&gt;That’s when I started seriously looking at a WAF.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cloud WAF vs self-hosted: the trade-off I actually cared about
&lt;/h2&gt;

&lt;p&gt;The obvious answer is a cloud WAF. They’re easy, mature, and battle-tested.&lt;/p&gt;

&lt;p&gt;I did consider them.&lt;/p&gt;

&lt;p&gt;But there were a few reasons I hesitated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visibility&lt;/strong&gt;: I wanted to see raw requests, not just dashboards and sampled logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control at the application layer&lt;/strong&gt;: I didn’t want everything abstracted away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost predictability&lt;/strong&gt;: Traffic spikes shouldn’t automatically become billing spikes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture fit&lt;/strong&gt;: Some services weren’t easily routed through a third-party proxy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That led me to explore &lt;strong&gt;self-hosted WAFs&lt;/strong&gt; instead.&lt;br&gt;&lt;br&gt;
More responsibility, yes—but also more control.&lt;/p&gt;

&lt;p&gt;SafeLine was one of the options I ended up testing in depth.&lt;/p&gt;




&lt;h2&gt;
  
  
  How SafeLine fits into the traffic path
&lt;/h2&gt;

&lt;p&gt;SafeLine is a &lt;strong&gt;self-hosted WAF&lt;/strong&gt;, typically deployed as a reverse proxy in front of your application.&lt;/p&gt;

&lt;p&gt;A common setup looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Client&lt;br&gt;
↓&lt;br&gt;
SafeLine (WAF)&lt;br&gt;
↓&lt;br&gt;
Upstream (Nginx / App / Load Balancer)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It inspects requests at the &lt;strong&gt;HTTP application layer&lt;/strong&gt;, not just IP or TCP level.&lt;br&gt;&lt;br&gt;
This is important, because most of the real problems today are not volumetric attacks, but &lt;em&gt;abusive behavior that looks almost legitimate&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;From an operational point of view, I appreciated that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It runs in &lt;strong&gt;your own environment&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Logs stay &lt;strong&gt;local&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You can correlate WAF behavior directly with upstream logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SafeLine is &lt;strong&gt;self-hosted but not fully open source&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Some components are open (for example, parts of its semantic analysis engine), but it’s not an “everything on GitHub” project—and that’s fine as long as expectations are clear.&lt;/p&gt;




&lt;h2&gt;
  
  
  Features that actually mattered in practice
&lt;/h2&gt;

&lt;p&gt;I’m intentionally skipping the “long feature list” here.&lt;br&gt;&lt;br&gt;
Instead, these are the parts that made a real difference for me.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Anti-bot challenges at the application layer
&lt;/h3&gt;

&lt;p&gt;One thing I underestimated before using a WAF seriously:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;how much bot traffic isn’t obviously malicious&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;SafeLine’s anti-bot challenge mechanism works at the application layer, not just on IP reputation.&lt;/p&gt;

&lt;p&gt;This helped with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Headless browsers scraping content&lt;/li&gt;
&lt;li&gt;Basic automation that rotated IPs but failed behavioral checks&lt;/li&gt;
&lt;li&gt;Reducing noise without blanket IP blocking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key benefit wasn’t “blocking everything”, but &lt;strong&gt;reducing junk traffic while keeping false positives manageable&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Rate limiting that’s not buried inside the app
&lt;/h3&gt;

&lt;p&gt;Yes, you can implement rate limiting in your code.&lt;/p&gt;

&lt;p&gt;But having it &lt;strong&gt;outside&lt;/strong&gt; the app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeps logic consistent across services&lt;/li&gt;
&lt;li&gt;Avoids redeploys just to tweak limits&lt;/li&gt;
&lt;li&gt;Makes abuse patterns more visible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found SafeLine’s rate limiting useful especially for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login endpoints&lt;/li&gt;
&lt;li&gt;Public APIs&lt;/li&gt;
&lt;li&gt;Admin or internal paths that shouldn’t be hit often&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwua4qvs9mivtlgwdfh05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwua4qvs9mivtlgwdfh05.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbax93l3c2elpfqspf6z4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbax93l3c2elpfqspf6z4.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Visibility and debuggability
&lt;/h3&gt;

&lt;p&gt;This is where self-hosted solutions really shine.&lt;/p&gt;

&lt;p&gt;When something is blocked, I can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See the exact request&lt;/li&gt;
&lt;li&gt;Check upstream logs&lt;/li&gt;
&lt;li&gt;Correlate timestamps&lt;/li&gt;
&lt;li&gt;Decide whether it’s a false positive or actual abuse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matters more than people think.&lt;br&gt;&lt;br&gt;
A “secure” system that’s opaque is hard to trust.&lt;/p&gt;




&lt;h2&gt;
  
  
  A realistic deployment experience (not a full tutorial)
&lt;/h2&gt;

&lt;p&gt;Deployment wasn’t exotic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker-based setup&lt;/li&gt;
&lt;li&gt;Fronted by DNS pointing traffic to SafeLine&lt;/li&gt;
&lt;li&gt;Upstream services unchanged&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What &lt;em&gt;did&lt;/em&gt; take time wasn’t installation, but &lt;strong&gt;tuning&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deciding which rules to enforce strictly&lt;/li&gt;
&lt;li&gt;Allow-listing known services (e.g. search engine verification)&lt;/li&gt;
&lt;li&gt;Avoiding over-blocking during the first few days&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is normal for any WAF.&lt;br&gt;&lt;br&gt;
If someone tells you “zero tuning required”, be skeptical.&lt;/p&gt;




&lt;h2&gt;
  
  
  Limitations and cases where it’s not a good fit
&lt;/h2&gt;

&lt;p&gt;SafeLine is not for everyone.&lt;/p&gt;

&lt;p&gt;I wouldn’t recommend it if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want &lt;strong&gt;zero operational responsibility&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You expect DNS-level features (like native DNS challenges)&lt;/li&gt;
&lt;li&gt;You prefer a fully managed, hands-off security model&lt;/li&gt;
&lt;li&gt;You don’t want to think about false positives at all&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud WAFs still make more sense in many scenarios, especially for very large or very distributed systems.&lt;/p&gt;

&lt;p&gt;Self-hosting trades convenience for control.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who SafeLine makes sense for (and who it doesn’t)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Good fit if you are:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An independent developer running your own infrastructure&lt;/li&gt;
&lt;li&gt;A small team without a dedicated security department&lt;/li&gt;
&lt;li&gt;A DevOps/SRE who wants visibility and control&lt;/li&gt;
&lt;li&gt;Someone who prefers predictable costs over usage-based surprises&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Probably not a good fit if you:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Want everything abstracted away&lt;/li&gt;
&lt;li&gt;Don’t want to manage another component&lt;/li&gt;
&lt;li&gt;Need globally distributed edge protection out of the box&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;SafeLine didn’t magically “solve security”.&lt;/p&gt;

&lt;p&gt;What it did was give me &lt;strong&gt;leverage&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better signal-to-noise ratio&lt;/li&gt;
&lt;li&gt;More control at the HTTP layer&lt;/li&gt;
&lt;li&gt;Fewer surprises when something goes wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For teams comfortable owning their infrastructure, that trade-off can be worth it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Their website: &lt;a href="https://safepoint.cloud/landing/safeline" rel="noopener noreferrer"&gt;https://safepoint.cloud/landing/safeline&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Their awesome SafeLine Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;
Take a look at the demo before you invest your time into it!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>waf</category>
      <category>firewall</category>
      <category>webdev</category>
      <category>websitesecurity</category>
    </item>
    <item>
      <title>Mitigating the React Server Components RCE (CVE-2025-55182)</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Wed, 24 Dec 2025 03:15:42 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/mitigating-the-react-server-components-rce-cve-2025-55182-18gi</link>
      <guid>https://forem.com/carrie_luo1/mitigating-the-react-server-components-rce-cve-2025-55182-18gi</guid>
      <description>&lt;p&gt;React Server Components (RSC) were recently found to be affected by a high-severity remote code execution vulnerability (CVE-2025-55182).&lt;/p&gt;

&lt;p&gt;Attackers may exploit this issue by crafting malicious serialized data in the Flight protocol, abusing features such as Next.js Server Actions, which can trigger a deserialization flaw and potentially lead to remote code execution on the server.&lt;/p&gt;

&lt;p&gt;This post focuses how this vulnerability works, who is affected, and what you can realistically do to reduce risk—both at the application level and at the WAF layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is CVE-2025-55182?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;React Server Components (RSC)&lt;/strong&gt; were found to contain a high-risk &lt;strong&gt;deserialization flaw&lt;/strong&gt; that can lead to &lt;strong&gt;remote code execution&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In affected setups, an attacker can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Craft &lt;strong&gt;malicious serialized payloads&lt;/strong&gt; in the &lt;strong&gt;React Flight protocol&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Abuse &lt;strong&gt;Next.js Server Actions&lt;/strong&gt; (&lt;code&gt;"use server"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Trigger unsafe deserialization logic&lt;/li&gt;
&lt;li&gt;Potentially &lt;strong&gt;execute arbitrary code on the server&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a theoretical issue. The attack surface exists anywhere RSC and Server Actions are exposed to untrusted input.&lt;/p&gt;




&lt;h2&gt;
  
  
  Priority 1: Identify and Patch (Primary Mitigation)
&lt;/h2&gt;

&lt;p&gt;The most important mitigation is &lt;strong&gt;identification and upgrading&lt;/strong&gt;. WAF rules can help, but they do not replace fixing the root cause.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. How to Tell If You’re Affected
&lt;/h3&gt;

&lt;p&gt;You are likely impacted if &lt;strong&gt;all or most&lt;/strong&gt; of the following are true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are using &lt;strong&gt;Next.js&lt;/strong&gt;, especially &lt;strong&gt;v13.4 or later&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Your application uses &lt;strong&gt;React Server Components&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Your codebase includes the &lt;code&gt;"use server"&lt;/code&gt; directive (Server Actions)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Important note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The vulnerable package (&lt;code&gt;react-server-dom-webpack&lt;/code&gt;) is usually &lt;strong&gt;bundled internally by Next.js&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You will &lt;strong&gt;not necessarily see it in &lt;code&gt;package.json&lt;/code&gt;&lt;/strong&gt;, so don’t assume you’re safe just because it’s not listed as a direct dependency.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Upgrade Recommendation
&lt;/h3&gt;

&lt;p&gt;Upgrade &lt;strong&gt;immediately&lt;/strong&gt; to the latest &lt;strong&gt;security-patched&lt;/strong&gt; version of Next.js.&lt;/p&gt;

&lt;p&gt;At the time of writing, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Patched releases in &lt;strong&gt;Next.js 14.x&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Or newer fixed versions in &lt;strong&gt;Next.js 15.x&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The React team has addressed the root issue by fixing the &lt;strong&gt;unsafe parsing of malicious &lt;code&gt;Thenable&lt;/code&gt; objects&lt;/strong&gt;, which was the core of the deserialization vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is the only complete fix.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Anything else should be treated as a temporary risk-reduction measure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Priority 2: WAF-Level Mitigation with SafeLine
&lt;/h2&gt;

&lt;p&gt;If immediate upgrading is not possible (for example, due to release freezes or legacy dependencies), you can add a &lt;strong&gt;defensive layer&lt;/strong&gt; at the WAF level.&lt;/p&gt;

&lt;p&gt;This does &lt;strong&gt;not eliminate the vulnerability&lt;/strong&gt;, but it can help block &lt;strong&gt;known exploit patterns&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: SafeLine Custom Deny Rule
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;SafeLine WAF&lt;/strong&gt;, you can configure a custom &lt;strong&gt;deny rule&lt;/strong&gt; with the following conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request Header
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Content-Type&lt;/code&gt; &lt;strong&gt;matches (regex)&lt;/strong&gt;: &lt;code&gt;multipart&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AND&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request Body
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regex match&lt;/strong&gt;: &lt;code&gt;[’”]?then[’”]?\s*:\s*[’”]?$1:proto:then&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabd35evcf71r6tvdh836.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabd35evcf71r6tvdh836.png" alt=" " width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This rule targets payloads attempting to exploit the RSC deserialization logic by abusing &lt;code&gt;Thenable&lt;/code&gt; structures in serialized data.&lt;/p&gt;

&lt;h3&gt;
  
  
  What This Rule Does (and Does Not Do)
&lt;/h3&gt;

&lt;p&gt;✔️ Helps block known exploit signatures&lt;br&gt;&lt;br&gt;
✔️ Reduces exposure during patching windows&lt;br&gt;&lt;br&gt;
❌ Does &lt;strong&gt;not&lt;/strong&gt; guarantee protection against new or obfuscated payloads&lt;br&gt;&lt;br&gt;
❌ Does &lt;strong&gt;not&lt;/strong&gt; replace upgrading Next.js&lt;/p&gt;

&lt;p&gt;Think of this as a &lt;strong&gt;seatbelt&lt;/strong&gt;, not a cure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you use &lt;strong&gt;Next.js + RSC + Server Actions&lt;/strong&gt;, you should assume exposure until proven otherwise&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upgrading is mandatory&lt;/strong&gt;, not optional&lt;/li&gt;
&lt;li&gt;WAF rules (like those in SafeLine) are best used as &lt;strong&gt;defense-in-depth&lt;/strong&gt;, especially during transition periods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re running production workloads on modern React infrastructure, this is a good reminder that &lt;strong&gt;application-layer vulnerabilities can’t be fully solved at the perimeter&lt;/strong&gt;—but a well-configured WAF can still buy you valuable time.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>rce</category>
      <category>security</category>
    </item>
    <item>
      <title>Ultimate Guide to Handle React/Next.js RCE (CVE-2025-55182)</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Fri, 05 Dec 2025 04:41:19 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/ultimate-guide-to-handle-reactnextjs-rce-cve-2025-55182-1n28</link>
      <guid>https://forem.com/carrie_luo1/ultimate-guide-to-handle-reactnextjs-rce-cve-2025-55182-1n28</guid>
      <description>&lt;h2&gt;
  
  
  A Critical Front-End Vulnerability Hits Hard
&lt;/h2&gt;

&lt;p&gt;On December 4, 2025, developers worldwide woke up to a &lt;strong&gt;CVSS 10.0 full-score RCE vulnerability&lt;/strong&gt; in React 19 / Next.js (CVE-2025-55182, Next.js CVE-2025-66478).&lt;br&gt;&lt;br&gt;
If Log4Shell was a nightmare for Java in 2021, this is the &lt;strong&gt;darkest hour for full-stack JavaScript&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This vulnerability allows attackers to execute &lt;strong&gt;arbitrary code on your server via a single HTTP request&lt;/strong&gt;—no authentication required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa789y6wpicywdenkj8sx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa789y6wpicywdenkj8sx.png" alt=" " width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  01 Understanding the Vulnerability: The Achilles’ Heel of RSC
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Flight Protocol &amp;amp; Serialization
&lt;/h3&gt;

&lt;p&gt;React Server Components (RSC) introduced the &lt;strong&gt;Flight protocol&lt;/strong&gt; to stream component trees between server and client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server → Client:&lt;/strong&gt; Components are streamed in a JSON-like format.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client → Server:&lt;/strong&gt; When Server Actions (e.g., form submissions) are triggered, the client serializes parameters back to the server.
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Unsafe Deserialization
&lt;/h3&gt;

&lt;p&gt;The core of the vulnerability lies in the &lt;strong&gt;react-server&lt;/strong&gt; package and its adapters (e.g., react-server-dom-webpack):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; The server fails to safely validate the structure of deserialized objects.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attack vector:&lt;/strong&gt; Maliciously crafted RSC payloads exploit the server’s deserialization logic.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trigger:&lt;/strong&gt; When the server deserializes the payload, it executes arbitrary functions or instructions.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Impact:&lt;/strong&gt; Malicious JavaScript runs in the server process context, bypassing sandboxes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a classic &lt;strong&gt;unsafe deserialization vulnerability&lt;/strong&gt;, amplified by RSC’s flexibility for complex object passing.&lt;/p&gt;
&lt;h2&gt;
  
  
  02 Who Is at Risk?
&lt;/h2&gt;

&lt;p&gt;Affected frameworks include &lt;strong&gt;all React RSC implementations&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React versions:&lt;/strong&gt; 19.0.0, 19.0.1, 19.1.x, 19.2.0
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js (App Router):&lt;/strong&gt; v15.0.0–v15.5.6, v16.0.0–v16.0.6, v14.3.0-canary.77+
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other frameworks:&lt;/strong&gt; Waku, RedwoodJS (RSC mode), and custom setups using react-server-dom-webpack/parcel.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Not affected:&lt;/strong&gt; legacy Next.js using only Client Components (Pages Router).&lt;/p&gt;
&lt;h2&gt;
  
  
  03 Official Fix: Upgrade Immediately
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Option 1: Upgrade Your Framework (Recommended)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Next.js users:&lt;/strong&gt; Upgrade to the following patch versions or higher:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Next.js v16
npm install next@16.0.7

# Next.js v15
npm install next@15.5.7
# or 15.4.8, 15.3.6, 15.2.6, 15.1.9, 15.0.5

# Next.js v14 Canary
# downgrade to stable v14 or upgrade to fixed v15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;React native / custom integrations:&lt;/strong&gt; Upgrade &lt;code&gt;react&lt;/code&gt;, &lt;code&gt;react-dom&lt;/code&gt;, and &lt;code&gt;react-server-dom-*&lt;/code&gt; to the versions below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react@19.2.1 react-dom@19.2.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Official patched versions: 19.0.1, 19.1.2, 19.2.1&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 2: Mitigation Using WAF
&lt;/h3&gt;

&lt;p&gt;If immediate code deployment isn’t possible (e.g., during a network freeze), use a Web Application Firewall (WAF).&lt;/p&gt;

&lt;h4&gt;
  
  
  Why WAF Matters for React RCE
&lt;/h4&gt;

&lt;p&gt;Even if you patch this RCE, unknown vulnerabilities will always exist. A WAF like SafeLine provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defense against unknown threats: Detects abnormal payloads, serialized data, and suspicious patterns that traditional rules miss.&lt;/li&gt;
&lt;li&gt;Minimal false positives: Uses semantic analysis to distinguish malicious requests from normal traffic.&lt;/li&gt;
&lt;li&gt;Continuous protection: Updated in real-time as new attack techniques emerge.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SafeLine WAF ensures that your full-stack React/Next.js apps stay protected even when you don’t yet know the next attack vector.&lt;/p&gt;

&lt;h2&gt;
  
  
  04 Full-Stack Security Considerations
&lt;/h2&gt;

&lt;p&gt;React’s move across client and server boundaries complicates security. With Server Actions, developers can write backend logic directly in components — but this exposes HTTP-accessible endpoints.&lt;/p&gt;

&lt;p&gt;CVE-2025-55182 is a wake-up call: you can patch today’s RCE, but tomorrow’s unknown vulnerabilities demand proactive protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key takeaway:&lt;/strong&gt; Patch your frameworks and deploy a WAF like SafeLine to defend against both known and unknown threats.&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>cve</category>
      <category>vulnerabilities</category>
    </item>
    <item>
      <title>SafeLine WAF: Unaffected by React Vulnerabilities</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Fri, 05 Dec 2025 04:12:23 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/safeline-waf-unaffected-by-react-vulnerabilities-1j10</link>
      <guid>https://forem.com/carrie_luo1/safeline-waf-unaffected-by-react-vulnerabilities-1j10</guid>
      <description>&lt;p&gt;Just saw the alerts about the critical React 19 / RSC vulnerability flooding the feeds?  &lt;/p&gt;

&lt;p&gt;This CVSS 10.0 high-risk flaw instantly exposed React 19.x and Next.js 14.3+ applications to &lt;strong&gt;single-request RCE&lt;/strong&gt;, forcing many teams to scramble and urgently upgrade their frameworks overnight.&lt;/p&gt;

&lt;p&gt;Meanwhile, the SafeLine WAF site, built with &lt;strong&gt;React 18 + Next.js 14.0.1&lt;/strong&gt;, has remained &lt;strong&gt;completely unaffected&lt;/strong&gt; from the start.&lt;br&gt;&lt;br&gt;
Was it luck? Not entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SafeLine Was “Unaffected”
&lt;/h2&gt;

&lt;p&gt;From a product security perspective, all SafeLine WAF versions are insulated from this vulnerability:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proactive full-stack protection:&lt;/strong&gt; SafeLine’s core defense logic already covers risks in full-stack frameworks.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next-gen semantic analysis:&lt;/strong&gt; Our patented semantic analysis engine goes beyond traditional rule-based methods, deeply understanding request payloads to detect anomalies.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Targeted detection for RSC attacks:&lt;/strong&gt; Malformed Flight protocol requests are detected via multiple dimensions — abnormal &lt;code&gt;Content-Type&lt;/code&gt;, oversized or irregular payloads, and serialized data carrying hidden malicious instructions.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Precision interception with zero false positives:&lt;/strong&gt; SafeLine combines linear security detection algorithms and dynamic traffic baseline learning. Unlike temporary WAF rules that may block legitimate users, SafeLine’s high-performance, Nginx-based architecture achieves &lt;strong&gt;&amp;lt;1ms detection latency&lt;/strong&gt;, accurately distinguishing attack traffic from normal requests. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result: RCE attacks are blocked &lt;strong&gt;without impacting your business operations&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This level of protection makes “unaffected” a &lt;strong&gt;guaranteed outcome&lt;/strong&gt; for SafeLine customers, not mere luck.&lt;/p&gt;

&lt;h2&gt;
  
  
  SafeLine WAF: Full-Stack Security Without Fear
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accurate protection for known and unknown threats:&lt;/strong&gt; &lt;strong&gt;For the recent React vulnerability, SafeLine’s XSS detection rules already block most malicious payloads.&lt;/strong&gt; Leveraging intelligent semantic analysis, SafeLine defends against both known vulnerabilities and unknown threats, leaving &lt;strong&gt;0-day attacks no place to hide&lt;/strong&gt;. Our security team continuously monitors exploit patterns and updates detection rules in real time, ensuring protection evolves alongside emerging threats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjx00xddegew5a3jfs8o6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjx00xddegew5a3jfs8o6.png" alt=" " width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plug-and-play deployment, lightweight operations:&lt;/strong&gt; SafeLine supports one-click installation and containerized management, compatible with various environments. Rules are ready out-of-the-box, so even non-security professionals can manage it easily. With &lt;strong&gt;&amp;lt;1ms detection latency&lt;/strong&gt; and &lt;strong&gt;2000+ TPS on a single core&lt;/strong&gt;, SafeLine provides round-the-clock protection without overloading server resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-dimensional capabilities for full-stack scenarios:&lt;/strong&gt; Includes CC attack mitigation, malicious IP intelligence blocking, enforced HTTPS, CAPTCHA verification, and more — all tailored for modern full-stack applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Don’t Rely on Luck
&lt;/h2&gt;

&lt;p&gt;Vulnerabilities keep coming. Being “unaffected” by chance is &lt;strong&gt;not a sustainable security strategy&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
SafeLine WAF delivers &lt;strong&gt;cutting-edge technology, ease of use, and comprehensive protection&lt;/strong&gt;, making security a standard, not an afterthought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>nextjs</category>
      <category>vulnerabilities</category>
    </item>
    <item>
      <title>How to Configure GitHub Login for Your Website</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Wed, 03 Dec 2025 03:20:35 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/how-to-configure-github-login-for-your-website-2k4</link>
      <guid>https://forem.com/carrie_luo1/how-to-configure-github-login-for-your-website-2k4</guid>
      <description>&lt;p&gt;GitHub login is a popular and trusted authentication method, especially for developer-oriented websites and internal tools. By enabling GitHub authentication, you can allow users to log in using their GitHub accounts without building a complex login system yourself.&lt;/p&gt;

&lt;p&gt;This article explains the basic concept, when GitHub login is useful, and how to configure &lt;strong&gt;GitHub authentication for your website using SafeLine WAF&lt;/strong&gt;, based on the official documentation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use GitHub Login?
&lt;/h2&gt;

&lt;p&gt;GitHub authentication is based on &lt;strong&gt;OAuth 2.0&lt;/strong&gt;, which allows third-party websites to verify user identities securely.&lt;/p&gt;

&lt;p&gt;Common benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ No need to manage usernames and passwords&lt;/li&gt;
&lt;li&gt;✅ Trusted identity provider used by millions of developers&lt;/li&gt;
&lt;li&gt;✅ Faster login experience for users&lt;/li&gt;
&lt;li&gt;✅ Reduced security risk for your backend&lt;/li&gt;
&lt;li&gt;✅ Ideal for developer portals, admin panels, and internal systems&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  When Is GitHub Login a Good Choice?
&lt;/h2&gt;

&lt;p&gt;GitHub login is especially suitable for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developer platforms or SaaS tools&lt;/li&gt;
&lt;li&gt;Internal admin panels&lt;/li&gt;
&lt;li&gt;Staging or testing environments&lt;/li&gt;
&lt;li&gt;API portals&lt;/li&gt;
&lt;li&gt;Open-source–related services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your users already have GitHub accounts, GitHub login greatly simplifies access control.&lt;/p&gt;




&lt;h2&gt;
  
  
  How GitHub Authentication Works (High-Level)
&lt;/h2&gt;

&lt;p&gt;The authentication flow typically looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User accesses a protected page on your website
&lt;/li&gt;
&lt;li&gt;The website redirects the user to GitHub for authentication
&lt;/li&gt;
&lt;li&gt;The user logs in and authorizes access
&lt;/li&gt;
&lt;li&gt;GitHub redirects the user back with an authorization code
&lt;/li&gt;
&lt;li&gt;The system verifies the identity and grants access
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With SafeLine WAF, this entire process is handled &lt;strong&gt;at the gateway level&lt;/strong&gt;, without changing your backend application code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before setting up GitHub login, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A website already protected by SafeLine WAF&lt;/li&gt;
&lt;li&gt;Access to the SafeLine management console&lt;/li&gt;
&lt;li&gt;A GitHub account (to create an OAuth App)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1: Create a GitHub OAuth App
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Log in to GitHub&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings → Developer settings → OAuth Apps&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New OAuth App&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Fill in the required fields:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Application name&lt;/strong&gt;: Any recognizable name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Homepage URL&lt;/strong&gt;: Your website address&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization callback URL&lt;/strong&gt;:
This should be the callback URL provided by SafeLine (from the authentication configuration page)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Save the application&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After creation, GitHub will generate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Client ID&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Client Secret&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep these values secure—you will need them in SafeLine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Configure GitHub Authentication in SafeLine
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7mcrmaqv7dgacsw8o6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7mcrmaqv7dgacsw8o6m.png" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to the SafeLine management console&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Advanced → Authentication&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Create a new authentication configuration&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;GitHub&lt;/strong&gt; as the authentication type&lt;/li&gt;
&lt;li&gt;Fill in the following information:

&lt;ul&gt;
&lt;li&gt;GitHub &lt;strong&gt;Client ID&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;GitHub &lt;strong&gt;Client Secret&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Redirect / callback settings (as required)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Save the configuration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SafeLine will now be able to communicate with GitHub for identity verification.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Protect Your Website or Paths
&lt;/h2&gt;

&lt;p&gt;After creating the GitHub authentication policy:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the target site or domain in SafeLine&lt;/li&gt;
&lt;li&gt;Specify which paths to protect, such as:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/admin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/dashboard&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Entire website&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Bind the GitHub authentication policy to the selected resources&lt;/li&gt;
&lt;li&gt;Apply and save the configuration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once applied, unauthenticated users will be redirected to GitHub login automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Test the Login Flow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open the protected URL in your browser&lt;/li&gt;
&lt;li&gt;You should be redirected to GitHub’s login and authorization page&lt;/li&gt;
&lt;li&gt;After successful login, you will be redirected back to your website&lt;/li&gt;
&lt;li&gt;Access should now be granted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No backend code changes are required.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advantages of Using SafeLine for GitHub Login
&lt;/h2&gt;

&lt;p&gt;Using SafeLine WAF as the authentication layer provides several benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Authentication handled before traffic reaches your server&lt;/li&gt;
&lt;li&gt;✅ No modification to existing application code&lt;/li&gt;
&lt;li&gt;✅ Works with legacy systems&lt;/li&gt;
&lt;li&gt;✅ Unified access control for multiple services&lt;/li&gt;
&lt;li&gt;✅ Reduced backend attack surface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach is especially useful when adding authentication to existing websites or third-party applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;GitHub login is a secure and convenient authentication method, particularly for developer-focused websites. By configuring GitHub authentication through SafeLine WAF, you can quickly add identity protection to your website without touching backend code.&lt;/p&gt;

&lt;p&gt;This makes SafeLine an excellent choice for teams looking to implement modern authentication with minimal complexity and maximum security.&lt;/p&gt;

&lt;p&gt;For detailed configuration options and advanced settings, refer to the official documentation:&lt;br&gt;
&lt;a href="https://docs.waf.chaitin.com/reference/articles/Auth-GitHub" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/reference/articles/Auth-GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>githublogin</category>
      <category>website</category>
      <category>authentication</category>
    </item>
    <item>
      <title>Website Authentication Made Simple with SafeLine</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Wed, 03 Dec 2025 02:52:44 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/website-authentication-made-simple-with-safeline-1d6e</link>
      <guid>https://forem.com/carrie_luo1/website-authentication-made-simple-with-safeline-1d6e</guid>
      <description>&lt;p&gt;Website authentication is a fundamental part of modern web security. It ensures that only authorized users can access protected resources, reducing the risk of data breaches, abuse, and unauthorized operations.&lt;/p&gt;

&lt;p&gt;This article will explain what website authentication is, when it is needed, introduce several free and practical authentication tools, and finally walk through SafeLine WAF’s authentication feature and how to configure it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Website Authentication?
&lt;/h2&gt;

&lt;p&gt;Website authentication is the process of &lt;strong&gt;verifying a user’s identity&lt;/strong&gt; before granting access to a website, application, or specific resources.&lt;/p&gt;

&lt;p&gt;Common authentication methods include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username and password&lt;/li&gt;
&lt;li&gt;Tokens or API keys&lt;/li&gt;
&lt;li&gt;Cookies and sessions&lt;/li&gt;
&lt;li&gt;Single Sign-On (SSO)&lt;/li&gt;
&lt;li&gt;IP-based or request-based verification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Authentication answers the question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Who are you, and should you be allowed to access this resource?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  When Do You Need Website Authentication?
&lt;/h2&gt;

&lt;p&gt;Not every website needs authentication, but it becomes essential in many scenarios:&lt;/p&gt;

&lt;h3&gt;
  
  
  Administrative Interfaces
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Admin panels (&lt;code&gt;/admin&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Internal dashboards&lt;/li&gt;
&lt;li&gt;Management APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Internal or Private Services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Staging environments&lt;/li&gt;
&lt;li&gt;Internal tools&lt;/li&gt;
&lt;li&gt;Test platforms not meant for public access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  APIs and Web Services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prevent unauthorized API usage&lt;/li&gt;
&lt;li&gt;Protect against abuse and scraping&lt;/li&gt;
&lt;li&gt;Control access for partners or customers&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Temporary Protection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Maintenance pages&lt;/li&gt;
&lt;li&gt;Pre-launch websites&lt;/li&gt;
&lt;li&gt;Emergency protection during attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your website exposes &lt;strong&gt;sensitive functionality or data&lt;/strong&gt;, authentication should be considered mandatory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Free and Useful Website Authentication Tools
&lt;/h2&gt;

&lt;p&gt;Here are some popular and free authentication solutions commonly used today:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Basic Authentication
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Built into HTTP standard&lt;/li&gt;
&lt;li&gt;Username and password via browser prompt&lt;/li&gt;
&lt;li&gt;Easy to configure&lt;/li&gt;
&lt;li&gt;Best for internal tools or temporary protection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Simple&lt;br&gt;&lt;br&gt;
❌ Not suitable for public-facing login systems&lt;/p&gt;




&lt;h3&gt;
  
  
  2. OAuth / OpenID Connect
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Used by Google, GitHub, Microsoft, etc.&lt;/li&gt;
&lt;li&gt;Enables Single Sign-On (SSO)&lt;/li&gt;
&lt;li&gt;Supported by many open-source tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Popular providers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google OAuth&lt;/li&gt;
&lt;li&gt;GitHub OAuth&lt;/li&gt;
&lt;li&gt;Auth0 (free tier available)&lt;/li&gt;
&lt;li&gt;Keycloak (open-source)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Secure and scalable&lt;br&gt;&lt;br&gt;
❌ Slightly more complex to deploy&lt;/p&gt;




&lt;h3&gt;
  
  
  3. API Key / Token-Based Authentication
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Common for APIs&lt;/li&gt;
&lt;li&gt;Client sends a token in headers&lt;/li&gt;
&lt;li&gt;Easy to rotate and revoke&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Ideal for machine-to-machine access&lt;br&gt;&lt;br&gt;
❌ Requires careful key management&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Reverse Proxy Authentication
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Authentication handled at the gateway layer&lt;/li&gt;
&lt;li&gt;No need to modify backend applications&lt;/li&gt;
&lt;li&gt;Ideal for legacy systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Very flexible&lt;br&gt;&lt;br&gt;
✅ Application-agnostic  &lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;SafeLine WAF authentication&lt;/strong&gt; shines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjznkxfn4y1c1v2am7q0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjznkxfn4y1c1v2am7q0p.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  SafeLine WAF Authentication: Overview
&lt;/h2&gt;

&lt;p&gt;SafeLine WAF provides a built-in &lt;strong&gt;identity authentication feature&lt;/strong&gt; at the WAF layer, allowing users to protect websites and applications &lt;strong&gt;without changing backend code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;With SafeLine authentication, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add authentication to any website behind SafeLine&lt;/li&gt;
&lt;li&gt;Protect directories, paths, or entire domains&lt;/li&gt;
&lt;li&gt;Block unauthorized users before traffic reaches the server&lt;/li&gt;
&lt;li&gt;Reduce attack surface and backend load&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is especially useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Admin panels&lt;/li&gt;
&lt;li&gt;Internal services&lt;/li&gt;
&lt;li&gt;Temporary access control&lt;/li&gt;
&lt;li&gt;Protecting legacy applications&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How To Configure Authentication in SafeLine
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Basic Configuration
&lt;/h3&gt;

&lt;p&gt;SafeLine provides two authentication modes: Simple Auth and SSO.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple Auth: Application-specific authentication system where users can only access that application after logging in&lt;/li&gt;
&lt;li&gt;SSO (Single Sign-On): allowing users to access multiple related applications after logging in once, without repeated logins. See &lt;a href="https://docs.waf.chaitin.com/reference/articles/Auth-SSO" rel="noopener noreferrer"&gt;SSO&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Login Method&lt;/td&gt;
&lt;td&gt;Multiple login methods available, including AccountPassword, &lt;a href="https://docs.waf.chaitin.com/reference/articles/Auth-OIDC" rel="noopener noreferrer"&gt;OIDC&lt;/a&gt;, &lt;a href="https://docs.waf.chaitin.com/reference/articles/Auth-GitHub" rel="noopener noreferrer"&gt;Github&lt;/a&gt;, &lt;a href="https://docs.waf.chaitin.com/reference/articles/Auth-LDAP" rel="noopener noreferrer"&gt;LDAP&lt;/a&gt;. For SSO mode, configuration must be done in &lt;code&gt;AUTH-SETTINGS-SSO&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth Callback URL&lt;/td&gt;
&lt;td&gt;Required when passing user authentication information to the application server, used to exchange for user information.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application Redirect URL&lt;/td&gt;
&lt;td&gt;Required in SSO mode. When clicking on the application in the unified management panel, it will redirect to this address.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Advanced Configuration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Approval Configuration&lt;/strong&gt;: Options for authorization approval&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need to approve access: First-time users will trigger an approval request after authentication, requiring admin approval before accessing.&lt;/li&gt;
&lt;li&gt;Access directly after authentication: Users can directly access the application after authentication without approval.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable authentication for specific conditions&lt;/strong&gt;: Supports options to authenticate when conditions are met or skip authentication when conditions are met&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Configure Passing User Authentication Information to the Application Server?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;After successful user authentication, SafeLine will redirect to the following URL, where &lt;code&gt;http://example.com/application&lt;/code&gt; is the &lt;code&gt;Auth Callback URL&lt;/code&gt; configured:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://example.com/application?code=123456&amp;amp;redirect_uri=original_user_access_address  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Find the &lt;code&gt;API Token&lt;/code&gt; in the SafeLine console under &lt;code&gt;Settings-Management&lt;/code&gt; page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The application should implement using the &lt;code&gt;code&lt;/code&gt; to request SafeLine's &lt;code&gt;/.safeline/auth/api/user&lt;/code&gt; interface to obtain authenticated user information at the &lt;code&gt;Auth Callback URL&lt;/code&gt;. The &lt;code&gt;code&lt;/code&gt; can only be used once&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Request:&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;GET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;http://safeline-console.com/.safeline/auth/api/user?code=&lt;/span&gt;&lt;span class="mi"&gt;123456&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;X-SLCE-API-TOKEN:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;safeline-api-token&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Response:&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;Content-Type:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;application/json&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;success&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;non-zero:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;failure&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"msg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Error description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"username"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After successfully obtaining user information, the application should cache the login information to determine whether the current user is logged in for subsequent requests, then redirect to the &lt;code&gt;redirect_uri&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If retrieving user information fails, the application needs to delete cookies with the prefix sl_auth_session_, prompting the user to authenticate again&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz6t6a14hagyamp97vol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz6t6a14hagyamp97vol.png" alt=" " width="800" height="665"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use WAF-Level Authentication?
&lt;/h2&gt;

&lt;p&gt;Compared to application-level authentication, WAF-level authentication offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ No code changes&lt;/li&gt;
&lt;li&gt;✅ Faster deployment&lt;/li&gt;
&lt;li&gt;✅ Consistent protection across services&lt;/li&gt;
&lt;li&gt;✅ Reduced backend attack surface&lt;/li&gt;
&lt;li&gt;✅ Ideal for legacy or third-party systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It provides a lightweight but effective layer of access control exactly where it matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Website authentication is a critical security mechanism for protecting sensitive resources and preventing unauthorized access. While many tools and frameworks exist, &lt;strong&gt;WAF-level authentication&lt;/strong&gt; offers a powerful and flexible option—especially when backend changes are impractical.&lt;/p&gt;

&lt;p&gt;SafeLine WAF enables teams to implement authentication quickly, securely, and transparently, making it an excellent choice for internal tools, admin panels, APIs, and temporary access control scenarios.&lt;/p&gt;

&lt;p&gt;By combining authentication with SafeLine’s traffic inspection and protection capabilities, you gain both &lt;strong&gt;identity control and attack defense at the gateway level&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related Resources
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>authentication</category>
      <category>identity</category>
      <category>website</category>
      <category>safeline</category>
    </item>
    <item>
      <title>Beginner's Guide to SafeLine Web Application Firewall</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Wed, 03 Dec 2025 02:17:36 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/beginners-guide-to-safeline-web-application-firewall-2l0p</link>
      <guid>https://forem.com/carrie_luo1/beginners-guide-to-safeline-web-application-firewall-2l0p</guid>
      <description>&lt;p&gt;Web Application Firewalls (WAFs) have become an essential security tool for protecting websites and online applications from malicious attacks. &lt;strong&gt;SafeLine WAF&lt;/strong&gt; is a self-hosted solution that provides robust security while giving users full control over their deployment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use SafeLine WAF?
&lt;/h2&gt;

&lt;p&gt;Web applications are constantly targeted by attackers using methods such as SQL injection, XSS (Cross-Site Scripting), and DDoS attacks. SafeLine WAF helps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prevent attacks&lt;/strong&gt;: Blocks malicious requests before they reach your server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protect sensitive data&lt;/strong&gt;: Ensures user information and backend data remain secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhance reliability&lt;/strong&gt;: Reduces downtime caused by attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain compliance&lt;/strong&gt;: Assists with meeting security standards and regulations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By deploying SafeLine, organizations can protect their websites, APIs, and web applications with minimal manual intervention.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Can Use SafeLine WAF?
&lt;/h2&gt;

&lt;p&gt;SafeLine is suitable for a wide range of users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small and medium-sized businesses (SMBs)&lt;/strong&gt;: Secure websites without relying on cloud-based services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprises&lt;/strong&gt;: Protect high-traffic websites and critical applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developers and DevOps teams&lt;/strong&gt;: Gain full control of security policies and traffic management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security-conscious individuals&lt;/strong&gt;: Self-hosted solution ensures data privacy and independence from third-party cloud providers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Essentially, anyone running a web application or website that needs protection from cyber threats can benefit from SafeLine.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Install SafeLine WAF
&lt;/h2&gt;

&lt;p&gt;SafeLine can be deployed quickly using either &lt;strong&gt;automatic&lt;/strong&gt; or &lt;strong&gt;manual&lt;/strong&gt; methods. Below is a summarized guide based on the official documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Operating system&lt;/strong&gt;: Linux
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture&lt;/strong&gt;: x86_64 or ARM64
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependencies&lt;/strong&gt;: Docker ≥ 20.10.14, Docker Compose ≥ 2.0.0
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimum resources&lt;/strong&gt;: 1 CPU core, 1 GB memory, 5 GB disk
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU instruction set&lt;/strong&gt;: SSSE3
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Automatic Deployment (Recommended)
&lt;/h3&gt;

&lt;p&gt;Use the following command to start the automated installation of SafeLine. (This process requires root privileges)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSLk&lt;/span&gt; https://waf.chaitin.com/release/latest/manager.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--en&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the command is executed, it means the installation is successfully. Please go to Use Web UI directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mannually Deploy
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Install Docker
&lt;/h4&gt;

&lt;p&gt;Install the latest version of Docker.&lt;/p&gt;

&lt;p&gt;If you already have Docker installed, please skip this step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; &lt;span class="s2"&gt;"https://get.docker.com/"&lt;/span&gt; | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Create SafeLine Directory
&lt;/h4&gt;

&lt;p&gt;Create a directory for SafeLine to use, SafeLine will write its configuration and data to this directory. (You need to have at least 5GB of disk space)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"/data/safeline"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Docker Compose Script
&lt;/h4&gt;

&lt;p&gt;Download the latest docker compose script by using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;"/data/safeline"&lt;/span&gt;
wget &lt;span class="s2"&gt;"https://waf.chaitin.com/release/latest/compose.yaml"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Write Environment variables
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;"/data/safeline"&lt;/span&gt;
&lt;span class="nb"&gt;touch&lt;/span&gt; &lt;span class="s2"&gt;".env"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write the following content in the ".env" file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SAFELINE_DIR=/data/safeline
IMAGE_TAG=latest
MGT_PORT=9443
POSTGRES_PASSWORD={postgres-password}
SUBNET_PREFIX=172.22.222
IMAGE_PREFIX=chaitin
ARCH_SUFFIX=
RELEASE=
REGION=-g
MGT_PROXY=0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If deploying to an ARM server, change ARCH_SUFFIX to -arm&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ARCH_SUFFIX=-arm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to install the LTS version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RELEASE=-lts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SAFELINE_DIR&lt;/strong&gt;: 123&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IMAGE_TAG&lt;/strong&gt;: SafeLine version to be used&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MGT_PORT&lt;/strong&gt;: Web console port to be used&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;POSTGRES_PASSWORD&lt;/strong&gt;: Postgres db initialization password &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SUBNET_PREFIX&lt;/strong&gt;: SafeLine internal network communication address prefix&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IMAGE_PREFIX&lt;/strong&gt;: Mirror repository prefix&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARCH_SUFFIX&lt;/strong&gt;: Set to &lt;code&gt;-arm&lt;/code&gt; for ARM servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RELEASE&lt;/strong&gt;: Set to &lt;code&gt;-lts&lt;/code&gt; for use LTS version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MGT_PROXY&lt;/strong&gt;: The number of console proxy layers,It should only be used when configuring the proxy for the console. By default, it is set to 0 and no proxy is configured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Launch SafeLine
&lt;/h4&gt;

&lt;p&gt;Everything is ready to start the SafeLine service.&lt;/p&gt;

&lt;p&gt;This process may take several minutes, so don't worry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Web UI
&lt;/h2&gt;

&lt;p&gt;Open the web console page &lt;code&gt;https://&amp;lt;safeline-ip&amp;gt;:9443/&lt;/code&gt; in the browser, then you will see below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoderlegion.com%2F%3Fqa%3Dblob%26qa_blobid%3D4433631909018617014" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoderlegion.com%2F%3Fqa%3Dblob%26qa_blobid%3D4433631909018617014" width="900" height="689"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Get Administrator Account
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;safeline-mgt resetadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After the command is successfully executed, you will see the following content&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please must remember this content&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[SafeLine] Initial username：admin
[SafeLine] Initial password：**********
[SafeLine] Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Login
&lt;/h3&gt;

&lt;p&gt;Enter the password in the previous step and you will successfully logged into SafeLine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoderlegion.com%2F%3Fqa%3Dblob%26qa_blobid%3D15206894083800839545" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoderlegion.com%2F%3Fqa%3Dblob%26qa_blobid%3D15206894083800839545" width="899" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webapplictaionfirewall</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>antibot</category>
    </item>
    <item>
      <title>SafeLine Detection Engine Performance Configuration</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Tue, 02 Dec 2025 10:27:25 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/safeline-detection-engine-performance-configuration-4h10</link>
      <guid>https://forem.com/carrie_luo1/safeline-detection-engine-performance-configuration-4h10</guid>
      <description>&lt;p&gt;SafeLine offers three distinct performance modes to meet different system requirements and traffic loads. Each mode is designed to provide an optimal balance between resource consumption and request handling capacity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvv7kh348qf7dbot2la2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvv7kh348qf7dbot2la2v.png" alt=" " width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Single-threaded Mode
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default performance setting&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Minimal resource consumption on your device
&lt;/li&gt;
&lt;li&gt;Recommended for environments with limited computing resources
&lt;/li&gt;
&lt;li&gt;Suitable for low-traffic websites and testing environments
&lt;/li&gt;
&lt;li&gt;Prioritizes efficiency over high throughput
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Balanced Mode
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Moderate resource utilization
&lt;/li&gt;
&lt;li&gt;Medium QPS (Queries Per Second) capacity
&lt;/li&gt;
&lt;li&gt;Ideal for standard production environments
&lt;/li&gt;
&lt;li&gt;Provides a good compromise between performance and resource efficiency
&lt;/li&gt;
&lt;li&gt;Recommended for most general use cases
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Maximum Performance Mode
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Highest resource utilization
&lt;/li&gt;
&lt;li&gt;Maximum QPS handling capability
&lt;/li&gt;
&lt;li&gt;Designed for high-traffic websites and critical applications
&lt;/li&gt;
&lt;li&gt;Optimized for environments where performance is the top priority
&lt;/li&gt;
&lt;li&gt;Requires more robust hardware specifications
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;By selecting the appropriate performance mode, users can tailor SafeLine to their specific infrastructure, ensuring optimal protection and efficiency for their websites or applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>threatdetection</category>
      <category>websecurity</category>
      <category>application</category>
    </item>
    <item>
      <title>How to update SSL certificates through file upload in SafeLine WAF</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Tue, 02 Dec 2025 10:02:49 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/how-to-update-ssl-certificates-through-file-upload-in-safeline-waf-36i4</link>
      <guid>https://forem.com/carrie_luo1/how-to-update-ssl-certificates-through-file-upload-in-safeline-waf-36i4</guid>
      <description>&lt;p&gt;Some users find it cumbersome to manually upload certificates through the interface when using Safeline WAF's SSL Cert feature. &lt;/p&gt;

&lt;p&gt;They want to store certificate files in a fixed directory and have Safeline automatically detect and update them after overwriting, allowing the entire process to be completed through automation tools. Related issues include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/chaitin/SafeLine/issues/782" rel="noopener noreferrer"&gt;[Suggestion] Add path import method for certificates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/chaitin/SafeLine/issues/733" rel="noopener noreferrer"&gt;[Bug] After manually updating certificate files and restarting the container, the expiration time in the [Certificate Management] interface is not synchronized&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/chaitin/SafeLine/issues/362" rel="noopener noreferrer"&gt;Suggestions for combining acme.sh for automatic certificate deployment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/chaitin/SafeLine/issues/1205" rel="noopener noreferrer"&gt;[Suggestion] Allow loading wildcard certificate from file system&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To solve or optimize the above issues, Safeline Community Edition launched the automatic certificate reading and updating feature in &lt;code&gt;version 7.2.0&lt;/code&gt;. Below is an introduction to how to use this feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;WAF version &amp;gt;= 7.2.0&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Upload Certificate Once
&lt;/h2&gt;

&lt;p&gt;To let the WAF know that there are certificates that need periodic updates, you need to upload the certificate once in the WAF.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1boud7sgemty8vexo37j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1boud7sgemty8vexo37j.png" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Certificate Path
&lt;/h2&gt;

&lt;p&gt;By default, certificates are saved in &lt;code&gt;/data/safeline/resources/nginx/certs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; /data/safeline/resources/nginx/certs/ &lt;span class="nt"&gt;-lh&lt;/span&gt;
total 8.0K
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 root root 1.4K Nov 22 18:15 cert_1.crt
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 root root 1.7K Nov 22 18:15 cert_1.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Update Certificates Using Files
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can use tools like certbot to apply for free certificates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After obtaining the certificates, simply overwrite the above files&lt;/p&gt;

&lt;h2&gt;
  
  
  WAF Automatic Updates
&lt;/h2&gt;

&lt;p&gt;WAF refreshes certificate content every hour by default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SafeLine Resources:&lt;/strong&gt;&lt;br&gt;
SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ssl</category>
      <category>webdev</category>
      <category>website</category>
    </item>
    <item>
      <title>SafeLine HTTP Request Processing Flow</title>
      <dc:creator>Carrie</dc:creator>
      <pubDate>Tue, 02 Dec 2025 09:16:03 +0000</pubDate>
      <link>https://forem.com/carrie_luo1/safeline-http-request-processing-flow-2he8</link>
      <guid>https://forem.com/carrie_luo1/safeline-http-request-processing-flow-2he8</guid>
      <description>&lt;p&gt;SafeLine processes every incoming HTTP request through a &lt;strong&gt;layered, decision-based pipeline&lt;/strong&gt; designed to block attacks early while ensuring legitimate users reach the application with minimal friction.  &lt;/p&gt;

&lt;p&gt;This flow combines &lt;strong&gt;access control, behavior analysis, bot protection, authentication, and attack detection&lt;/strong&gt; into a clear and auditable request lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22fumawvb7c5lbt55smt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22fumawvb7c5lbt55smt.png" alt=" " width="800" height="1064"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a step-by-step explanation based on the &lt;strong&gt;SafeLine HTTP Request Processing Flow&lt;/strong&gt; diagram.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Request Entry: Users vs. Attackers
&lt;/h2&gt;

&lt;p&gt;All incoming traffic—whether from &lt;strong&gt;legitimate users&lt;/strong&gt; or &lt;strong&gt;attackers&lt;/strong&gt;—enters the same processing pipeline.&lt;br&gt;&lt;br&gt;
SafeLine does not make assumptions upfront; instead, it evaluates each request through multiple security stages.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Work Mode (Global Switch)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Work Mode&lt;/strong&gt; defines whether SafeLine is actively protecting the application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Offline&lt;/strong&gt; → Requests are blocked or bypassed depending on configuration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defense&lt;/strong&gt; → Full protection pipeline is enabled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If SafeLine is offline, the request is rejected immediately.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Allow &amp;amp; Deny Rules
&lt;/h2&gt;

&lt;p&gt;At this stage, SafeLine applies &lt;strong&gt;explicit access control rules&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allowlists (trusted IPs, regions, paths)&lt;/li&gt;
&lt;li&gt;Denylists (known malicious IPs, forbidden paths)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Possible outcomes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Allowed&lt;/strong&gt; → Continue processing
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Denied&lt;/strong&gt; → Request is blocked&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures known-safe traffic passes quickly, while known threats are stopped early.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Rate Limiting
&lt;/h2&gt;

&lt;p&gt;SafeLine evaluates request frequency and behavior patterns.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If rate limiting is &lt;strong&gt;enabled&lt;/strong&gt; and the threshold is exceeded:

&lt;ul&gt;
&lt;li&gt;❌ &lt;strong&gt;Banned IP&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;If rate limiting is disabled or not triggered:

&lt;ul&gt;
&lt;li&gt;✅ Continue&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This step is critical for mitigating &lt;strong&gt;DDoS, brute-force, and scraping attacks&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Anti-Bot Protection
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Anti-Bot&lt;/strong&gt; module distinguishes real users from automated clients.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browser fingerprinting&lt;/li&gt;
&lt;li&gt;Behavior analysis&lt;/li&gt;
&lt;li&gt;Challenge-response validation (if enabled)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outcomes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Verified&lt;/strong&gt; → Allowed to proceed&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Failed&lt;/strong&gt; → Blocked as a bot&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Authentication (Optional)
&lt;/h2&gt;

&lt;p&gt;If authentication is configured, SafeLine validates the request identity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Token-based auth&lt;/li&gt;
&lt;li&gt;Client verification&lt;/li&gt;
&lt;li&gt;Custom authentication logic&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outcomes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Authenticated&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Failed&lt;/strong&gt; → Request rejected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This step is optional and depends on deployment requirements.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Attack Detector
&lt;/h2&gt;

&lt;p&gt;This is the &lt;strong&gt;core WAF inspection phase&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;SafeLine analyzes requests for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL Injection (SQLi)&lt;/li&gt;
&lt;li&gt;XSS&lt;/li&gt;
&lt;li&gt;Command Injection&lt;/li&gt;
&lt;li&gt;Path Traversal&lt;/li&gt;
&lt;li&gt;Protocol violations&lt;/li&gt;
&lt;li&gt;Known exploit signatures&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outcomes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Legitimate&lt;/strong&gt; → Continue&lt;/li&gt;
&lt;li&gt;❌ &lt;strong&gt;Attack detected&lt;/strong&gt; → Blocked and logged&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. Waiting Room (Traffic Control)
&lt;/h2&gt;

&lt;p&gt;When traffic surges occur, SafeLine can route users through a &lt;strong&gt;Waiting Room&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helps protect backend services during peak loads&lt;/li&gt;
&lt;li&gt;Ensures fair access for legitimate users&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outcomes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;⏳ &lt;strong&gt;Wait&lt;/strong&gt; → User queued&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Admitted&lt;/strong&gt; → Continue&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. Request Reaches the Application
&lt;/h2&gt;

&lt;p&gt;Once a request successfully passes all enabled stages:&lt;/p&gt;

&lt;p&gt;✅ It is forwarded to the &lt;strong&gt;protected application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Malicious traffic is filtered out&lt;/li&gt;
&lt;li&gt;Legitimate users experience stable and secure access&lt;/li&gt;
&lt;li&gt;All decisions are auditable&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  10. Audit and Visibility
&lt;/h2&gt;

&lt;p&gt;Throughout the entire process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every decision is &lt;strong&gt;logged&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Actions can be set to &lt;strong&gt;Audit-only&lt;/strong&gt; or &lt;strong&gt;Block&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Operators gain full visibility into request behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes SafeLine suitable for both &lt;strong&gt;strict security enforcement&lt;/strong&gt; and &lt;strong&gt;gradual policy tuning&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;SafeLine’s HTTP request processing approach is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Layered&lt;/strong&gt; – Multiple security gates instead of a single check
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Flexible&lt;/strong&gt; – Each module can be enabled, disabled, or audited
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Transparent&lt;/strong&gt; – Every decision is traceable
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Production-ready&lt;/strong&gt; – Balances protection and usability
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining early filtering, behavior analysis, and deep inspection, SafeLine ensures that &lt;strong&gt;only trusted traffic reaches your applications&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;SafeLine Resource:&lt;/strong&gt;&lt;br&gt;
SafeLine Website: &lt;a href="https://ly.safepoint.cloud/ShZAy9x" rel="noopener noreferrer"&gt;https://ly.safepoint.cloud/ShZAy9x&lt;/a&gt;&lt;br&gt;
Live Demo: &lt;a href="https://demo.waf.chaitin.com:9443/statistics" rel="noopener noreferrer"&gt;https://demo.waf.chaitin.com:9443/statistics&lt;/a&gt;&lt;br&gt;
Discord: &lt;a href="https://discord.gg/dy3JT7dkmY" rel="noopener noreferrer"&gt;https://discord.gg/dy3JT7dkmY&lt;/a&gt;&lt;br&gt;
Doc: &lt;a href="https://docs.waf.chaitin.com/en/home" rel="noopener noreferrer"&gt;https://docs.waf.chaitin.com/en/home&lt;/a&gt;&lt;br&gt;
Github: &lt;a href="https://github.com/chaitin/SafeLine" rel="noopener noreferrer"&gt;https://github.com/chaitin/SafeLine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>http</category>
      <category>safeline</category>
      <category>websecurity</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
