{"id":825,"date":"2022-02-01T09:40:33","date_gmt":"2022-02-01T08:40:33","guid":{"rendered":"https:\/\/www.labtinker.net\/?p=825"},"modified":"2022-02-01T09:40:33","modified_gmt":"2022-02-01T08:40:33","slug":"cisco-asa-and-non-std-ssh-v2","status":"publish","type":"post","link":"https:\/\/labtinker.net\/?p=825","title":{"rendered":"Cisco ASA and non-std SSH &#8211; the reprise"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Any readers of this blog will possibly remember that I compared a few different vendors&#8217; firewalls to see how easy it was to configure them to block ssh access when it was running on the non-standard port of tcp 80 which is typically used by http. (This is a little contrived because anyone trying to get out like this would probably use tcp 443 giving us the complication of encryption but it gives a feel for how easy it is to configure application inspection)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During this process I had problems with the Cisco ASA and disqualified it from my trial. However, would you believe I have had countless emails asking me when I would give it a second chance? No, neither would I. Nonetheless I decided to revist the ASA.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the topology:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-1.png\" alt=\"\" class=\"wp-image-832\" width=\"813\" height=\"537\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-1.png 813w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-1-300x198.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-1-768x507.png 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The stages of the test will follow the trials conducted earlier. We will set up the firewall with a rule allowing port 80 or http traffic out from the DMZ and stand up a server running ssh on port 80 (ssh.labtinker.net). We will then see if we can ssh out through the firewall on port 80 from the linux server running on the DMZ.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I can report that with a rule allowing http (amongst other things but not ssh!)&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"159\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-5-1024x159.png\" alt=\"\" class=\"wp-image-838\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-5-1024x159.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-5-300x47.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-5-768x119.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-5.png 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I was able to connect straight away to my ssh server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-17-1024x270.png\" alt=\"\" class=\"wp-image-850\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-17-1024x270.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-17-300x79.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-17-768x203.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-17.png 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> I knew the ASA already did some from of application inspection out of the box using its default global service policy but checking this out I saw that it didn&#8217;t cover http<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"395\" height=\"242\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-2.png\" alt=\"\" class=\"wp-image-834\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-2.png 395w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-2-300x184.png 300w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I added &#8216;http&#8217; to this policy <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"372\" height=\"264\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-3.png\" alt=\"\" class=\"wp-image-835\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-3.png 372w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-3-300x213.png 300w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I then tried my ssh connection out on port 80 and it was still allowed&#8230;. I won&#8217;t bother with the visual evidence this time but obvioulsy the default http application inspection didn&#8217;t stop ssh. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I realised I was going to have to delve into modular policy framework which is what Cisco uses to do application inspection (amongst other things). I never found it hugely intuitive so I determined that I would satisfy myself that I could get it working before trying to use it to block ssh. I chose as a way of doing this allowing access to <em>18.135.13.153\/<\/em>  but blocking access to <em>www.labtinker.co.uk<\/em>; mainly because someone had already given an example of how to do something similar.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-fir-3-net wp-block-embed-fir-3-net\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"2EYARF5mHo\"><a href=\"https:\/\/www.fir3net.com\/Firewalls\/Cisco\/url-inspection.html\">Cisco ASA MPF URL Filtering<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201cCisco ASA MPF URL Filtering\u201d \u2014 Fir3net\" src=\"https:\/\/www.fir3net.com\/Firewalls\/Cisco\/url-inspection.html\/embed#?secret=22VgHFpyzH#?secret=2EYARF5mHo\" data-secret=\"2EYARF5mHo\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid confusion, I deleted the default service policy (the joy of a lab &#8211; I would advise against this generally!!) then created a policy which would check the http host header for the presence of the text <em>labtinker.net<\/em>  and only allow a connection if this was present&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"98\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-18.png\" alt=\"\" class=\"wp-image-851\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-18.png 502w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-18-300x59.png 300w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> I achieved this as follows&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"251\" height=\"108\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-9.png\" alt=\"\" class=\"wp-image-842\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;.a global rule service policy rule matching all http traffic&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"139\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-19.png\" alt=\"\" class=\"wp-image-852\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-19.png 977w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-19-300x43.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-19-768x109.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"565\" height=\"390\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-10.png\" alt=\"\" class=\"wp-image-843\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-10.png 565w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-10-300x207.png 300w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"189\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-11.png\" alt=\"\" class=\"wp-image-844\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-11.png 660w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-11-300x86.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"532\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-12.png\" alt=\"\" class=\"wp-image-845\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-12.png 741w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-12-300x215.png 300w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"270\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-13.png\" alt=\"\" class=\"wp-image-846\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-13.png 486w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-13-300x167.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Which in class maps is defined as follows..<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"231\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-14.png\" alt=\"\" class=\"wp-image-847\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-14.png 854w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-14-300x81.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-14-768x208.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"366\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-15.png\" alt=\"\" class=\"wp-image-848\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-15.png 796w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-15-300x138.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-15-768x353.png 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"49\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-16.png\" alt=\"\" class=\"wp-image-849\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-16.png 692w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-16-300x21.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The CLI config for this being&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>class-map type inspect http match-all class-http1<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp;match not request header host regex urlallow1<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>class-map dmz-class<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp;match port tcp eq www<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>class-map match-all<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>!<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>policy-map type inspect http policy-http1<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp;parameters<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp;class class-http1<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp; drop-connection log<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>&nbsp; regex urlallow1 &#8220;labtinker\\.net&#8221;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Which in action, is demonstrated by trying two curl commands from DMZ linux&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a curl connection to<em> ww<\/em>w.<em>labtinker.net<\/em>  which shows the start of the successful HTTP GET<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"113\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-20.png\" alt=\"\" class=\"wp-image-853\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-20.png 687w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-20-300x49.png 300w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;as logged going through the ASA&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"66\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-21-1024x66.png\" alt=\"\" class=\"wp-image-855\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-21-1024x66.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-21-300x19.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-21-768x49.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-21-1536x99.png 1536w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-21.png 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And now trying <em>www.labtinker.co.uk<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"81\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-22.png\" alt=\"\" class=\"wp-image-856\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-22.png 692w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-22-300x35.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The connection is dropped by the inspection engine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"87\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-23-1024x87.png\" alt=\"\" class=\"wp-image-857\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-23-1024x87.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-23-300x25.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-23-768x65.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-23.png 1191w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So I know that the ASA is inspecting my http connnection. However, it still allows my ssh connection through on port 80.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"70\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-24.png\" alt=\"\" class=\"wp-image-858\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-24.png 967w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-24-300x22.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-24-768x56.png 768w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then, in here&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"213\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-25.png\" alt=\"\" class=\"wp-image-859\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-25.png 616w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-25-300x104.png 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I found this&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"151\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-26.png\" alt=\"\" class=\"wp-image-860\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-26.png 492w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-26-300x92.png 300w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;which had this&#8230;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"282\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-27.png\" alt=\"\" class=\"wp-image-861\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-27.png 485w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-27-300x174.png 300w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So I ticked it&#8230; and ASDM generated these CLI commands&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"94\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-28.png\" alt=\"\" class=\"wp-image-862\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-28.png 407w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-28-300x69.png 300w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That had to be it, didn&#8217;t it? Ladies and Gentlemen, it was!!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"110\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-31.png\" alt=\"\" class=\"wp-image-865\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-31.png 912w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-31-300x36.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-31-768x93.png 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And in the logs&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"68\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-32-1024x68.png\" alt=\"\" class=\"wp-image-866\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-32-1024x68.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-32-300x20.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-32-768x51.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-32.png 1332w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So the ASA can be configured to drop non-http traffic on port 80.  I then decided to remove the http inspection checking the header text so I could allow all http traffic out but block ssh.. (and presumably anything else not http)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"376\" height=\"94\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-33.png\" alt=\"\" class=\"wp-image-868\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-33.png 376w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-33-300x75.png 300w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;and I could make curl connections to <em>18.135.13.153\/<\/em> and <em>www.labtinker.co.uk<\/em> and any website but I still could not ssh out on this port 80&#8230; result!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"75\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2022\/02\/image-35.png\" alt=\"\" class=\"wp-image-870\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-35.png 843w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-35-300x27.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2022\/02\/image-35-768x68.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I apologise for taking such a circuitous route to find out how to do what I set out to but I genuinely couldn&#8217;t find much in the way of guidance so I offer this up&#8230;  as an untidy but successful example.#<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I  guess the ASA is creaking as it&#8217;s not an NG firewall and that this kind of thing  would be done in Cisco&#8217;s FMC \/ FTD offfering. I&#8217;ve been out of the Cisco space for a while and it doesn&#8217;t seem that easy to get hold of an eval VM outside of a contract to play around with this&#8230; but I&#8217;ll hopefully be getting up to speed on this area fairly shortly as my new role calls for it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Any readers of this blog will possibly remember that I compared a few different vendors&#8217; firewalls to see how easy it was to configure them to block ssh access when it was running on the non-standard port of tcp 80 which is typically used by http. (This is a little contrived because anyone trying to [&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-825","post","type-post","status-publish","format-standard","hentry","category-firewalls"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts\/825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=825"}],"version-history":[{"count":0,"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts\/825\/revisions"}],"wp:attachment":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}