SlideShare a Scribd company logo
1 of 21
Why should you secure
your server ?
• Customer Safety and
Satisfaction
• Required to Carry on Business
• Long Term Economic Benefits
• Improves Your Hosting Brand
Sections in this Session
• Securing your Server(s) SSH Access
• MySQL Security Best Practices
• Preventing Email Abuse
Why Secure your SSH ?
• SSH allows you to remotely execute
command
• As an Admin you access it from a Remote
Location, so can a hacker
• A hacker may gain root access to your
server if not secured
• IF a hacker gains root access, you can kiss
your server good bye !
Change your SSH Port
• Default SSH port is 22, even the hacker
knows that
• Hacker can Scan Port 22 on various IP
Addresses and use brute force or other
attacks to gain access
• Hence change your port to something
other than 22 (and 2222 which is common
as well)
• In /etc/ssh/sshd_config change :
Port 3077
Disable Root Login
• The Hacker would likely try a brute-force
for the root user
• Disabling the Root User Login will add an
additional layer of security to your server
• If you need root access, login as a normal
user and use the su command.
• In /etc/ssh/sshd_config change :
PermitRootLogin no
AllowUsers mysshuser
Use Keys for Authentication
• Disable password logins. To do so :
$ ssh-keygen -t rsa
• This will create two files in your (hidden)
~/.ssh directory called: id_rsa and id_rsa.pub
• The first: id_rsa is your private key and the
id_rsa.pub is your public key.
• If you are a Windows User. You can convert the
id_rsa file into a .ppk with the help of
Puttygen for use with Putty.
• Never re-use SSH Keys on multiple servers
Use Keys for Authentication (Cont.)
• You will need to set file permissions on the server:
PasswordAuthentication no
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys
• Disable password authentication
completely in /etc/ssh/sshd_config
• Copy the public key (id_rsa.pub) to the
server and install it to the authorized_keys
$ cat id_rsa.pub >> ~/.ssh/authorized_keys
SSH IP Address Restriction
• IP Address Restriction means allowing only
certain IPs to SSH into a Server. This
requires static IP Address(es)
• The two important files are:
/etc/hosts.allow
/etc/hosts.deny
sshd: 1.2.3.0
• In /etc/hosts.allow add allowed IP
Address
sshd: ALL
• In /etc/hosts.deny, restrict all IPs
Fail2Ban
• Fail2ban scans log files (e.g. /var/log/secure)
and bans IPs (using the Firewall) that show
the malicious signs -- too many password
failures, seeking for exploits, etc.
• Out of the box Fail2Ban comes with filters for
various services like apache, ssh, courier
• You can configure Fail2Ban to send emails to
Sysadmins as well.
# EPEL is required
$ yum install fail2ban
Logwatch
• Logwatch is a customizable, pluggable log-
monitoring system.
• It will go through your logs for a given
period of time and make a report in the
areas that you wish, with the detail that
you wish
• Installation is simple :
$ yum install logwatch
• Usage is simple as well :
$ logwatch --detail Low --service sshd --
range today --save /tmp/logwatch
Separate Billing Server
• Small and Medium sized web-hosting
companies and resellers tend to keep their
billing systems hosted on the same servers
which host their shared hosting customers
• BAD IDEA !
• Your website + billing software should
*always* be stored on a separate server /
VPS
• It is extremely dangerous to have untrusted
customers on the same server.
MySQL / MariaDB Abuse
• Database Abuse is pretty common and
easily achievable in shared
environments
• If MySQL / MariaDB is abused your
system will become slower and all your
customers websites will be affected.
• There are external threats possible if
you don’t secure your MySQL /
MariaDB server
Restrict Remote Access
• By Default MySQL will start with
Networking and will listen on Port 3306
• To restrict MySQL from opening a
network socket, the following
parameter should be added in
the[mysqld] section of my.cnf or my.ini:
skip-networking
• Some Control Panels like cPanel restrict
it to the localhost IP 127.0.0.1
bind-address=127.0.0.1
Disable the use of LOCAL INFILE
• Disable the use of the "LOAD DATA LOCAL
INFILE" command
• If not secured important data could be
revealed :
SELECT load_file("/etc/passwd")
• To disable the usage of the "LOCAL
INFILE" command, the following parameter
should be added in the [mysqld] section of
the MySQL configuration file.
set-variable=local-infile=0
Some Control Panels like cPanel restrict this already
Setting Account Resource Limits
In MySQL 5+, you can limit use of the
following server resources for individual
accounts:
• The number of queries that an account
can issue per hour
• The number of updates that an account
can issue per hour
• The number of times an account can
connect to the server per hour
• The number of simultaneous
connections to the server by an account
GRANT ALL ON customer.* TO ‘DB'@'localhost'
WITH MAX_QUERIES_PER_HOUR 3600
MAX_UPDATES_PER_HOUR 360
MAX_CONNECTIONS_PER_HOUR 3600
MAX_USER_CONNECTIONS 5;
Other MySQL / MariaDB Tips
• Change root username and password
(don’t do it on cPanel, Plesk, etc.)
• Remove the "test" database
• Remove Anonymous and obsolete
accounts
• Remove History
cat /dev/null > ~/.mysql_history
Prevent Email Abuse
• Shared Hosting users can send a lot of
SPAM from your servers if you don’t
prevent them
• It can cause Black Listing of your server
IPs
• In cPanel, there are some good settings to
prevent users to send excessive emails
like hourly emails, percentage of failed
messages
• You can find it in WHM -> Tweak Settings
Ebury and Poodle
• On infected hosts, Ebury steals SSH login
credentials (username/password) from
incoming and outgoing SSH connections.
• Check your servers for an Ebury infection :
https://www.cert-bund.de/ebury-faq
• POODLE : The Google Security Team
discovered this vulnerability; they
disclosed it in September 2014.
• You should disable SSLv3 because of
Poodle.
Last Tips
• Backup your servers and data
regularly. It is the only solution you
have if your servers get hacked.
• Keep your systems up-to-date (goes
without saying). Its easy “yum
update”
• Be well informed about recent
vulnerabilities by subscribing to
security mailing lists e.g.
hostingseclist.com
Thank You
• Thank you for being here.
Credits :
• Patrick William from Rack911
• Samjad from ActiveLobby
• drServer.net
• cPanel for their development license
• Anyone and Everyone who I missed to mention
:)

