{"id":1192,"date":"2014-08-18T21:57:53","date_gmt":"2014-08-18T19:57:53","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=1192"},"modified":"2014-08-18T21:57:53","modified_gmt":"2014-08-18T19:57:53","slug":"srv-snmp","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=1192","title":{"rendered":"srv-snmp"},"content":{"rendered":"<p>SNMP for Simple Network Management Protocol.<\/p>\n<h1>Installation<\/h1>\n<p>You can copy\/paste this script and use it to configure automatically your server.<\/p>\n<pre class=\"bash\" style=\"font-family:monospace;\"><ol><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;install snmp&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">dnf <span style=\"color: #660033;\">-y<\/span> <span style=\"color: #c20cb9; font-weight: bold;\">install<\/span> net-snmp net-snmp-utils<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;start snmp on startup&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl <span style=\"color: #7a0874; font-weight: bold;\">enable<\/span> snmpd.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;start service&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">systemctl start snmpd.service<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;open snmp port 161\/tcp&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">firewall-cmd <span style=\"color: #660033;\">--permanent<\/span> <span style=\"color: #660033;\">--add-port<\/span>=<span style=\"color: #000000;\">161<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span>tcp<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<h1>Test<\/h1>\n<p>To test if it works:<\/p>\n<pre lang=\"bash\">\r\nsnmpwalk -v 1 -c public -O e 127.0.0.1\r\n<\/pre>\n<p>That&#8217;s all \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SNMP for Simple Network Management Protocol. Installation You can copy\/paste this script and use it to configure automatically your server. Test To test if it works: snmpwalk -v 1 -c public -O e 127.0.0.1 That&#8217;s all \ud83d\ude42<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":679,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1192","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1192"}],"version-history":[{"count":2,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1192\/revisions"}],"predecessor-version":[{"id":1194,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1192\/revisions\/1194"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/679"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}