Dev {Tricks}

  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting
You are here: Home / Archives for Server and Hosting / Security

February 14, 2022 by dev

Migrate Accounts from CWP to CWP

To perform the migration you must follow a few simple steps:

  1. Generate an API Key on your Source CWP server.
    • CWP Settings >> API Manager
      (You can click on the CWP to CWP button and you will have the necessary options selected.)
  2. For the correct operation of this tool you must open port 2304 in the firewall of Source/Destination server.
    • Security >> CSF Firewall
  3. Open SSH port of the destination server if other than 22 in the firewall.
  4. Whitelist destination IP address.

 

Source server (Old Server)

To create a connection to your remote/source CWP server first you must generate an API Key on your Source CWP server, To create an API key/token, use API Manager (CWP Settings >> API Manager). You can click on the CWP to CWP button and you will have the necessary options selected.

Log in to the CWP panel.

  • First check your SSH port

    • Go to Services config > SSH Configuration
    • Or login to terminal and check
vi /etc/ssh/sshd_config
    • Port 2251
    • By default the port is 22, if you did not change it.
    • Then check and open TCP port. Note that you must have to add the port 2304 additionally for migration to done successfully.
  • Go to Dashboard, then click on Firewall
    • You will find “Opened TCP \ UDP ports” on the right sidebar
    • If it is not listed to TCP IN and TCP OUT
    • Go to Firewall Configuration > Main Configuration on top menu of this page
    • This will open Contents of File: /etc/csf/csf.conf
    • Go to #Allow incoming TCP ports and add your port. In my case Port 2251 and extra port for migration 2304
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2030,2031,2082,2083,2086,2087,2095,2096,2304,2251"

# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,2030,2031,2082,2083,2086,2087,2095,2096,587,993,995,2080,2443,2304,2251"
    • Save Changes
    • Go back to dashboard and go to Firewall again to check the port in TCP IN and OUT.
    • If everything ok, restart Firewall from the top of the menu.
  • Go back and add your Destination IP to whitelist.

    • Firewall Whitelist configuration > Add an entry add the Destination IP (New IP) and restart the firewall.
    • Note that if you whitelist IP you need not open port in all cases except Amazon S3, Google Cloud, Microsoft Azure or etc.
  • Now lets setup API connection

    • Go to CWP settings and select the option API Manager.
    • On the right top, you will find the button ‘Allow new API access’.
    • Click on it and you will get a popup window with a bunch of options.
      • Short Name: API Name. bdhostit
      • Ip Origin: Destination server IP that you want to authorize this API.
      • Key code: Click on “Generate” and save it somewhere.
        GaKPCAv3qCGpfTd2fr5IQIaxmxCIZjQJKLGgOsGHHltJa4vmpft180kfIzKfbhpB34B9HA
      • Owner: root
      • Format Request: JSON
        Select the JSON format and enable the function for the cwp to cwp move.
      • You can select CWP to CWP option to enable all functions for CWP to CWP migration.
    • Enable Functions for
      • CWP to CWP
      • WHMCS
      • CLUSTER CWP
      • OR
        You can set permission to the API to do the transfer manually.
    • The necessary functions are
      • Account (add, list)
      • Packages (add, list)
      • MySQL Databases (add, list)
      • MySQL Users (add, list)
      • Change of the password (upd)
      • Cronjobs Users (add, upd ).
      • You can add others as well based on your needs.
  • Now you have to create SSK Key

    • Server Settings > SSH Key Generator and then click on Generate new key
    • Test SSH
ssh root@185.215.164.96 -p 6316
ssh root@38.242.204.74 -p 63160 "whoami"

Destination Server (New server)

Log in to the CWP panel

Click on Firewall and Go to Whitelist configuration > Add an entry add the Source IP (Old IP) and restart the firewall.

Now go to User Accounts > CWP to CWP Migration

 

Filed Under: AWS, Bluehost, CentOS Web Panel, Cloudcone, Contabo, Digitalocean, HostGator, Providers, Security, Server and Hosting, SSH, VPS Management, VPSDime, Web Control Panel

January 9, 2022 by dev

How to change the root password

  • Resetting the Root Password
  • How to Change a Password in Linux
  • How to Reset or Change the Root Password in Linux
  • How to change root password in Ubuntu Linux
  • How to Reset the root Password

1. Login to your server using existing root password.

2. After login you can change the root password with below command.

passwd root

That’s aLL!

Filed Under: AWS, Bluehost, CentOS Web Panel, Contabo, cPanel, Digitalocean, DirectAdmin, Find & fix, HostGator, Plesk, Providers, Security, Server and Hosting, SSH, Virtualmin, VPS Management, VPSDime, Web Control Panel, Webmin, WHM Tagged With: linux, linux root password change, reset password, reset root, reset root password, root, root password, ubuntu

January 2, 2022 by dev

How to enable and disable dangerous php functions | CWP

How to disable dangerous php functions

