How to create port listener on Linux

Install nc if needed

yum install nc

Run listener on port 3000

nc -l 3000 &
nc -l -k 3000 &

where -k is –keep-open will keep connection opened and allows multiple connections in listen mode

Check on the server’s side:

netstat -tunap |grep :3000

Output:

tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN      82786/nc            

Check from local machine:

$ nmap -p 3000 SERVERS_IP_ADDRESS

Output:

Starting Nmap 7.01 ( https://nmap.org
Read the rest

How to downgrade to Firefox 56.0

Backup your current settings if needed

cp -rp .mozilla/ .mozilla_bk

Purge current firefox

sudo apt-get purge firefox -y

Download 56 version

wget https://ftp.mozilla.org/pub/firefox/releases/56.0/linux-x86_64/en-US/firefox-56.0.tar.bz2

sudo su

tar -xvf firefox-56.0.tar.bz2

cp -rp firefox /opt/

cd /usr/bin

ln -s /opt/firefox/firefox firefox

Finally, you have to avoid upgrading to the newer version.… Read the rest

How to change a website’s IP address via command line

Just run

/usr/local/cpanel/bin/setsiteip -u $user $ip

or using whmapi1

whmapi1 setsiteip ip=11.12.13.14 user=$user

to add IP onto the server

whmapi1 addips ips=11.12.13.14 netmask=255.255.255.248

to remove IP

whmapi1 delip ip=11.12.13.14

to check IP usage

whmapi1 get_shared_ip user=$user

to check server’s IP addresses

whmapi1 listips
Read the rest