Network settings<\/a>. You can also use the following command on your server.<\/p>\n\n\n\nip addr<\/pre>\n\n\n\nThe output will list all of your currently configured network interfaces. Find the one with the same public IP address as shown in the Network settings, commonly eth0<\/tt>.<\/p>\n\n\n\n
With Snort up and running ping your cloud server from any other computer. You should see a notice for each ICMP call in the terminal running Snort.<\/p>\n\n\n\n
07\/12-11:20:33.501624 [**] [1:10000001:1] ICMP test [**] [Priority: 0] {ICMP} 83.136.252.118 -> 80.69.173.202<\/pre>\n\n\n\nAfter the alerts show up you can stop Snort with ctrl+C<\/tt>.<\/p>\n\n\n\n
Snort records the alerts to a log under \/var\/log\/snort\/snort.log.timestamp<\/span><\/tt>, where the time stamp is the point in time when Snort was started marked in Unix time. You can read the logs with the command underneath. Since you have only run Snort once, there is only one log, complete your command by pressing TAB.<\/p>\n\n\n\nsnort -r \/var\/log\/snort\/snort.log.<\/pre>\n\n\n\nThe log shows a warning for each ICMP call with source and destination IPs, time and date, plus some additional info as shown in the example below.<\/p>\n\n\n\n
WARNING: No preprocessors configured for policy 0.\n07\/12-11:20:33.501624 83.136.252.118 -> 80.69.173.202\nICMP TTL:63 TOS:0x0 ID:20187 IpLen:20 DgmLen:84 DF\nType:8 Code:0 ID:13891 Seq:1 ECHO<\/pre>\n\n\n\nRunning Snort in the background<\/h2>\n\n\n\n
Lastly, if you wish to run Snort on CentOS as a service in the background you should download a startup script from Snort documentation.<\/p>\n\n\n\n
If you installed Snort using yum, you should already have the startup script configured. Start the service as described below.<\/p>\n\n\n\n
Use the following commands to get and install a startup script for your system.<\/p>\n\n\n\n
wget https:\/\/www.snort.org\/documents\/snort-startup-script-for-centos -O ~\/snortd\nsudo chmod 755 ~\/snortd && sudo mv ~\/snortd \/etc\/init.d\/<\/pre>\n\n\n\nNext, reload the system daemon.<\/p>\n\n\n\n
sudo systemctl daemon-reload<\/pre>\n\n\n\nThen start the service.<\/p>\n\n\n\n
sudo systemctl start snortd<\/pre>\n\n\n\nThe startup script also includes the other usual systemctl<\/tt> commands: stop<\/tt>, restart<\/tt>, and status<\/tt>. For example, you can check the status of the service with the following command.<\/p>\n\n\n\nsudo systemctl status snortd<\/pre>\n\n\n\nConclusions<\/h2>\n\n\n\n
Congratulations, you should have now successfully configured and tested a network-based intrusion detection system. This guide however only covers the very basics with an introduction to Snort and NIDS in general. To get more out of your installation, check out the deployment guides over at the Snort documents page<\/a>, or jump right into writing your own detection rules with their helpful Snort rules info graph<\/a>.<\/p>\n","protected":false},"featured_media":8908,"comment_status":"open","ping_status":"closed","template":"","community-category":[111,113,121],"class_list":["post-24614","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-networking","community-category-integrations","community-category-security"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24614"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/8908"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24614"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}