How to Fortify and Safely Test Your Website Against Hackers

how-to-fortify-and-safely-test-your-website-against-hackers

Configuring SafeLine for Website Protection

Introduction

Before diving into the configuration, ensure that SafeLine is properly installed on your server. If you haven’t installed it yet, please refer to the Install SafeLine Documentation for detailed instructions.

Protecting Your Website

How SafeLine Works

SafeLine is a web application firewall (WAF) built on Nginx, designed to safeguard your website against various network attacks. It operates as an HTTP/HTTPS reverse proxy, receiving incoming traffic meant for your website, filtering out malicious requests, and forwarding only clean, reliable traffic to your server.

Image description

Setting Up a Website Proxy in SafeLine

1.Access SafeLine Web Admin Console:

Log in to the SafeLine Web Admin Console. Navigate to the “Web Services” -> “Web Services” page and click on the “ADD WEB SERVICES” button located in the upper right corner.

Image description

2.Enter Website Information:

In the dialog box that appears, fill in the details of your original website:

Image description

  • Domain: Enter the domain, hostname, or IP address of your website (e.g., www.chaitin.com).
  • Port: Specify the port that SafeLine will listen to, such as 80 or 443. (For HTTPS websites, make sure to check the SSL option.)
  • Upstream: Enter the real address of your original website, which SafeLine will use to forward traffic.

3.Domain Resolution:

After completing the above settings, update your DNS records to point the domain to the IP address of the server where SafeLine is installed.

Now, you can access your website protected by SafeLine using the domain.

Image description

Testing SafeLine’s Protection

With your website now under SafeLine’s protection, it’s time to test its defenses against common web attacks. Replace chaitin.com with your website’s domain name in the following test cases and try to access them:

  • SQL Injection:
    https://chaitin.com/?id=1+and+1=2+union+select+1

  • XSS (Cross-Site Scripting):
    https://chaitin.com/?id=

  • Path Traversal:
    https://chaitin.com/?id=../../../../etc/passwd

  • Code Injection:
    https://chaitin.com/?id=phpinfo();system('id')

  • XXE (XML External Entity):
    https://chaitin.com/?id=

If SafeLine is working correctly, you should see a blocking page like this when accessing these URLs.

Image description

Monitoring and Reviewing Attacks

To view details of the attacks that SafeLine has blocked:

1.Check the Web Console:
Go to the SafeLine Web Admin Console to see the list of detected and blocked attacks.
Image description

2.View Attack Details:
Click on “detail” next to any attack to see specific information about the attempted intrusion.
Image description

Website:https://waf.chaitin.com
Come and try it out now!

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
#43 - find-the-difference-between-two strings

#43 - Find the Difference Between Two Strings

Next Post
#44-—-group-rows-and-combine-non-null-values-in-each-of-the-non-grouping-columns

#44 — Group Rows And Combine Non-Null Values in Each of The Non-Grouping Columns

Related Posts

AI治理最重要的能力:缺乏证据支持时懂得暂停

1)观点先行(P0) 一句话观点: 在 AI 协作里,最有价值的治理能力不是“更快修完”,而是“证据不够时敢停下,并把缺什么证据说清楚”。 2)治理背景(P1) 复杂系统里的真实问题,不是没人干活,而是大家都在干活,却很难判断到底有没有真的完成。 AI 参与后,这个问题会更明显: AI 很容易给出“看起来已经完成”的答案。 多个智能体并行提交回执,信息会很快变成噪音。 模块测试通过,常常被误读成系统已经恢复。 本地治理体系之所以更快,不是因为流程更短,而是因为它把“没完成”这件事制度化了: 可以停在中间状态。 可以明确写出阻断原因。 可以等证据补齐后再推进状态。 3)信号提取(P0)…
Read More