SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
10 Essential
Steps to
Configuring a
New Server
User Configuration
● To change the root password: log in as root, run passwd, enter the new password, then again to confirm
● Setting up a password policy is fairly complex, full details are here, but essentially:
+ Install pam_cracklib
+ Edit the /etc/pam.d/common-password (Debian, Ubuntu, Mint) or /etc/pam.d/system-auth
(RHEL, Fedora, CentOS) file
+ Modify the various attributes in that file for
length, complexity, history
+ Edit the /etc/login.defs file and modify the
attributes there for expiration settings
● To create a new user: run useradd [username] as root,
then run passwd [username] to set the password for
that account.
● To give a user sudo access: run visudo as root, find
“root ALL=(ALL) ALL” in the sudoers file, add a new line
next to it and add “[username] ALL=(ALL) ALL” Save and close.
● To disable root: run sudo passwd -l root
1.
UpGuard.com | @UpGuard
● To set the hostname and gateway: edit the
/etc/sysconfig/network file
● To set the IP, netmask and broadcast: edit
the /etc/sysconfig/network-scripts/ifcfg-
eth0 file (Must restart the network service
for changes to take effect)
● To set DNS servers: edit /etc/resolv.conf
● To disable IPv6: edit /etc/sysctl.conf and
add “net.ipv6.conf.all.disable_ipv6 = 1”
Network Configuration2.
UpGuard.com | @UpGuard
● To list current packages: run yum list
installed or dpkg -l
● To install a package: run yum install
[package name] or apt-get install [package
name]
● To remove a package: run yum remove
[package name] or apt-get remove [package
name]
Package Management3.
UpGuard.com | @UpGuard
● To update everything: run yum update or
apt-get upgrade
● To set up automatic updates: install and
use yum-cron or unattended-upgrades
(apt)
Update Installation and Configuration4.
UpGuard.com | @UpGuard
● To sync with an NTP server:
edit the /etc/ntp.conf file
NTP and Time Drift5.
UpGuard.com | @UpGuard
● -To show your iptables: run iptables --
list
● -To delete an existing entry: run
iptables --delete [chain] [rule number]
● -To insert a new entry: run iptables --
insert [chain] [rule number]
● -Full details can be found here: http:
//linux.die.net/man/8/iptables
Firewalls and iptables6.
UpGuard.com | @UpGuard
● To disable ssh access for root: edit /etc/ssh/sshd_config, find “#PermitRootLogin
no” and remove the comment “#” symbol so the directive takes effect. Restart
ssh.
● To restrict ssh by IP: edit the sshd_config file and modify the AllowUsers directive
like so: AllowUsers user1@10.10.10.1 user2@10.10.10.2 etc.
● Moving from password authentication to
certificate based authentication is fairly
involved, requiring the generation of a key
pair and several configuration changes.
See a detailed guide for your distribution.
Securing SSH7.
UpGuard.com | @UpGuard
● To list all services and their status: run
systemctl list-unit-files --type=service or
chkconfig --list
● To prevent a service from
automatically starting: run systemctl
disable [service] or chkconfig [service]
off
● To set a service to start automatically:
run systemctl enable [service] or
chkconfig [service] on
Systemctl and Service Configuration8.
UpGuard.com | @UpGuard
● To see if SELinux is running (RHEL,
CentOS, Fedora): run getenforce or
sestatus
● To enable, disable or modify SELinux,
edit the /etc/selinux/config file
● Try AppArmor as an SELinux
alternative
SELinux and Further Hardening9.
UpGuard.com | @UpGuard
● Logs are usually stored in /var/log
● Check the documentation and
configuration files of your applications
to see what log levels they allow and
set the one that is appropriate for your
needs.
● Consider a centralized syslog server if
your environment warrants one
Logging10.
UpGuard.com | @UpGuard
Want more tips?
Visit UpGuard.com for more technical and how-to articles.
UpGuard.com | @UpGuard

Contenu connexe

Plus de CloudCheckr

Top 10 Java Vulnerabilities & How to Fix Them - Infographic
Top 10 Java Vulnerabilities & How to Fix Them - InfographicTop 10 Java Vulnerabilities & How to Fix Them - Infographic
Top 10 Java Vulnerabilities & How to Fix Them - InfographicCloudCheckr
 
Top 10 critical CVEs that can lead to a data breach - Infographic
Top 10 critical CVEs that can lead to a data breach - InfographicTop 10 critical CVEs that can lead to a data breach - Infographic
Top 10 critical CVEs that can lead to a data breach - InfographicCloudCheckr
 
