{"id":4687,"date":"2012-10-21T20:08:54","date_gmt":"2012-10-22T02:08:54","guid":{"rendered":"http:\/\/humairahmed.com\/blog\/?p=4687"},"modified":"2012-10-21T21:17:17","modified_gmt":"2012-10-22T03:17:17","slug":"blocking-hackers-from-accessing-your-switch-via-telnetssh","status":"publish","type":"post","link":"https:\/\/humairahmed.com\/blog\/?p=4687","title":{"rendered":"Blocking Hackers From Accessing Your Switch via Telnet\/SSH"},"content":{"rendered":"<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Blocking+Hackers+From+Accessing+Your+Switch+via+Telnet%2FSSH\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/humairahmed.com\/blog\/?p=4687\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><\/div><p>It&#8217;s amazing how much rattling at the doors and attempted intrusions companies become accustomed to seeing on their networks. Here I show a simple way to block telnet\/SSH access to your switch. First, you should never use telnet to manage your switch over the Internet because the traffic is sent unencrypted and it is therefore insecure; SSH is the better option. Perhaps you only want to manage the switch from an internal network or only want to allow or block some hosts from using telnet\/ssh. Below, I block all telnet\/ssh access to the switch. I&#8217;m using a Dell Force10 S50N switch [FTOS 8.4.2.6]. <!--more--><\/p>\n<p>I&#8217;ve worked with tons of switches connected to the Internet and if telnet\/ssh is not restricted via an access list, I usually see something like the below in the logs. The logs usually reveal botched attempts from all over the world &#8211; in this case Italy, China, and Peru.<br \/>\n<div id=\"attachment_4691\" style=\"width: 585px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/09\/login_failures1-e1347256308524.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4691\" src=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/09\/login_failures1-e1347256308524.png\" alt=\"Failed telnet login attempts on Dell Force10 S50N\" title=\"Failed telnet login attempts on Dell Force10 S50N\" width=\"575\" height=\"260\" class=\"size-full wp-image-4691\" \/><\/a><p id=\"caption-attachment-4691\" class=\"wp-caption-text\">Failed telnet login attempts on Dell Force10 S50N<\/p><\/div><\/p>\n<p>In the above case the telnet server is running but no password is configured so it&#8217;s safe in that regard. However, I can cut the packets off before they even get that far and waste CPU cycles; I do this by placing an extended access list on the VTY lines. Some of you may argue that with an access list the CPU is still hit (I&#8217;ve actually read this in some networking books), but actually this has to do with the implementation of how access lists work with the specific hardware in question, which I will not get into here other than saying the access list will be effective in regards to our intention. <\/p>\n<blockquote><p>\n&#8211; enable<br \/>\n&#8211; conf<br \/>\n&#8211; ip access-list extended VTY_ACCESS<br \/>\n&#8211; remark 0 Deny telnet and ssh access to switch<br \/>\n&#8211; seq 10 deny tcp any any eq 22 count<br \/>\n&#8211; seq 11 deny tcp any any eq 23 count<br \/>\n&#8211; exit <br \/>\n&#8211; line vty 0 9<br \/>\n&#8211; access-class VTY_ACCESS<br \/>\n&#8211; end<br \/>\n&#8211; write\n<\/p><\/blockquote>\n<p><\/br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s amazing how much rattling at the doors and attempted intrusions companies become accustomed to seeing on their networks. Here I show a simple way to block telnet\/SSH access to your switch. First, you should never use telnet to manage &hellip; <a href=\"https:\/\/humairahmed.com\/blog\/?p=4687\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[615,320,447,296,1356,295,3],"tags":[1029,1030,1341,1344,1343,1351,4361,4360,1043,1349,4355,373,452,1342,1044,1350,1354,1353,1345,433,1355,407,1346,1352,1347,1348],"class_list":["post-4687","post","type-post","status-publish","format-standard","hentry","category-dell-force10","category-force10-networks","category-hacks","category-labs","category-network_security","category-networking","category-technology","tag-access-list","tag-access-lists","tag-access-llists","tag-block-ssh","tag-block-telnet","tag-block-vty-access","tag-dell","tag-dell-force10","tag-extended-access-list","tag-extended-access-lists","tag-force10-networks","tag-ftos","tag-hack","tag-hacker","tag-named-access-list","tag-named-access-lists","tag-port-22","tag-port-23","tag-s0n","tag-ssh","tag-tcp","tag-telnet","tag-vty","tag-vty-access","tag-vty-line","tag-vty-lines"],"_links":{"self":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4687"}],"version-history":[{"count":27,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4687\/revisions"}],"predecessor-version":[{"id":5010,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4687\/revisions\/5010"}],"wp:attachment":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}