{"id":998,"date":"2022-07-02T14:28:08","date_gmt":"2022-07-02T13:28:08","guid":{"rendered":"https:\/\/www.labtinker.net\/?p=998"},"modified":"2022-07-02T14:28:08","modified_gmt":"2022-07-02T13:28:08","slug":"as-easy-as-falling-of-a-log","status":"publish","type":"post","link":"http:\/\/18.135.13.153\/?p=998","title":{"rendered":"As Easy as Falling of a Log"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I encountered one of those smallish problems where I needed to do something slightly out of the ordinary and felt the need to share it here to spare someone a precious few moments re-inventing&#8230; not so much the wheel&#8230; as the perhaps the furry dice. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And so to the problem: I have\/had an overly permissive rule on an ASA and after putting more granular rules above this I wanted a way of logging only what was still hitting the permissive rule. Lucky the ASA in question did\/does not have syslog so the lab was to stand up a syslog server and configure an ASA to only log to the syslog server on a selected rule. (We&#8217;re not cracking the Enigma code here)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Back with GNS3 (I&#8217;m avoiding AWS for now after accidentally leaving a Cisco FMC and FTD turned on over the bank holiday weekend&#8230; that&#8217;s $150 I&#8217;ll never see again.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So this is the set up:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"348\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-1.png\" alt=\"\" class=\"wp-image-1001\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-1.png 593w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-1-300x176.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I downloaded Kiwi Syslog server (<a href=\"https:\/\/www.solarwinds.com\/kiwi)\">https:\/\/www.solarwinds.com\/kiwi)<\/a> and installed it on a Windows 2012 server VM. I initially got very frustrated in this lab because I couldn&#8217;t see any logs on my syslog console (despite checking I was listening on udp 514 and Wireshark traces confirming syslog was arriving). The next paragraph is a mild rant which you may want to skip.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is what got me:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Kiwi&#8217;s Setup menu, there is this &#8216;Inputs&#8217; section<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"242\" height=\"67\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-2.png\" alt=\"\" class=\"wp-image-1002\" style=\"width:242px;height:67px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To me this menu looks like a title &#8216;Inputs&#8217; and some options beneat, but the actually the &#8216;title&#8217; itself is an option&#8230; that you need to click on &#8211; and it&#8217;s therein that you define the allowed hosts. (which is 10.10.10.99: the ASA&#8217;s inside interface)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"335\" height=\"264\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-3.png\" alt=\"\" class=\"wp-image-1003\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-3.png 335w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-3-300x236.png 300w\" sizes=\"auto, (max-width: 335px) 100vw, 335px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I scoured all the options several times before this occurred to me.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rant over. And Kiwi \/ Solarwinds do provide the software free of charge&#8230; so beggars shouldn&#8217;t be critics (I paraphrase)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"153\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-5-1024x153.png\" alt=\"\" class=\"wp-image-1005\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-5-1024x153.png 1024w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-5-300x45.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-5-768x115.png 768w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-5.png 1135w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My approach was as follows. I have two rules &#8211; shown above. The first allows traffic from the Windows server to the ip address 8.8.8.8 (Google&#8217;s DNS) the second allows access to anywhere. I am logging on the first rule at &#8216;alert&#8217; level and the second at &#8216;default&#8217; level.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First rule logging details:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"451\" height=\"288\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-8.png\" alt=\"\" class=\"wp-image-1008\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-8.png 451w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-8-300x192.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Second rule logging details:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"357\" height=\"96\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-14.png\" alt=\"\" class=\"wp-image-1014\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-14.png 357w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-14-300x81.png 300w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I have reduced the logging interval down from its default value of 300 seconds to 10 seconds for the purposes of the lab.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The above looks like this from the CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>access-list inside_access_in extended permit object-group DM_INLINE_PROTOCOL_2 10.10.10.0 255.255.255.0 object 8.8.8.8 log alerts interval 10<br>access-list inside_access_in extended permit object-group DM_INLINE_PROTOCOL_1 10.10.10.0 255.255.255.0 any<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And this is the relevant bit of the ASA logging config&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>ASA1# show run log<br>logging enable<br>logging timestamp<br>logging trap alerts     &lt;&lt;&lt; <\/em>send &#8216;alert&#8217; level logs to syslog<em><br>logging asdm informational<br>logging queue 8192<br>logging host inside 10.10.10.12<\/em>  &lt;&lt;&lt; Specify the address of the syslog server (The Windows 2012 server)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So from the Windows server if we ping 1.1.1.1 we should see nothing and yet when we ping 8.8.8.8 we should get logs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pinging 1.1.1.1 (notice the cmd box artfully placed over the syslog server display)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"340\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-10.png\" alt=\"\" class=\"wp-image-1010\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-10.png 673w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-10-300x152.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not a scooby. And let&#8217;s try the same pinging 8.8.8.8<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"198\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13-1024x198.png\" alt=\"\" class=\"wp-image-1013\" style=\"width:1043px;height:201px\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13-1024x198.png 1024w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13-300x58.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13-768x149.png 768w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13-1536x297.png 1536w, http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/07\/image-13.png 1731w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The syslog server logs this traffic these because the ASA logs these at &#8216;alert&#8217; level which is the level of logs which it&#8217;s configured to send to the syslog server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I encountered one of those smallish problems where I needed to do something slightly out of the ordinary and felt the need to share it here to spare someone a precious few moments re-inventing&#8230; not so much the wheel&#8230; as the perhaps the furry dice. And so to the problem: I have\/had an overly permissive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-998","post","type-post","status-publish","format-standard","hentry","category-firewalls"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts\/998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=998"}],"version-history":[{"count":0,"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts\/998\/revisions"}],"wp:attachment":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=998"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}