Top 20 OWASP vulnerabilities & how to fix them - Infographic
Top 20 OWASP vulnerabilities & how to fix them - Infographic Top 20 OWASP vulnerabilities & how to fix them - Infographic
Top 20 OWASP vulnerabilities & how to fix them - Infographic CloudCheckr
 
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRockCloudCheckr
 
Enterprise DevOps and the Cloud
Enterprise DevOps and the CloudEnterprise DevOps and the Cloud
Enterprise DevOps and the CloudCloudCheckr
 
4 Prerequisites for DevOps Success
4 Prerequisites for DevOps Success4 Prerequisites for DevOps Success
4 Prerequisites for DevOps SuccessCloudCheckr
 
DevOps vs The Enterprise
DevOps vs The EnterpriseDevOps vs The Enterprise
DevOps vs The EnterpriseCloudCheckr
 
DevOps Days New York
DevOps Days New YorkDevOps Days New York
DevOps Days New YorkCloudCheckr
 
What if Enterprise IT Built Race Cars?
What if Enterprise IT Built Race Cars?What if Enterprise IT Built Race Cars?
What if Enterprise IT Built Race Cars?CloudCheckr
 
Techno Arms Dealers and High Frequency Traders
Techno Arms Dealers and High Frequency TradersTechno Arms Dealers and High Frequency Traders
Techno Arms Dealers and High Frequency TradersCloudCheckr
 
10 IT Automation Conferences to Attend
10 IT Automation Conferences to Attend10 IT Automation Conferences to Attend
10 IT Automation Conferences to AttendCloudCheckr
 
Puppet vs. Chef - The Battle Wages On
Puppet vs. Chef - The Battle Wages OnPuppet vs. Chef - The Battle Wages On
Puppet vs. Chef - The Battle Wages OnCloudCheckr
 
Welcome Our Robot Overlords
Welcome Our Robot OverlordsWelcome Our Robot Overlords
Welcome Our Robot OverlordsCloudCheckr
 
Top 5 CIO's of 2012
Top 5 CIO's of 2012Top 5 CIO's of 2012
Top 5 CIO's of 2012CloudCheckr
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics TestingCloudCheckr
 
ScriptRock Overview
ScriptRock OverviewScriptRock Overview
ScriptRock OverviewCloudCheckr
 

Plus de CloudCheckr (16)

Top 10 Java Vulnerabilities & How to Fix Them - Infographic
Top 10 Java Vulnerabilities & How to Fix Them - InfographicTop 10 Java Vulnerabilities & How to Fix Them - Infographic
Top 10 Java Vulnerabilities & How to Fix Them - Infographic
 
Top 10 critical CVEs that can lead to a data breach - Infographic
Top 10 critical CVEs that can lead to a data breach - InfographicTop 10 critical CVEs that can lead to a data breach - Infographic
Top 10 critical CVEs that can lead to a data breach - Infographic
 
Top 20 OWASP vulnerabilities & how to fix them - Infographic
Top 20 OWASP vulnerabilities & how to fix them - Infographic Top 20 OWASP vulnerabilities & how to fix them - Infographic
Top 20 OWASP vulnerabilities & how to fix them - Infographic
 
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock
5 Dysfunctions of a DevOps Team - Velocity Ignite 2014 - ScriptRock
 
Enterprise DevOps and the Cloud
Enterprise DevOps and the CloudEnterprise DevOps and the Cloud
Enterprise DevOps and the Cloud
 
4 Prerequisites for DevOps Success
4 Prerequisites for DevOps Success4 Prerequisites for DevOps Success
4 Prerequisites for DevOps Success
 
DevOps vs The Enterprise
DevOps vs The EnterpriseDevOps vs The Enterprise
DevOps vs The Enterprise
 
DevOps Days New York
DevOps Days New YorkDevOps Days New York
DevOps Days New York
 
What if Enterprise IT Built Race Cars?
What if Enterprise IT Built Race Cars?What if Enterprise IT Built Race Cars?
What if Enterprise IT Built Race Cars?
 
Techno Arms Dealers and High Frequency Traders
Techno Arms Dealers and High Frequency TradersTechno Arms Dealers and High Frequency Traders
Techno Arms Dealers and High Frequency Traders
 
10 IT Automation Conferences to Attend
10 IT Automation Conferences to Attend10 IT Automation Conferences to Attend
10 IT Automation Conferences to Attend
 
