SlideShare a Scribd company logo
1 of 13
Download to read offline
Zabbix Conference 2015
Hardening Zabbix
Who am I
● Name: Patrik Uytterhoeven
● Company: Open-Future
● Job: Open-Source Consultant
● Author: Zabbix Cookbook
Why This Talk ?
● Too many guides on the internet saying: ignore
SELinux
● People ignore to check there distro for updates
● Lazy SYSadmins (sometimes not bad :-) )
What can we do to improve Security
● Configure Apache, Nginx, … to make use of
HTTPS instead of HTTP
● Do not connect to the internet ( use vpn ! )
● Disable the GUEST user !
● Enable and configure SELinux
● Check for security updates on your OS.
(remember hearthbleed,Ghost, … )
Wrong ideas about SELinux
● SELinux is too difficult to configure . It is easier
to disable.
● Some people think it has NSA backdoors
because it is developed by the NSA.
The Truth
● SELinux is developed to protect us. Adding a
backdoor would also put American companies
at risk.
● The Kernel code is free available. Feel free to
have a look and let me know if you can find
some backdoor …
● SELinux was difficult to use but has been
improved over the years. Since RedHat 6
SELinux is very easy to debug. No excuse to
not use it anymore.
How to Activate SELinux ?
● Check the SELinux status with: getenforce
● This should return “Enforcing”
● Edit SELinux Config: /etc/selinux/config
● SELINUX=enforcing
● Run “setenforce 1”
Some SELinux Settings for Zabbix
● On the Agent Side
● setsebool -P zabbix_can_network 1
● On the Server Side
● setsebool -P httpd_can_network_connect on
● setsebool -P httpd_can_network_connect_db on
● getsebool -a “This will list all booleans”
More Advanced troubleshooting
Fping will always return 0 in Zabbix with SELinux
active. How to resolve this ?
Install setroubleshoot-server package:
● Yum install setroubleshoot-server
Run sealert
● sealert -a /var/log/audit/audit.log to check the errors in
selinux. (-a is the option to analyze the file )
SELinux will try to propose a solution when
possible
fping example
Solutions
● Run “setenforce 0” temporary to test if SELinux is blocking
access.
● Check /var/log/messages
● Make use of sealert
● Ls -Z (to see selinux context of files)
● restorecon
● will restore the original context.
● chcon --reference <source> <destination>
● To copy context from source to destination
Now that you know more about
SeLinux
I hope that you will not disable it anymore.
This Zabbix extension will check if SELinux is
active and if there are any security updates
available on your rhel 6/7 system
● https://github.com/Open-Future-Belgium/zabbix
/tree/master/check-yum-updates
● https://share.zabbix.com/operating-
systems/redhat-centos/check-yum-updates
Thank You for you time.
Questions ?

More Related Content

More from Zabbix

More from Zabbix (20)

Zabbix Conference LatAm 2016 - Filipe Paternot - Zbx@Globo Automation+Integra...
Zabbix Conference LatAm 2016 - Filipe Paternot - Zbx@Globo Automation+Integra...Zabbix Conference LatAm 2016 - Filipe Paternot - Zbx@Globo Automation+Integra...
Zabbix Conference LatAm 2016 - Filipe Paternot - Zbx@Globo Automation+Integra...
 
Zabbix Conference LatAm 2016 - Douglas Esteves - Zabbix at UNICAMP
Zabbix Conference LatAm 2016 - Douglas Esteves - Zabbix at UNICAMPZabbix Conference LatAm 2016 - Douglas Esteves - Zabbix at UNICAMP
Zabbix Conference LatAm 2016 - Douglas Esteves - Zabbix at UNICAMP
 
Ryan Armstrong - Monitoring More Than 6000 Devices in Zabbix | ZabConf2016
Ryan Armstrong - Monitoring More Than 6000 Devices in Zabbix | ZabConf2016Ryan Armstrong - Monitoring More Than 6000 Devices in Zabbix | ZabConf2016
Ryan Armstrong - Monitoring More Than 6000 Devices in Zabbix | ZabConf2016
 
Rafael Martinez Guerrero - Zabbix at the University of Oslo | ZabConf2016
Rafael Martinez Guerrero - Zabbix at the University of Oslo | ZabConf2016Rafael Martinez Guerrero - Zabbix at the University of Oslo | ZabConf2016
Rafael Martinez Guerrero - Zabbix at the University of Oslo | ZabConf2016
 
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
 
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
Wolfgang Alper - Zabbix Meets OPS Control / Rundeck | ZabConf2016
 
Sumit Goel - Monitoring Cloud Applications Using Zabbix | ZabConf2016
Sumit Goel - Monitoring Cloud Applications Using Zabbix | ZabConf2016Sumit Goel - Monitoring Cloud Applications Using Zabbix | ZabConf2016
Sumit Goel - Monitoring Cloud Applications Using Zabbix | ZabConf2016
 
Rihards Olups - Zabbix at Nokia - Case Study
Rihards Olups - Zabbix at Nokia - Case StudyRihards Olups - Zabbix at Nokia - Case Study
Rihards Olups - Zabbix at Nokia - Case Study
 
Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016
Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016
Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016
 
Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...
Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...
Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
 