PHP switcher :

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /usr/local/php/php.d/disabled_function.ini

PHP-CGI selector :

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php53/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php54/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php55/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php56/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php70/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php71/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php72/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php73/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php74/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php80/usr/php/php.d/disabled_function.ini

PHP_FPM Selector :
** Don’t forget to restart php-fpm after changes

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm53/usr/php/php.d/disabled_function.ini && service php-fpm53 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm54/usr/php/php.d/disabled_function.ini && service php-fpm54 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm55/usr/php/php.d/disabled_function.ini && service php-fpm55 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm56/usr/php/php.d/disabled_function.ini && service php-fpm56 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm70/usr/php/php.d/disabled_function.ini && service php-fpm70 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm71/usr/php/php.d/disabled_function.ini && service php-fpm71 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm72/usr/php/php.d/disabled_function.ini && service php-fpm72 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm73/usr/php/php.d/disabled_function.ini && service php-fpm73 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm74/usr/php/php.d/disabled_function.ini && service php-fpm74 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm80/usr/php/php.d/disabled_function.ini && service php-fpm80 restart

How to enable back the dangerous php functions

To enable it back, simply delete disabled_function.ini file for the PHP version you want and restart apache/php-fpm.

Filed Under: CentOS Web Panel, cPanel, DirectAdmin, Error and Fix, Find & fix, How to, Plesk, Security, Server and Hosting, Virtualmin, VPS Management, Web Control Panel, Webmin, WHM Tagged With: dangerous php, dangerous php functions, disable dangerous php functions

November 2, 2021 by dev

How to reboot vps automatically?

To reboot VPS 5 minutes after midnight everyday:

Login via SSH and run the following:

echo shutdown -r now > /root/shutdown.sh;chmod +x /root/shutdown.sh

Then run crontab -e and enter this line:

5 0 * * * /root/shutdown.sh

Then save and exit.

Filed Under: AWS, Bluehost, CentOS Web Panel, Contabo, cPanel, Digitalocean, DirectAdmin, Find & fix, HostGator, MySQL, Plesk, Providers, Security, Server and Hosting, SSH, Virtualmin, VPS Management, VPSDime, Web Control Panel, Webmin, WHM Tagged With: reboot vps, reboot vps automatically, restart vps

June 20, 2021 by dev

Changing the partition layout of your VPS and VDS after installation | Linux

  • How to easily change your partition layout on your VPS or VDS.

Backup of all important data before proceeding! Changes to the partition table always bear the risk of complete data loss.

  • Boot your VPS / VDS into the rescue-system
  • Now connect through VNC (How to use VNC to connect to your VPS and VDS)
  • Login as “root”
  • To perform changes on the partition easily use gparted
  • To start the GUI type “startxfce4” within VNC console and wait a few seconds until the graphical interface appears
  • On the upper left side you will see “Applications”, open it and select “Run Program”
  • Type “gparted” within the application finder and the app should start immediately
  • Now you can resize and create new partition with unallocated space.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Filed Under: aaPanel, Almalinux, AWS, Bluehost, CentOS, CentOS Web Panel, Cloudcone, Contabo, cPanel, CyberPanel, Debian, Digitalocean, DirectAdmin, HostGator, Hostinger, ISPConfig, KeyHelp, Plesk, Providers, RackNerd, Server and Hosting, SSH, Ubuntu, Virtualmin, VPS Management, VPSDime, Web Control Panel, Webmin, WHM Tagged With: gparted, resize partition, startxfce4, VNC, VNC console

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page »
  • Upwork
  • Freelancer
  • Fiverr
  • Guru

www.ojsexpert.com
www.ojsdev247.com

Recent Posts

  • To get your email for castamodel.com going to the right place, you need to update your DNS settings.
  • Security and WordPress
  • ROR
  • How do we copy google form to google workspace?
  • Install ImageMagick – Almalinux
  • How to remove /public/ from URL in Laravel
  • How to install Maldet alert?
  • How to Install Maldet and Run a Scan | Maldetect
  • Where is Roundcube location on CWP control panel?
  • How To Add Node.js Projects In aaPanel?
  • SPF/DKIM/DMARC Tools
  • Associative arrays – How to loop over Associative arrays
  • Indexed Arrays. How to loop over Indexed Arrays.
  • PHP Break | Continue
  • For Loop | While Loop | Do…While Loop | Foreach Loop
  • Strict mode in PHP
  • PHP Function Return Types
  • PHP Anonymous Functions (or Closures)
  • PHP Variadic Functions
  • PHP nullable type hints

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)

