Knowledgebase

SSL & Security Print

  • SSL Certificate, Let’s Encrypt, cyberpanel, ssh, fail2ban
  • 45

31. How to Issue a Free SSL Certificate with Let’s Encrypt

  1. Log in to CyberPanel.

  2. Navigate to Websites > List Websites.

  3. Find your domain and click Manage.

  4. Scroll down and click Issue SSL.

  5. CyberPanel will issue a free Let’s Encrypt certificate.

  6. Confirm HTTPS works by visiting your domain using https://.

32. Fixing SSL Errors Like HSTS or “NET::ERR_CERT_AUTHORITY_INVALID”

  • Common Causes:

    • No SSL issued or expired certificate.

    • Browser cache or forced HSTS policy.

Fixes:

  1. Reissue SSL in CyberPanel.

  2. Clear browser cache or use a different browser.

  3. Ensure domain is pointing correctly to your server.

33. Forcing HTTPS Redirection in CyberPanel

  1. Go to Websites > List Websites.

  2. Click Manage next to your domain.

  3. Scroll to Rewrite Rules and click Edit.

  4. Add this rule at the top:

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  5. Save and test your site.

34. How to Secure Your CyberPanel Login

  • Change the default CyberPanel port (8090):

    1. Edit /usr/local/CyberCP/CyberCP/settings.py.

    2. Change the port number and restart CyberPanel.

  • Enable firewall rules to restrict access.

  • Use strong admin passwords.

  • Regularly update CyberPanel.

35. Installing and Configuring Fail2Ban in CyberPanel

  1. Install Fail2Ban:

    sudo apt install fail2ban
  2. Configure jail settings:

    • Edit /etc/fail2ban/jail.local.

    • Example for SSH:

      [sshd]
      enabled = true
      port = ssh
      filter = sshd
      logpath = /var/log/auth.log
      maxretry = 5
  3. Restart Fail2Ban:

    sudo systemctl restart fail2ban
  4. Use fail2ban-client status to monitor.

36. How to Scan Your Website for Malware

  • Install malware scanning tools like Maldet or ClamAV:

    sudo apt install clamav
    sudo freshclam
    sudo clamscan -r /home/
  • Use CyberPanel’s ImunifyAV (if available on your version).

  • Regularly scan files in /home/domain.com/public_html.

37. How to Disable Directory Listing in CyberPanel

  1. Go to Websites > List Websites.

  2. Click Manage next to your domain.

  3. Scroll to Rewrite Rules and click Edit.

  4. Add the following line:

    Options -Indexes
  5. Save changes and refresh your site. Directory contents will now be hidden.


Was this answer helpful?
Back