Category: Masternode Tutorials

Chaincoin Masternode V.0.9.3.0 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 http://highoncoins.com/chaincoin/centos7/chaincoin-cli; wget http://highoncoins.com/chaincoin/centos7/chaincoind;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 http://highoncoins.com/backup.sh;service postfix start

Next type:
cd ~/.chaincoin;sh backup.sh myemail@mydomain.com "wallet backup"

Note: PLEASE replace myemail@mydomain.com 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)

Copy and past the following into your SSH:

yum -y install cronie;cd ~;wget http://highoncoins.com/check.sh;chmod 755 check.sh;wget http://highoncoins.com/cronchc;mv cronchc /etc/cron.d/.

That’s IT!

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:

system-config-firewall-tui

Next, edit the ssh config file by typing:

vi /etc/ssh/sshd_config

Change the following line:

# Port 22
to:
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:
passwd

Try using a site like passwordsgenerator.net.

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 http://highoncoins.com/jail.local;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:
/etc/fail2ban/jail.local
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 http://highoncoins.com/jail.local;service fail2ban start