Important DEV links

  • Premium Themes
    • Themeforest
    • Envato Market
  • Built With (What Theme is That?)
    • What WP theme is that
    • Joomla Template Detector
    • Drupal Template Detector
    • Prestashop Template Detector
    • Shopify Theme Detector
    • Squarespace Template Detector
    • OpenCart Detector
    • WordPress.com Theme Detector
  • Domain/IP history checker
    • Who IS request
    • Hosting Info
  • Check DNS Propagation
    • DNS Checker
    • intoDNS
  • What is my IP
    • What is My IP Address
    • What is My IP
    • IP location
    • What is My IP
    • Porkbun
  • SEO Tools
    • Visitor Traffic
    • Broken Link
    • Website Speed Test
      • SEMrush
      • GTmetrix
      • Pingdom
      • PageSpeed Insights
      • DebugBear
      • keyCDN
  • Photo Image
    • Remove Background 50 Free Preview Image 375 × 666 per month
  • Domain Registrars
    • 123-Reg
    • Porkbun
    • Freenom
    • Namecheap NEWCOM598
  • Hosting Providers
    • Bluehost
    • Hostgator
    • Inmotion
  • Hosting Control Panel
    • CWPpro (FREE)
    • DirectAdmin (Trial 60 Days, One account $2/month)
    • ISPConfig (Free)
  • Webmaster Tools
    • Google
    • Bing
    • Yandex
  • Miscellaneous
    • Time Calculator

 

Categories

  • Affiliate Marketing (1)
  • Customization (4)
    • CSS (2)
  • Email Solutions (23)
    • FrontApp (2)
    • Google Spreadsheet (2)
    • Microsoft Outlook (1)
    • PHP Email Form (3)
    • PolyMail (2)
    • Recaptcha (1)
    • Roundcube (4)
    • Thunderbird (3)
    • WebMail (5)
  • Games (1)
  • How to (87)
  • Joomla (6)
    • Akeeba (1)
    • Fix & Tricks (3)
  • jQuery (4)
  • jQuery Plugins (4)
    • BX Slider (1)
    • Slick (1)
  • Laravel (5)
  • Marketplace (5)
  • Miscellaneous (31)
  • MultiSaaS (1)
  • OJS (56)
    • Crossref (1)
    • Help (37)
    • Installation (10)
      • Issues (5)
    • Plugins (8)
    • Scholar Indexing (2)
    • Theme (7)
      • Templates (7)
        • Frontend (6)
        • legacy (1)
    • Theme Customization (10)
    • Theme Development (14)
    • TPL CSS JS (2)
    • Upgrade (11)
  • OSTAD (17)
  • Oxwall (3)
  • Payment Methods (1)
    • Paypal (1)
  • PC Tips and Tricks (14)
    • MS Office (2)
      • PowerPoint (1)
    • Windows (4)
  • PHP Parse error (2)
  • phpBB (2)
  • Server and Hosting (213)
    • Billing and Management (10)
      • Blesta (5)
      • Boxbilling (2)
      • WHMCS (5)
    • Email (10)
      • Postfix (3)
    • Error and Fix (17)
    • FTP (2)
    • Linux Distribusion (28)
      • Almalinux (13)
      • CentOS (17)
      • Debian (21)
      • Ubuntu (19)
    • Mail Server Solusion (7)
      • iRedMain (6)
    • MySQL (12)
    • Providers (69)
      • AWS (37)
      • Bluehost (37)
      • Cloudcone (26)
      • Contabo (40)
      • Digitalocean (68)
      • Hetzner (3)
      • HostGator (36)
      • Hostinger (8)
      • RackNerd (10)
      • VPSDime (38)
    • Security (21)
      • SSH (8)
    • VPS Management (72)
    • Web Control Panel (147)
      • aaPanel (14)
      • CentOS Web Panel (46)
      • cPanel (33)
      • CyberPanel (7)
      • DirectAdmin (96)
        • Find & fix (38)
      • ISPConfig (17)
      • KeyHelp (7)
      • Plesk (26)
      • Webmin (25)
        • Usermin (2)
        • Virtualmin (13)
      • WHM (18)
  • Uncategorized (19)
  • Wordpress (89)
    • Elementor (2)
    • Find and Fix (11)
    • Functions (5)
    • Genesis (9)
    • Glossary (1)
    • How to (22)
    • Neuron TD (15)
      • Console Error (1)
      • functions (5)
        • register_post_type (1)
        • register_sidebar (1)
        • theme_files (1)
        • theme_supports (1)
      • Image Directory (1)
      • Menu (2)
      • Query (4)
    • Plugins (13)
      • Contact Form 7 (5)
      • Duplicator (1)
      • Essential Grid (2)
    • Softaculous (3)
    • Speed and Security (4)
    • Stock Theme Development (6)
      • Header Footer (1)
      • PHP (1)
      • VC (1)
    • Theme Development (2)
      • Issues (1)
      • Menu (1)
    • Timer Theme Development (3)
    • Update (2)
    • Woocommerce (2)
    • WP Basic Guideline (8)
  • Home
  • WordPress
  • OJS
  • Oxwall
  • Server and Hosting

Copyright © 2025 · Executive Pro Theme on Genesis Framework · WordPress · Log in