{"id":294,"date":"2021-01-03T08:01:02","date_gmt":"2021-01-03T02:31:02","guid":{"rendered":"http:\/\/madhurendra.com\/?p=294"},"modified":"2021-01-07T04:41:42","modified_gmt":"2021-01-06T23:11:42","slug":"blocking-port-80-wont-help-you","status":"publish","type":"post","link":"https:\/\/madhurendra.com\/blocking-port-80-wont-help-you\/","title":{"rendered":"Why just blocking port 80 won’t help you"},"content":{"rendered":"\n

We know HTTP is insecure since across the web IANA’s assigned port list<\/a> is used by default which says port 80 should be used for HTTP traffic, but it’s not that you cannot run anything else which is “non-standard” in port 80. <\/p>\n\n\n\n

Anyways, coming to point you could be running HTTP server on any port 80, 8080, 8090 whatever, HTTP protocol by design is left insecure. Since we cannot change the standard 80 usage everywhere (IPv6 is still on way even after decades) there are multiple remediations that can be used to avoid common challenges with HTTP. <\/p>\n\n\n\n

  1. Instead of serving anything on port 80\/HTTP, use it solely for redirecting to correct HTTPs\/443. As recommended by cio.gov<\/a>, letsencrypt<\/a> <\/li>
  2. Enforce HSTS Policy on your domain, by nature it will be effective only when your domain is access by the client once. if you don’t know what HSTS is, it is just a HTTP header that tells browser to always open website in HTTPS.<\/li>
  3. Blocking or disabling doesn’t make your server any secure, in fact it makes things worse.
    1. There is still an open opportunity of MITM attack. The flaw is in protocol not in the implementation of HTTP, which is why anyone can sniff and serve you alternate content, even if you have port blocked in server.<\/li>
    2. You will make things worse for your users, they won’t be able to access your website as normally they would.<\/li>
    3. if you serve HSTS headers over HTTP, at least HSTS will be enforced on one hand. <\/li>
    4. Everywhere you have to type HTTPS, which people don’t do, it is a painful thing to enforce. <\/li><\/ol><\/li>
    5. It is not about 80, it is more about not using HTTP anywhere, if you have other ports that serve content over HTTP it is still an issue!<\/li><\/ol>\n\n\n\n

      <\/p>\n","protected":false},"excerpt":{"rendered":"

      We know HTTP is insecure since across the web IANA’s assigned port list is used by default which says port 80 should be used for HTTP traffic, but it’s not that you cannot run anything else which is “non-standard” in port 80. Anyways, coming to point you could be running HTTP server on any port … <\/p>\n

      Continue reading<\/a><\/p>\n","protected":false},"author":4,"featured_media":314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[38],"tags":[],"class_list":["post-294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","item-wrap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/madhurendra.com\/wp-content\/uploads\/sites\/4\/2021\/01\/88e6194c5053892bdcf2d286bbf0803072279ecc.png?fit=800%2C380&ssl=1","jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/pciGs2-4K","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":6,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":317,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/posts\/294\/revisions\/317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/media\/314"}],"wp:attachment":[{"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/madhurendra.com\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}