Sha256: 045bc21dfbfd3df317db5633a221954f6b83c20d4eb2b6b0405225cb1961c1ea

Contents?: true

Size: 1.97 KB

Versions: 39

Compression:

Stored size: 1.97 KB

Contents

# The main Smartcloud Machine driver
module Smartcloud
	class Machine < Smartcloud::Base
		def initialize
		end

		def getting_started
			# puts 'You may be prompted to make a menu selection when the Grub package is updated on Ubuntu. If prompted, select keep the local version currently installed.'

			# apt-get update && apt-get upgrade

			# hostnamectl set-hostname example_hostname

			# /etc/hosts
			# 127.0.0.1 localhost.localdomain localhost
			# 203.0.113.10 hostname.example.com hostname
			# 2600:3c01::a123:b456:c789:d012 hostname.example.com hostname
			# Add DNS records for IPv4 and IPv6 for ip addresses and their fully qualified domain names FQDN

			# dpkg-reconfigure tzdata
			# date
		end

		def securing_your_server
			# sudo apt install unattended-upgrades

			# sudo nano /etc/apt/apt.conf.d/20auto-upgrades
			# APT::Periodic::Update-Package-Lists "1";
			# APT::Periodic::Download-Upgradeable-Packages "1";
			# APT::Periodic::AutocleanInterval "7";
			# APT::Periodic::Unattended-Upgrade "1";

			# sudo apt install apticron
			# /etc/apticron/apticron.conf
			# EMAIL="root@example.com"

			# adduser example_user
			# adduser example_user sudo

			# mkdir -p ~/.ssh && sudo chmod -R 700 ~/.ssh/
			# scp ~/.ssh/id_rsa.pub example_user@203.0.113.10:~/.ssh/authorized_keys
			# sudo chmod -R 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys

			# sudo nano /etc/ssh/sshd_config
			# PermitRootLogin no
			# PasswordAuthentication no
			# echo 'AddressFamily inet' | sudo tee -a /etc/ssh/sshd_config
			# sudo systemctl restart sshd

			# sudo apt-get update && sudo apt-get upgrade -y
			# sudo apt-get install fail2ban
			# sudo apt-get install sendmail
			# sudo ufw allow ssh
			# sudo ufw enable
			# sudo cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
			# sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
			# Change destmail, sendername, sender
			# Change action = %(action_mwl)s
			# sudo fail2ban-client reload
			# sudo fail2ban-client status
		end
	end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
smartcloud-0.0.198 lib/smartcloud/machine.rb
smartcloud-0.0.197 lib/smartcloud/machine.rb
smartcloud-0.0.196 lib/smartcloud/machine.rb
smartcloud-0.0.195 lib/smartcloud/machine.rb
smartcloud-0.0.194 lib/smartcloud/machine.rb
smartcloud-0.0.193 lib/smartcloud/machine.rb
smartcloud-0.0.192 lib/smartcloud/machine.rb
smartcloud-0.0.191 lib/smartcloud/machine.rb
smartcloud-0.0.190 lib/smartcloud/machine.rb
smartcloud-0.0.189 lib/smartcloud/machine.rb
smartcloud-0.0.188 lib/smartcloud/machine.rb
smartcloud-0.0.187 lib/smartcloud/machine.rb
smartcloud-0.0.186 lib/smartcloud/machine.rb
smartcloud-0.0.185 lib/smartcloud/machine.rb
smartcloud-0.0.184 lib/smartcloud/machine.rb
smartcloud-0.0.183 lib/smartcloud/machine.rb
smartcloud-0.0.182 lib/smartcloud/machine.rb
smartcloud-0.0.181 lib/smartcloud/machine.rb
smartcloud-0.0.180 lib/smartcloud/machine.rb
smartcloud-0.0.179 lib/smartcloud/machine.rb