Bash checker v1.1 for smartnode on Ubuntu (If you already have a SmartNode Configured)


#1

SmartNode

Bash Checker v1.1 for smartnode on Ubuntu 16.04 LTS x64

(!) No need to run this if you already used the official bash installer

ATTENTION: This installer is only suitable for a dedicated vps. The anti-ddos script in this installer will disable all ports including the http, https and dns ports.

This does not change the SSH port default

This is from the great work of https://forum.smartcash.cc/u/msg768

This script Assumes you already have a Smartnode installed. If you need to install a new Smartnode you may want to use the installer script provided by @msg786 https://github.com/SmartCash/smartnode or you can follow my guide at SmartCash SmartNode Setup Guide v2.1 (MAC Version) Quick Setup

You must run this script as smartadmin or ID you used to run smartcashd some people installed as root and that’s ok. At the end of the script you will be asked for a sudo password to run the anti-ddos script and reboot command

This shell script comes with 4 cronjobs:

  1. Make sure the daemon is always running: makerun.sh
  2. Make sure the daemon is never stuck: checkdaemon.sh
  3. Make sure smartcash is always up-to-date: upgrade.sh
  4. Clear the log file every other day: clearlog.sh

And an anti-ddos script

  1. Disable all ports including the http, https and dns ports: anti-ddos.sh

Login to your vps as smartadmin or ID you used to run smartcashd, donwload the installck.sh file and then run it:

wget https://rawgit.com/controllinghand/smartnode-checkonly/master/installck.sh
bash ./installck.sh

At the end of the install your server will reboot so that the anti-ddos and cron jobs will take effect

Donation to my Smartcash please: SebFkuHrqDnj3obXvMtfxtQKRgFeVpXF5x


#2

Hi @controllinghand,

will this do the same thing as the Stability part in the smartnodes.cc website? I couldn’t find the security part on Vultr.com, I am not sure how to whitelist the port in there but I saw on discord it’s not crucial? could you please let me know as I installed using the pdf guide? Thanks.


#3

I’m not sure how you setup your smartnode. If you used the @msg768 install.sh then no need to do this. However, I did write a guide to enable the firewall and turn off root’s ability to ssh. Found here:


#4

well that’s the thing… I used the guide pfd version 1(didn’t work), then version 1.1 (briefly), then version 1.2 haha… so that’s what I’m doing to all of them, is this correct?

mkdir ~/smartnode
cd ~/smartnode/
wget https://raw.githubusercontent.com/SmartCash/smartnode/master/makerun.sh
wget https://raw.githubusercontent.com/SmartCash/smartnode/master/checkdaemon.sh
wget https://raw.githubusercontent.com/SmartCash/smartnode/master/clearlog.sh
chmod 0700 ./clearlog.sh
chmod 0700 ./makerun.sh
chmod 0700 ./checkdaemon.sh
(crontab -l ; echo “/1 * * * * ~/smartnode/makerun.sh") | crontab -
(crontab -l ; echo "
/30 * * * * ~/smartnode/checkdaemon.sh”) | crontab -
(crontab -l ; echo “0 0 */2 * * ~/smartnode/clearlog.sh”) | crontab -
/etc/init.d/cron reload
smartcash-cli stop
pico ~/.smartcash/smartcash.conf
maxconnections=64
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
pico /etc/fstab
/swapfile none swap sw 0 0
reboot
smartcashd


#5

can you jump on discord? https://discord.gg/BDUh8jr

I can help you there. but have to leave in about 30 mins

~S


#6

Damn, sorry man, I was having lunch, just saw this now :frowning:


#7

On firewall, add firewall group on vultr.com.

you can set rules for your firewall,

example: you can set a rule to accept only the port 9678,deny any others even the sshs.


#8

Thanks, is that really necessary as I read on discord anyone can bypass that?


#9

If you use the bash of this post,it does basically the same thing.

Its not necessary,but its recommended to hardened your SmartNode,will become faster and secure.


Smartnode - NEW_START_REQUIRED and other issues