More Related Content

What's hot

Securing the Apache web server
Securing the Apache web serverSecuring the Apache web server
Securing the Apache web server
webhostingguy
 
Apache Web server Complete Guide
Apache Web server Complete GuideApache Web server Complete Guide
Apache Web server Complete Guide
webhostingguy
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
webhostingguy
 
Apache web server
Apache web serverApache web server
Apache web server
zrstoppe
 

What's hot (20)

How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
SERENE 2014 School: Measurement-Driven Resilience Design of Cloud-Based Cyber...
SERENE 2014 School: Measurement-Driven Resilience Design of Cloud-Based Cyber...SERENE 2014 School: Measurement-Driven Resilience Design of Cloud-Based Cyber...
SERENE 2014 School: Measurement-Driven Resilience Design of Cloud-Based Cyber...
 
Training Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSLTraining Slides: 302 - Securing Your Cluster With SSL
Training Slides: 302 - Securing Your Cluster With SSL
 
Securing the Apache web server
Securing the Apache web serverSecuring the Apache web server
Securing the Apache web server
 
Apache Web server Complete Guide
Apache Web server Complete GuideApache Web server Complete Guide
Apache Web server Complete Guide
 
Apache Web Server Setup 1
Apache Web Server Setup 1Apache Web Server Setup 1
Apache Web Server Setup 1
 
Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8Configuration of Self Signed SSL Certificate For CentOS 8
Configuration of Self Signed SSL Certificate For CentOS 8
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apache
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
Apache Ppt
Apache PptApache Ppt
Apache Ppt
 
Apache Web Server Setup 3
Apache Web Server Setup 3Apache Web Server Setup 3
Apache Web Server Setup 3
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Apache web server
Apache web serverApache web server
Apache web server
 
Slides Cassandra
Slides CassandraSlides Cassandra
Slides Cassandra
 
OpenVPN
OpenVPNOpenVPN
OpenVPN
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linux
 
Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
 
Introduction to MariaDb
Introduction to MariaDbIntroduction to MariaDb
Introduction to MariaDb
 

Viewers also liked

Get Noticed in a Crowded Digital World
Get Noticed in a Crowded Digital World Get Noticed in a Crowded Digital World
Get Noticed in a Crowded Digital World
ResellerClub
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
jay
 

Viewers also liked (20)

Strengthening Internet Access Across India
Strengthening Internet Access Across IndiaStrengthening Internet Access Across India
Strengthening Internet Access Across India
 
