Resource icon

Exclusive XUIONE - Script WAF to protect your MAIN SERVER 2025-01-19

Script WAF to protect your MAIN SERVER - XUIONE

This is a simple script designed to create a protective barrier against direct access to your main server (Main Server).


How Does It Work?

With the WAF activated, direct access to your server's IP is blocked. Only connections from Cloudflare's authorized IPs will be allowed, ensuring your server is protected against attacks such as scans and other IP-based probing attempts.

  • Your Main Server's IP: 123.456.789.132
  • With the WAF activated, any attempt to directly access this IP will be blocked.
  • The server will only be accessible through the Cloudflare proxy.
This protection is particularly useful for preventing scams or attacks based on IP exposure.

  • The domain for your Main Server and your load balancer servers (if applicable) must be configured to route through the Cloudflare proxy (orange cloud icon enabled in the Cloudflare dashboard).
In addition to blocking direct access to the server, the WAF offers extra functionalities, such as:

  • Blocking port 3306 (database): Allows access only to specific IPs.
  • Advanced protection against scans and exploits: Provides enhanced security for services running on the server.
With the WAF properly configured, your server will be significantly more secure, protected from unauthorized access and vulnerabilities related to exposed IPs.

TUTORIAL
  • Upload the Script:
    Upload the waf.sh file to your server.

  • Grant Execution Permissions:
    On your server, run the following command to grant permissions to the script:
    Code:
    chmod +x waf.sh
  • Start the WAF:
    To start protecting your server, run the following command:
    Code:
    ./waf.sh
To configure access via Cloudflare, select option 3 during the script execution.
  • Option 3: This option will configure your server’s firewall to allow connections only from Cloudflare IPs, blocking direct access and ensuring the security of your server.
Done! Your server is now protected, and the traffic will be limited to Cloudflare IPs, ensuring enhanced security against unauthorized access.
Author
admin
Downloads
0
Views
16
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from admin

Similar resources Most view View more
Help Users

You haven't joined any rooms.

      You haven't joined any rooms.