{"id":17981,"date":"2022-08-03T18:50:54","date_gmt":"2022-08-03T18:50:54","guid":{"rendered":"https:\/\/linuxways.net\/?p=17981"},"modified":"2022-09-05T18:04:52","modified_gmt":"2022-09-05T18:04:52","slug":"set-up-syslog-server-centos-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/set-up-syslog-server-centos-8\/","title":{"rendered":"How To Set Up a Syslog Server on CentOS 8"},"content":{"rendered":"<p>All the network devices, such as firewalls, routers, switches, or servers, save logs about their statuses and the occurred events. The small system\u2019s generated logs are not very difficult to track. However, what about the extensive systems or networks? This is where the Syslog server comes up.<\/p>\n<p>This is the most mature protocol and has been used for decades. It involves transporting messages (logs) from network devices to the server where logs are saved for review and management purposes. The Syslog server can either be a physical server or a virtual device, and in this article, we will go through all the steps required to set up the Syslog server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"776\" height=\"491\" class=\"wp-image-17999\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-1.png 776w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-1-300x190.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-1-768x486.png 768w\" sizes=\"auto, (max-width: 776px) 100vw, 776px\" \/><\/p>\n<h2>How To Install the Syslog Server on CentOS 8<\/h2>\n<p>Syslog server named Rsyslog is an open-source system logging utility that comes pre-installed in CentOS 8. To use it, we will have to update the system\u2019s packages using the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"38\" class=\"wp-image-18001\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-2.png\" \/><\/p>\n<p>Now, we will get the latest Syslog server (Rsylog) using the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"307\" height=\"31\" class=\"wp-image-18004\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-3.png 307w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-3-300x30.png 300w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><\/p>\n<p>Once we hit enter, the terminal would ask us:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"270\" class=\"wp-image-18013\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-4.png 474w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-4-300x171.png 300w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/p>\n<p>Once we press \u201cy\u201d and enter, the terminal will automatically download and install the required packages.<\/p>\n<h2>How To Configure the Syslog Server on CentOS 8<\/h2>\n<p>Syslog server needs to be configured after it has been installed to receive logs from the clients. This is a multi-step guide; you will be done in no time after using the following commands.<\/p>\n<p><strong>Step 1: <\/strong>To start receiving the logs using the TCP\/UDP protocols, we need to enable them. The file named <strong>rsyslog.conf <\/strong>contains all the required configurations and permissions for UDP\/TCP.<\/p>\n<p>Using the following command, we will edit <strong>rsyslog.conf <\/strong>file using the built-in nano editor:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"32\" class=\"wp-image-18015\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-5.png 328w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-5-300x29.png 300w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/p>\n<p>Hitting enter will open the file to be edited. Now, for the UDP, we will have to remove \u201c#\u201d to uncomment the following lines:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"277\" class=\"wp-image-18019\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-6.png 561w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-6-300x148.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/p>\n<p>For the TCP, we will have to remove \u201c#\u201d to uncomment the following lines:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"190\" class=\"wp-image-18021\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-7.png 840w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-7-300x68.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-7-768x174.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/p>\n<p>Now, press <strong>CTRL+S<\/strong> and then <strong>CTRL+X. <\/strong>The editor will exit.<\/p>\n<p><strong>Step 2: <\/strong>The Syslog server listens to port# 514, so you are to allow all connections to it using the following command to receive messages on the server:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"32\" class=\"wp-image-18022\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-8.png 712w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-8-300x13.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/p>\n<p>Now, we have to reload the firewall to adapt changes using the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"315\" height=\"20\" class=\"wp-image-18024\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-9.png 315w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-9-300x19.png 300w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><\/p>\n<p><strong>Step 3:<\/strong> We have to restart and re-enable the rsylog by using the following commands:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"346\" height=\"25\" class=\"wp-image-18025\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-10.png 346w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-10-300x22.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/p>\n<p>And<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"336\" height=\"22\" class=\"wp-image-18026\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-11.png 336w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-11-300x20.png 300w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/p>\n<p>Finally, you can get the list of messages by using the following command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"267\" height=\"23\" class=\"wp-image-18027\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-17981-12.png\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Syslog server is widely used to receive and store the network logs from the network activity from the network devices like switches, routers or servers, etc. The Syslog server uses the package named \u201cSyslog package\u201d to get access to CentOS 8. This comprehensive guide provides you with all the necessary help to set up the Syslog server on CentOS 8. Configure it to receive the messages from clients, and you can get the messages.<\/p>","protected":false},"excerpt":{"rendered":"<p>A step-by-step guide that shows how to set up a Syslog server on CentOS8 to receive and store network logs from network activity from network devices.<\/p>","protected":false},"author":1,"featured_media":18095,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17981","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/17981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=17981"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/17981\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/18095"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=17981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=17981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=17981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}