Category: Masternode Tutorials

Chaincoin Masternode V. Auto Update!

This is a auto update for anyone who followed my original Linode Chaincoin Masternode guide, simply copy & paste the below code in SSH anywhere:
chaincoind stop;cd /usr/local/bin;rm chaincoind -rf; rm chaincoin-cli -rf;wget; wget;chmod 700 chaincoin*;cd ~;yum install -y libevent libevent-devel;chaincoind --daemon;sleep 300s;chaincoind masternode start;chaincoind getinfo;

Once that’s done you should see:

“version” : 90300

How to Backup Chaincoin Masternode Wallet!

For those of you who want to backup your Chaincoin masternode wallet, here’s a simple way to do it.

First, log into your Chaincoin Masternode server using SSH, then type:

yum -y install mailx postfix;cd ~/.chaincoin;wget;service postfix start

Next type:
cd ~/.chaincoin;sh "wallet backup"

Note: PLEASE replace with your email address and “wallet backup” is the subject you can also change to your liking.

Check your e-mail inbox after and you should have a backup in your e-mail inbox.

Chaincoin Masternode Restart Script/POS Error Auto Fix!

For those of you having trouble with your Chaincoin Masternode not receiving Chaincoins or maybe seeing POS Error, here’s a simple script I wrote that will auto restart if Chaincoind goes down, server restarts, or has POS errors.

This script is ONLY for those who followed my original guide!  (You may be able to tweak it a bit for other VPS/platforms – UPDATE, works fine on Ubuntu with Vultr or Linode)

Copy and past the following into your SSH:

yum -y install cronie;wget -O ~/;chmod 755 ~/;wget -O /etc/cron.d/cronchc;

That’s IT!

For Ubuntu, do:

wget -O ~/;chmod 755 ~/;wget -O /etc/cron.d/cronchc;

How to Secure Your Masternode!

First, choose any other port than 22, this will prevent hacking bots, which continually attack port 22 but you can choose any port you want, any number between 0 to 65535.  So, choose a number between 0 and 65535, for this example, I am going to use port 99.

First, type the following and add port  tcp to your firewall:


Next, edit the ssh config file by typing:

vi /etc/ssh/sshd_config

Change the following line:

# Port 22
Port 99

Next type:

service sshd restart

to restart SSH.  Next time you login, make sure to CHANGE PORT from 22 to the port you changed it to!

Next, MAKE SURE YOU HAVE A SECURE PASSWORD, if you do not, you can easily change your password by typing:

Try using a site like

Next, let’s put a brute force script to ban anyone trying to brute force attack your password, it will ban any IPs for 10 hours if they enter the wrong password 3 times in a row:

yum -y install epel-release;yum -y install fail2ban;systemctl enable fail2ban;cd /etc/fail2ban/;wget;systemctl restart fail2ban

After that type:
fail2ban-client status

The current values will ban any brute force attacks but if you want to change the parameters, you can change it here:
You can use Nano or Vi to edit the file.

Now, this tutorial has been made for noobs and beginners. If you are an expert, I do recommend using SSH keys which are more secure but with strong password and brute force script, you should be fine.

More info on Fail2ban here.

Above is for CentOS6, for CentOS7, see:

yum -y install epel-release;yum -y install fail2ban;chkconfig fail2ban on;cd /etc/fail2ban/;wget;service fail2ban start