Infrastructure without Limits with the Cloud
  Infrastructure without Limits with the Cloud  Infrastructure without Limits with the Cloud
Infrastructure without Limits with the Cloud
 
Meeting the Digital India Challenge
Meeting the Digital India ChallengeMeeting the Digital India Challenge
Meeting the Digital India Challenge
 
Cloud With Open Source
Cloud With Open SourceCloud With Open Source
Cloud With Open Source
 
India. Are We There Yet?
India. Are We There Yet?India. Are We There Yet?
India. Are We There Yet?
 
Get Noticed in a Crowded Digital World
Get Noticed in a Crowded Digital World Get Noticed in a Crowded Digital World
Get Noticed in a Crowded Digital World
 
Pockets of Potential – Building online presence for MSME
Pockets of Potential – Building online presence for MSMEPockets of Potential – Building online presence for MSME
Pockets of Potential – Building online presence for MSME
 
The Changing Asian Domain Landscape – Are new TLDs making a dent in the ind...
  The Changing Asian Domain Landscape – Are new TLDs making a dent in the ind...  The Changing Asian Domain Landscape – Are new TLDs making a dent in the ind...
The Changing Asian Domain Landscape – Are new TLDs making a dent in the ind...
 
Thinking Globally. Acting Globally.
Thinking Globally. Acting Globally.Thinking Globally. Acting Globally.
Thinking Globally. Acting Globally.
 
Content Marketing Strategies to Boost Your Search Engine Rankings
Content Marketing Strategies to Boost Your Search Engine RankingsContent Marketing Strategies to Boost Your Search Engine Rankings
Content Marketing Strategies to Boost Your Search Engine Rankings
 
Domain Disruption
Domain DisruptionDomain Disruption
Domain Disruption
 
The Benefits of going Mobile
The Benefits of going MobileThe Benefits of going Mobile
The Benefits of going Mobile
 
Management in a Cloud Centric World – The NEW Business Paradigm
  Management in a Cloud Centric World – The NEW Business Paradigm  Management in a Cloud Centric World – The NEW Business Paradigm
Management in a Cloud Centric World – The NEW Business Paradigm
 
Digital DNA. Digital Is Here. India Online Marketing Trends 2015
Digital DNA. Digital Is Here. India Online Marketing Trends 2015 Digital DNA. Digital Is Here. India Online Marketing Trends 2015
Digital DNA. Digital Is Here. India Online Marketing Trends 2015
 
Pms
PmsPms
Pms
 
Fail2 ban
Fail2 banFail2 ban
Fail2 ban
 
Database security
Database securityDatabase security
Database security
 
Server hardening
Server hardeningServer hardening
Server hardening
 
Database Systems Security
Database Systems SecurityDatabase Systems Security
Database Systems Security
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 

Similar to Simple tips to improve Server Security

Presentation nix
Presentation nixPresentation nix
Presentation nix
fangjiafu
 
Presentation nix
Presentation nixPresentation nix
Presentation nix
fangjiafu
 
How to secure ubuntu 12.04
How to secure ubuntu 12.04 How to secure ubuntu 12.04
How to secure ubuntu 12.04
John Richard
 
Developers Focus on Security-Minded Tooling - Quintis Venter
Developers Focus on Security-Minded Tooling - Quintis Venter �Developers Focus on Security-Minded Tooling - Quintis Venter �
Developers Focus on Security-Minded Tooling - Quintis Venter
Thoughtworks
 

Similar to Simple tips to improve Server Security (20)

MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016MariaDB Server & MySQL Security Essentials 2016
MariaDB Server & MySQL Security Essentials 2016
 
Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7Better encryption & security with MariaDB 10.1 & MySQL 5.7
Better encryption & security with MariaDB 10.1 & MySQL 5.7
 
Owning computers without shell access dark
Owning computers without shell access darkOwning computers without shell access dark
Owning computers without shell access dark
 
Presentation nix
Presentation nixPresentation nix
Presentation nix
 
Presentation nix
Presentation nixPresentation nix
Presentation nix
 
60 Admin Tips
60 Admin Tips60 Admin Tips
60 Admin Tips
 
Protecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password AttacksProtecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password Attacks
 
be the captain of your connections deployment
be the captain of your connections deploymentbe the captain of your connections deployment
be the captain of your connections deployment
 
So you want to be a security expert
So you want to be a security expertSo you want to be a security expert
So you want to be a security expert
 
