Sha256: 058c1beca4a38e8263fa450351319c03423d403bb057974921b8e3395a5afcce

Contents?: true

Size: 1.95 KB

Versions: 129

Compression:

Stored size: 1.95 KB

Contents

# The main Smartcloud Machine driver
module Smartcloud
	class Machine
		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

129 entries across 129 versions & 1 rubygems

Version Path
smartcloud-0.0.159 lib/smartcloud/machine.rb
smartcloud-0.0.158 lib/smartcloud/machine.rb
smartcloud-0.0.157 lib/smartcloud/machine.rb
smartcloud-0.0.156 lib/smartcloud/machine.rb
smartcloud-0.0.155 lib/smartcloud/machine.rb
smartcloud-0.0.154 lib/smartcloud/machine.rb
smartcloud-0.0.153 lib/smartcloud/machine.rb
smartcloud-0.0.152 lib/smartcloud/machine.rb
smartcloud-0.0.151 lib/smartcloud/machine.rb
smartcloud-0.0.150 lib/smartcloud/machine.rb
smartcloud-0.0.149 lib/smartcloud/machine.rb
smartcloud-0.0.148 lib/smartcloud/machine.rb
smartcloud-0.0.147 lib/smartcloud/machine.rb
smartcloud-0.0.146 lib/smartcloud/machine.rb
smartcloud-0.0.145 lib/smartcloud/machine.rb
smartcloud-0.0.144 lib/smartcloud/machine.rb
smartcloud-0.0.143 lib/smartcloud/machine.rb
smartcloud-0.0.142 lib/smartcloud/machine.rb
smartcloud-0.0.141 lib/smartcloud/machine.rb
smartcloud-0.0.140 lib/smartcloud/machine.rb