Mikhail Serkov - Zabbix for HPC Cluster Support | ZabConf2016
Mikhail Serkov - Zabbix for HPC Cluster Support | ZabConf2016Mikhail Serkov - Zabbix for HPC Cluster Support | ZabConf2016
Mikhail Serkov - Zabbix for HPC Cluster Support | ZabConf2016
 
Lukáš Malý - Log management ELISA controlled by Zabbix | ZabConf2016
Lukáš Malý - Log management ELISA controlled by Zabbix | ZabConf2016Lukáš Malý - Log management ELISA controlled by Zabbix | ZabConf2016
Lukáš Malý - Log management ELISA controlled by Zabbix | ZabConf2016
 
Konstantin Yakovlev - Event Analysis Toolset | ZabConf2016
Konstantin Yakovlev - Event Analysis Toolset | ZabConf2016Konstantin Yakovlev - Event Analysis Toolset | ZabConf2016
Konstantin Yakovlev - Event Analysis Toolset | ZabConf2016
 
Oleg Ivanivskyi - Lessons Learned While Being On-Site | ZabConf2016
Oleg Ivanivskyi - Lessons Learned While Being On-Site | ZabConf2016Oleg Ivanivskyi - Lessons Learned While Being On-Site | ZabConf2016
Oleg Ivanivskyi - Lessons Learned While Being On-Site | ZabConf2016
 
Ingus Vilnis - Benefits of Zabbix Training | ZabConf2016
Ingus Vilnis -  Benefits of Zabbix Training | ZabConf2016Ingus Vilnis -  Benefits of Zabbix Training | ZabConf2016
Ingus Vilnis - Benefits of Zabbix Training | ZabConf2016
 
Alexei Vladishev - Opening Speech | ZabConf2016
Alexei Vladishev - Opening Speech | ZabConf2016Alexei Vladishev - Opening Speech | ZabConf2016
Alexei Vladishev - Opening Speech | ZabConf2016
 
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
Alexander Naydenko - Nagios to Zabbix Migration | ZabConf2016
 
Alain Ganuchaud - Trouble Ticket Integration with Zabbix in Large Environment...
Alain Ganuchaud - Trouble Ticket Integration with Zabbix in Large Environment...Alain Ganuchaud - Trouble Ticket Integration with Zabbix in Large Environment...
Alain Ganuchaud - Trouble Ticket Integration with Zabbix in Large Environment...
 
Rihards Olups - Zabbix log management
Rihards Olups - Zabbix log managementRihards Olups - Zabbix log management
Rihards Olups - Zabbix log management
 

Recently uploaded

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Patrik Uytterhoeven - Hardening Zabbix

  • 2. Who am I ● Name: Patrik Uytterhoeven ● Company: Open-Future ● Job: Open-Source Consultant ● Author: Zabbix Cookbook
  • 3. Why This Talk ? ● Too many guides on the internet saying: ignore SELinux ● People ignore to check there distro for updates ● Lazy SYSadmins (sometimes not bad :-) )
  • 4. What can we do to improve Security ● Configure Apache, Nginx, … to make use of HTTPS instead of HTTP ● Do not connect to the internet ( use vpn ! ) ● Disable the GUEST user ! ● Enable and configure SELinux ● Check for security updates on your OS. (remember hearthbleed,Ghost, … )
  • 5. Wrong ideas about SELinux ● SELinux is too difficult to configure . It is easier to disable. ● Some people think it has NSA backdoors because it is developed by the NSA.
  • 6. The Truth ● SELinux is developed to protect us. Adding a backdoor would also put American companies at risk. ● The Kernel code is free available. Feel free to have a look and let me know if you can find some backdoor … ● SELinux was difficult to use but has been improved over the years. Since RedHat 6 SELinux is very easy to debug. No excuse to not use it anymore.
  • 7. How to Activate SELinux ? ● Check the SELinux status with: getenforce ● This should return “Enforcing” ● Edit SELinux Config: /etc/selinux/config ● SELINUX=enforcing ● Run “setenforce 1”
  • 8. Some SELinux Settings for Zabbix ● On the Agent Side ● setsebool -P zabbix_can_network 1 ● On the Server Side ● setsebool -P httpd_can_network_connect on ● setsebool -P httpd_can_network_connect_db on ● getsebool -a “This will list all booleans”
  • 9. More Advanced troubleshooting Fping will always return 0 in Zabbix with SELinux active. How to resolve this ? Install setroubleshoot-server package: ● Yum install setroubleshoot-server Run sealert ● sealert -a /var/log/audit/audit.log to check the errors in selinux. (-a is the option to analyze the file ) SELinux will try to propose a solution when possible
  • 11. Solutions ● Run “setenforce 0” temporary to test if SELinux is blocking access. ● Check /var/log/messages ● Make use of sealert ● Ls -Z (to see selinux context of files) ● restorecon ● will restore the original context. ● chcon --reference <source> <destination> ● To copy context from source to destination
  • 12. Now that you know more about SeLinux I hope that you will not disable it anymore. This Zabbix extension will check if SELinux is active and if there are any security updates available on your rhel 6/7 system ● https://github.com/Open-Future-Belgium/zabbix /tree/master/check-yum-updates ● https://share.zabbix.com/operating- systems/redhat-centos/check-yum-updates
  • 13. Thank You for you time. Questions ?