Puppet vs. Chef - The Battle Wages On
Puppet vs. Chef - The Battle Wages OnPuppet vs. Chef - The Battle Wages On
Puppet vs. Chef - The Battle Wages On
 
Welcome Our Robot Overlords
Welcome Our Robot OverlordsWelcome Our Robot Overlords
Welcome Our Robot Overlords
 
Top 5 CIO's of 2012
Top 5 CIO's of 2012Top 5 CIO's of 2012
Top 5 CIO's of 2012
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics Testing
 
ScriptRock Overview
ScriptRock OverviewScriptRock Overview
ScriptRock Overview
 

Dernier

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 WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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...Drew Madelung
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Dernier (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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

10 Essential Steps For Configuring A New Server

  • 2. User Configuration ● To change the root password: log in as root, run passwd, enter the new password, then again to confirm ● Setting up a password policy is fairly complex, full details are here, but essentially: + Install pam_cracklib + Edit the /etc/pam.d/common-password (Debian, Ubuntu, Mint) or /etc/pam.d/system-auth (RHEL, Fedora, CentOS) file + Modify the various attributes in that file for length, complexity, history + Edit the /etc/login.defs file and modify the attributes there for expiration settings ● To create a new user: run useradd [username] as root, then run passwd [username] to set the password for that account. ● To give a user sudo access: run visudo as root, find “root ALL=(ALL) ALL” in the sudoers file, add a new line next to it and add “[username] ALL=(ALL) ALL” Save and close. ● To disable root: run sudo passwd -l root 1. UpGuard.com | @UpGuard
  • 3. ● To set the hostname and gateway: edit the /etc/sysconfig/network file ● To set the IP, netmask and broadcast: edit the /etc/sysconfig/network-scripts/ifcfg- eth0 file (Must restart the network service for changes to take effect) ● To set DNS servers: edit /etc/resolv.conf ● To disable IPv6: edit /etc/sysctl.conf and add “net.ipv6.conf.all.disable_ipv6 = 1” Network Configuration2. UpGuard.com | @UpGuard
  • 4. ● To list current packages: run yum list installed or dpkg -l ● To install a package: run yum install [package name] or apt-get install [package name] ● To remove a package: run yum remove [package name] or apt-get remove [package name] Package Management3. UpGuard.com | @UpGuard
  • 5. ● To update everything: run yum update or apt-get upgrade ● To set up automatic updates: install and use yum-cron or unattended-upgrades (apt) Update Installation and Configuration4. UpGuard.com | @UpGuard
  • 6. ● To sync with an NTP server: edit the /etc/ntp.conf file NTP and Time Drift5. UpGuard.com | @UpGuard
  • 7. ● -To show your iptables: run iptables -- list ● -To delete an existing entry: run iptables --delete [chain] [rule number] ● -To insert a new entry: run iptables -- insert [chain] [rule number] ● -Full details can be found here: http: //linux.die.net/man/8/iptables Firewalls and iptables6. UpGuard.com | @UpGuard
  • 8. ● To disable ssh access for root: edit /etc/ssh/sshd_config, find “#PermitRootLogin no” and remove the comment “#” symbol so the directive takes effect. Restart ssh. ● To restrict ssh by IP: edit the sshd_config file and modify the AllowUsers directive like so: AllowUsers user1@10.10.10.1 user2@10.10.10.2 etc. ● Moving from password authentication to certificate based authentication is fairly involved, requiring the generation of a key pair and several configuration changes. See a detailed guide for your distribution. Securing SSH7. UpGuard.com | @UpGuard
  • 9. ● To list all services and their status: run systemctl list-unit-files --type=service or chkconfig --list ● To prevent a service from automatically starting: run systemctl disable [service] or chkconfig [service] off ● To set a service to start automatically: run systemctl enable [service] or chkconfig [service] on Systemctl and Service Configuration8. UpGuard.com | @UpGuard
  • 10. ● To see if SELinux is running (RHEL, CentOS, Fedora): run getenforce or sestatus ● To enable, disable or modify SELinux, edit the /etc/selinux/config file ● Try AppArmor as an SELinux alternative SELinux and Further Hardening9. UpGuard.com | @UpGuard
  • 11. ● Logs are usually stored in /var/log ● Check the documentation and configuration files of your applications to see what log levels they allow and set the one that is appropriate for your needs. ● Consider a centralized syslog server if your environment warrants one Logging10. UpGuard.com | @UpGuard
  • 12. Want more tips? Visit UpGuard.com for more technical and how-to articles. UpGuard.com | @UpGuard