How to secure ubuntu 12.04
How to secure ubuntu 12.04 How to secure ubuntu 12.04
How to secure ubuntu 12.04
 
Cassandra and security
Cassandra and securityCassandra and security
Cassandra and security
 
Instaclustr: Securing Cassandra
Instaclustr: Securing CassandraInstaclustr: Securing Cassandra
Instaclustr: Securing Cassandra
 
Securing Cassandra
Securing CassandraSecuring Cassandra
Securing Cassandra
 
Going outside the application
Going outside the applicationGoing outside the application
Going outside the application
 
Securing Cassandra The Right Way
Securing Cassandra The Right WaySecuring Cassandra The Right Way
Securing Cassandra The Right Way
 
Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015Meet MariaDB Server 10.1 London MySQL meetup December 2015
Meet MariaDB Server 10.1 London MySQL meetup December 2015
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
 
Developers Focus on Security-Minded Tooling - Quintis Venter
Developers Focus on Security-Minded Tooling - Quintis Venter �Developers Focus on Security-Minded Tooling - Quintis Venter �
Developers Focus on Security-Minded Tooling - Quintis Venter
 
Deploying Privileged Access Workstations (PAWs)
Deploying Privileged Access Workstations (PAWs)Deploying Privileged Access Workstations (PAWs)
Deploying Privileged Access Workstations (PAWs)
 
The Spy Who Loathed Me - An Intro to SQL Server Security
The Spy Who Loathed Me - An Intro to SQL Server SecurityThe Spy Who Loathed Me - An Intro to SQL Server Security
The Spy Who Loathed Me - An Intro to SQL Server Security
 

More from ResellerClub

Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
ResellerClub
 
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran TalrejaCtrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
ResellerClub
 
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran TalrejaCtrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
ResellerClub
 

More from ResellerClub (20)

How to setup a WordPress website - A webinar for beginners
How to setup a WordPress website - A webinar for beginnersHow to setup a WordPress website - A webinar for beginners
How to setup a WordPress website - A webinar for beginners
 
Ctrl+F5 Ahmedabad, 2017 - Designing for the next billion Internet users by Kr...
Ctrl+F5 Ahmedabad, 2017 - Designing for the next billion Internet users by Kr...Ctrl+F5 Ahmedabad, 2017 - Designing for the next billion Internet users by Kr...
Ctrl+F5 Ahmedabad, 2017 - Designing for the next billion Internet users by Kr...
 
Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
Ctrl+F5 Ahmedabad, 2017 - BOOST THE PERFORMANCE OF WORDPRESS WEBSITES by Prat...
 
TechTalks by ResellerClub - Simran Talreja: Usability 101
TechTalks by ResellerClub - Simran Talreja: Usability 101TechTalks by ResellerClub - Simran Talreja: Usability 101
TechTalks by ResellerClub - Simran Talreja: Usability 101
 
TechTalks by ResellerClub Episode 2: GST and your Web Design/Development & Ho...
TechTalks by ResellerClub Episode 2: GST and your Web Design/Development & Ho...TechTalks by ResellerClub Episode 2: GST and your Web Design/Development & Ho...
TechTalks by ResellerClub Episode 2: GST and your Web Design/Development & Ho...
 
Ctrl+F5 Bangalore 2017: Design thinking by Praveen Ummanath
Ctrl+F5 Bangalore 2017: Design thinking by Praveen UmmanathCtrl+F5 Bangalore 2017: Design thinking by Praveen Ummanath
Ctrl+F5 Bangalore 2017: Design thinking by Praveen Ummanath
 
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin ThomasCtrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
 
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran TalrejaCtrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 2017, Jaipur: A Practical Approach to Design Thinking by Simran Talreja
 
Ctrl+F5, Hyderabad, 2016: A Practical Approach to Design Thinking by Simran ...
 Ctrl+F5, Hyderabad, 2016: A Practical Approach to Design Thinking by Simran ... Ctrl+F5, Hyderabad, 2016: A Practical Approach to Design Thinking by Simran ...
Ctrl+F5, Hyderabad, 2016: A Practical Approach to Design Thinking by Simran ...
 
Ctrl+f5 Hyderabad, 2016: Aditi Rele - Intelligent Applications, AI in the fut...
Ctrl+f5 Hyderabad, 2016: Aditi Rele - Intelligent Applications, AI in the fut...Ctrl+f5 Hyderabad, 2016: Aditi Rele - Intelligent Applications, AI in the fut...
Ctrl+f5 Hyderabad, 2016: Aditi Rele - Intelligent Applications, AI in the fut...
 
