Wednesday, October 23, 2024

How to upgrade mariadb on cyberpanel from 10.3 to 10.6 on ubuntu 20.04

In this guide, we shall indicate two methods of upgrading a database

Method 1: Automated upgrade script. The script will handle everything for you including backups.

Using the convenience script.

wget -qO- https://raw.githubusercontent.com/dannydev77/database_upgrade_utility_script/main/database_upgrade.sh | bash

Method 2: Manual – This section provide step by step actions.

Before you begin the upgrade ensure to take a backup of your data in case something goes wrong.

Steps:
[Read more…]

Saturday, September 21, 2024

Disable 2FA In CyberPanel

For those who have been locked out Cyberpanel due to two factor aunthentication, I have tried all methods on this forum but none worked for me when i lost my Google aunthenticator app. I hope my method works for you. Don’t get locked out of your server. Cheers!

1. Firstly, try connecting through SSH and entering the MySQL command line with these commands.

MYSQL_PWD=`cat /etc/cyberpanel/mysqlPassword` mysql -uroot

2. In order to enter the CyberPanel database, use the command:

use cyberpanel;

3. Now disable 2FA for the admin account with the following command:

UPDATE `loginSystem_administrator` SET `twoFA` = '0' WHERE `loginSystem_administrator`.`id` = 1;

[Read more…]

Monday, September 2, 2024

ກຳນົດ actionban ແລະ actionunban ໃຫ້ກັບ Fail2ban ຕໍ່ກັບ Cloudflare API

Modify the Fail2ban Action:

[Definition]
actionban = curl -s -X POST "https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/firewall/access_rules/rules" 
-H "X-Auth-Email: [email protected]" 
-H "X-Auth-Key: your-global-api-key" 
-H "Content-Type: application/json" 
--data '{"mode":"block","configuration":{"target":"ip","value":"<ip>"},"notes":"Fail2ban block"}'

Fail2ban actionunban

[Definition]
actionunban = bash -c '
RULE_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/firewall/access_rules/rules" 
-H "X-Auth-Email: [email protected]" 
-H "X-Auth-Key: your-global-api-key" 
-H "Content-Type: application/json" | jq -r ".result[] | select(.configuration.value == "<ip>") | .id") && 
curl -s -X DELETE "https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/firewall/access_rules/rules/$RULE_ID" 
-H "X-Auth-Email: [email protected]" 
-H "X-Auth-Key: your-global-api-key" 
-H "Content-Type: application/json"'

[Read more…]

Sunday, August 18, 2024

IPBan - Free software to block out attackers quickly and easily on Linux and Windows

Requirements
IPBan free version requires .NET 8 SDK to build and debug code. For an IDE, I suggest Visual Studio Community for Windows, or VS code for Linux. All are free. You can build a self contained executable to eliminate the need for dotnet core on the server machine, or just download the precompiled binaries in releases.
Running and/or debugging code requires that you run your IDE or terminal as administrator or root.
Officially supported platforms:
Windows 10 or newer (x86, x64)
Windows Server 2016 or newer (x86, x64)
Linux Ubuntu x64 (requires firewalld)
Linux Debian x64 (requires firewalld)
Linux CentOS x64 (requires firewalld)
Linux RedHat x64 (requires firewalld)
Mac OS X not supported at this time

Features
Auto ban ip addresses by detecting failed logins from event viewer and/or log files. On Linux, SSH is watched by default. On Windows, RDP, OpenSSH, VNC, MySQL, SQL Server, Exchange, SmarterMail, MailEnable are watched. More applications can easily be added via config file.
Additional recipes for event viewer and log files are here: https://github.com/DigitalRuby/IPBan/tree/master/Recipes
Highly configurable, many options to determine failed login count threshold, time to ban, etc.
Make sure to check out the ipban.config file (formerly named DigitalRuby.IPBan.dll.config, see IPBanCore project) for configuration options, each option is documented with comments.
Banning happens basically instantly for event viewer. For log files, you can set how often it polls for changes.
Very fast - I’ve optimized and tuned this code since 2012. The bottleneck is pretty much always the firewall implementation, not this code.
Unban ip addresses easily by placing an unban.txt file into the service folder with each ip address on a line to unban.
Works with ipv4 and ipv6 on all platforms.
Please visit the wiki at https://github.com/DigitalRuby/IPBan/wiki for lots more documentation.
[Read more…]

Friday, September 16, 2022

ຕິດຕັ້ງ ເມວເຊີເວີ ດ້ວຍໃຊ້ iredmail ໃນ Ubuntu 20.04

ມີຂັນຕອນດັ່ງນີ້:
1.

apt-get update -y

2.

hostnamectl set-hostname mail.websitefortesting.com

3.

vim /etc/hosts
45.56.112.153 mail.websitefortesting.com mail

4.

wget https://github.com/iredmail/iRedMail/archive/1.4.0.tar.gz

5.

tar -xvzf 1.4.0.tar.gz

6.

cd iRedMail-1.4.0
chmod +x iRedMail.sh
./iRedMail.sh

7.

yes, next, ngixn next, [mariadb] next, [put domain next, [passwd] next, select the component and click Next

8.

y, y

9.

reboot now

[Read more…]

Wednesday, July 14, 2021

How to install Adminer on Ubuntu 18.04

Adminer is available for install from Ubuntu Repositories using “sudo apt-get install adminer” but to get the latest features we will install the latest version manually.

This Tutorial should work on Ubuntu 16.04 and 18.04

This tutorial is For Adminer and MYSQL but Adminer also works with the following databases:

MySQL
PostgreSQL
SQLite
MS SQL
Oracle
SimpleDB
Elasticsearch
MongoDB

Step 1

sudo mkdir /usr/share/adminer

Step 2

sudo wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php

[Read more…]

Wednesday, February 17, 2021

How to Install Let’s Encrypt on Ubuntu 20.04 with Apache

Let’s start with the installation – it is a simple installation and will not take long.

Prerequisites
For the purposes of this tutorial, we will use an Ubuntu 20.04 VPS.
User with sudo privileges or full SSH root access is required. All of our VPSes come with root access.
A valid domain name pointed to your server’s IP address. In this tutorial, we will use domain.com as an example.

1. Install Certbot
As mentioned earlier, we will be using Certbot so that we can get a free SSL certificate from Let’s Encrypt. To install this useful tool, we need to enable the universe repository:

sudo apt install software-properties-common
sudo add-repository universe
sudo apt update

Run this command on the command line on the machine to install Certbot.

sudo apt install certbot python3-certbot-apache

2. Generate a Free Let’s Encrypt SSL Certificate
There are many ways to obtain an SSL certificate with Certbot. We will use the Apache plugin, which will take care of reconfiguring Apache’s Virtual Host and will reload the new configuration for us. You can run the following command to use the plugin:

sudo certbot --apache

Using this script, you need to answer a series of questions and provide an email address. In the first step, you need to type a valid email address. The email address is required for notifications and security notices regarding your website’s certificate:

Output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

[Read more…]

Subscribe

  • RSS Atom

ອອນລາຍ: 2 | ມື້ນີ້: 10 | ວານນີ້: 25 | ທິດນີ້: 90 | ເດືອນນີ້: 869 | ປີນີ້: 11829 | ລວມ: 78932