VIP Webinar - 7/12/2016
VIP Webinar - 7/12/2016VIP Webinar - 7/12/2016
VIP Webinar - 7/12/2016
 
Ctrl+F5 Mumbai, 2016: Design with Context by Ninad Raval
Ctrl+F5 Mumbai, 2016: Design with Context by Ninad RavalCtrl+F5 Mumbai, 2016: Design with Context by Ninad Raval
Ctrl+F5 Mumbai, 2016: Design with Context by Ninad Raval
 
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran TalrejaCtrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
Ctrl+F5 Mumbai, 2016: A Practical Approach to Design Thinking by Simran Talreja
 
Fireside Session with Shridhar
Fireside Session with ShridharFireside Session with Shridhar
Fireside Session with Shridhar
 
A Roadmap for your Web Design & Development Business in 2016
A Roadmap for your Web Design & Development Business in 2016 A Roadmap for your Web Design & Development Business in 2016
A Roadmap for your Web Design & Development Business in 2016
 
Building a Web Presence Business that stands the test of time by Shridhar Lut...
Building a Web Presence Business that stands the test of time by Shridhar Lut...Building a Web Presence Business that stands the test of time by Shridhar Lut...
Building a Web Presence Business that stands the test of time by Shridhar Lut...
 
Do-it-Yourself Vs Do-it-for-me: Which one suits Indian SMBs today? Panel Disc...
Do-it-Yourself Vs Do-it-for-me: Which one suits Indian SMBs today? Panel Disc...Do-it-Yourself Vs Do-it-for-me: Which one suits Indian SMBs today? Panel Disc...
Do-it-Yourself Vs Do-it-for-me: Which one suits Indian SMBs today? Panel Disc...
 
New gTLDs : What's really in a name? Panel Discussion
New gTLDs : What's really in a name? Panel DiscussionNew gTLDs : What's really in a name? Panel Discussion
New gTLDs : What's really in a name? Panel Discussion
 
IoT Overview and Use Cases by Sachin Pukale
IoT Overview and Use Cases by Sachin PukaleIoT Overview and Use Cases by Sachin Pukale
IoT Overview and Use Cases by Sachin Pukale
 
Play your role in India's Internet Governance by Samiran Gupta
Play your role in India's Internet Governance by Samiran GuptaPlay your role in India's Internet Governance by Samiran Gupta
Play your role in India's Internet Governance by Samiran Gupta
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Simple tips to improve Server Security

  • 1.
  • 2. Why should you secure your server ? • Customer Safety and Satisfaction • Required to Carry on Business • Long Term Economic Benefits • Improves Your Hosting Brand
  • 3. Sections in this Session • Securing your Server(s) SSH Access • MySQL Security Best Practices • Preventing Email Abuse
  • 4. Why Secure your SSH ? • SSH allows you to remotely execute command • As an Admin you access it from a Remote Location, so can a hacker • A hacker may gain root access to your server if not secured • IF a hacker gains root access, you can kiss your server good bye !
  • 5. Change your SSH Port • Default SSH port is 22, even the hacker knows that • Hacker can Scan Port 22 on various IP Addresses and use brute force or other attacks to gain access • Hence change your port to something other than 22 (and 2222 which is common as well) • In /etc/ssh/sshd_config change : Port 3077
  • 6. Disable Root Login • The Hacker would likely try a brute-force for the root user • Disabling the Root User Login will add an additional layer of security to your server • If you need root access, login as a normal user and use the su command. • In /etc/ssh/sshd_config change : PermitRootLogin no AllowUsers mysshuser
  • 7. Use Keys for Authentication • Disable password logins. To do so : $ ssh-keygen -t rsa • This will create two files in your (hidden) ~/.ssh directory called: id_rsa and id_rsa.pub • The first: id_rsa is your private key and the id_rsa.pub is your public key. • If you are a Windows User. You can convert the id_rsa file into a .ppk with the help of Puttygen for use with Putty. • Never re-use SSH Keys on multiple servers
  • 8. Use Keys for Authentication (Cont.) • You will need to set file permissions on the server: PasswordAuthentication no $ chmod 700 ~/.ssh $ chmod 600 ~/.ssh/authorized_keys • Disable password authentication completely in /etc/ssh/sshd_config • Copy the public key (id_rsa.pub) to the server and install it to the authorized_keys $ cat id_rsa.pub >> ~/.ssh/authorized_keys
  • 9. SSH IP Address Restriction • IP Address Restriction means allowing only certain IPs to SSH into a Server. This requires static IP Address(es) • The two important files are: /etc/hosts.allow /etc/hosts.deny sshd: 1.2.3.0 • In /etc/hosts.allow add allowed IP Address sshd: ALL • In /etc/hosts.deny, restrict all IPs
  • 10. Fail2Ban • Fail2ban scans log files (e.g. /var/log/secure) and bans IPs (using the Firewall) that show the malicious signs -- too many password failures, seeking for exploits, etc. • Out of the box Fail2Ban comes with filters for various services like apache, ssh, courier • You can configure Fail2Ban to send emails to Sysadmins as well. # EPEL is required $ yum install fail2ban
  • 11. Logwatch • Logwatch is a customizable, pluggable log- monitoring system. • It will go through your logs for a given period of time and make a report in the areas that you wish, with the detail that you wish • Installation is simple : $ yum install logwatch • Usage is simple as well : $ logwatch --detail Low --service sshd -- range today --save /tmp/logwatch
  • 12. Separate Billing Server • Small and Medium sized web-hosting companies and resellers tend to keep their billing systems hosted on the same servers which host their shared hosting customers • BAD IDEA ! • Your website + billing software should *always* be stored on a separate server / VPS • It is extremely dangerous to have untrusted customers on the same server.
  • 13. MySQL / MariaDB Abuse • Database Abuse is pretty common and easily achievable in shared environments • If MySQL / MariaDB is abused your system will become slower and all your customers websites will be affected. • There are external threats possible if you don’t secure your MySQL / MariaDB server
  • 14. Restrict Remote Access • By Default MySQL will start with Networking and will listen on Port 3306 • To restrict MySQL from opening a network socket, the following parameter should be added in the[mysqld] section of my.cnf or my.ini: skip-networking • Some Control Panels like cPanel restrict it to the localhost IP 127.0.0.1 bind-address=127.0.0.1
  • 15. Disable the use of LOCAL INFILE • Disable the use of the "LOAD DATA LOCAL INFILE" command • If not secured important data could be revealed : SELECT load_file("/etc/passwd") • To disable the usage of the "LOCAL INFILE" command, the following parameter should be added in the [mysqld] section of the MySQL configuration file. set-variable=local-infile=0 Some Control Panels like cPanel restrict this already
  • 16. Setting Account Resource Limits In MySQL 5+, you can limit use of the following server resources for individual accounts: • The number of queries that an account can issue per hour • The number of updates that an account can issue per hour • The number of times an account can connect to the server per hour • The number of simultaneous connections to the server by an account GRANT ALL ON customer.* TO ‘DB'@'localhost' WITH MAX_QUERIES_PER_HOUR 3600 MAX_UPDATES_PER_HOUR 360 MAX_CONNECTIONS_PER_HOUR 3600 MAX_USER_CONNECTIONS 5;
  • 17. Other MySQL / MariaDB Tips • Change root username and password (don’t do it on cPanel, Plesk, etc.) • Remove the "test" database • Remove Anonymous and obsolete accounts • Remove History cat /dev/null > ~/.mysql_history
  • 18. Prevent Email Abuse • Shared Hosting users can send a lot of SPAM from your servers if you don’t prevent them • It can cause Black Listing of your server IPs • In cPanel, there are some good settings to prevent users to send excessive emails like hourly emails, percentage of failed messages • You can find it in WHM -> Tweak Settings
  • 19. Ebury and Poodle • On infected hosts, Ebury steals SSH login credentials (username/password) from incoming and outgoing SSH connections. • Check your servers for an Ebury infection : https://www.cert-bund.de/ebury-faq • POODLE : The Google Security Team discovered this vulnerability; they disclosed it in September 2014. • You should disable SSLv3 because of Poodle.
  • 20. Last Tips • Backup your servers and data regularly. It is the only solution you have if your servers get hacked. • Keep your systems up-to-date (goes without saying). Its easy “yum update” • Be well informed about recent vulnerabilities by subscribing to security mailing lists e.g. hostingseclist.com
  • 21. Thank You • Thank you for being here. Credits : • Patrick William from Rack911 • Samjad from ActiveLobby • drServer.net • cPanel for their development license • Anyone and Everyone who I missed to mention :)