
{"id":1603,"date":"2013-09-10T09:38:26","date_gmt":"2013-09-10T09:38:26","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=1603"},"modified":"2013-09-10T09:38:26","modified_gmt":"2013-09-10T09:38:26","slug":"block-access-to-unwanted-websites-in-ubuntu-13-1013-04linux-mint","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2013\/09\/block-access-to-unwanted-websites-in-ubuntu-13-1013-04linux-mint\/","title":{"rendered":"Block Access to Unwanted Websites in Ubuntu 13.10\/13.04\/Linux Mint"},"content":{"rendered":"<p>Want to block access to certain websites from your machine running Ubuntu or Linux Mint? It&#8217;s easy to do it by editing the host file.<\/p>\n<p>With the hosts file, you can tell Ubuntu to redirect the specific websites to 127.0.0.1. So that the web browser returns below error:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites.jpg\" alt=\"block specific websites in ubuntu\" width=\"468\" height=\"285\" class=\"aligncenter size-full wp-image-1605\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites.jpg 468w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites-300x182.jpg 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p>To do so, edit the <b>\/etc\/hosts<\/b> with your favorite editor. Press <u>Ctrl+Alt+T<\/u> on your keyboard to open terminal. When it opens, run below command to edit the hosts via gedit:<\/p>\n<pre>sudo gedit \/etc\/hosts<\/pre>\n<p>Add below lines to the end of the file. Exclude the &#8220;http:\/\/&#8221; and change the domain names.<\/p>\n<blockquote><p># block access to certain sites<br \/>\n127.0.0.1 www.websites1.com<br \/>\n127.0.0.1 www.websites2.com<br \/>\n127.0.0.1 websites3.com<br \/>\n127.0.0.1 morewebsites.com<\/p><\/blockquote>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites-via-hosts.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites-via-hosts.jpg\" alt=\"block-specific-sites-via-hosts\" width=\"468\" height=\"299\" class=\"aligncenter size-full wp-image-1606\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites-via-hosts.jpg 468w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/09\/block-specific-sites-via-hosts-300x191.jpg 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p>Save the file and re-launch your web browser. Done.<\/p>","protected":false},"excerpt":{"rendered":"<p>Want to block access to certain websites from your machine running Ubuntu or Linux Mint? It&#8217;s easy to do it by editing the host file. With the hosts file, you can tell Ubuntu to redirect the specific websites to 127.0.0.1. So that the web browser returns below error: To do so, edit the \/etc\/hosts with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[580,15,37],"class_list":["post-1603","post","type-post","status-publish","format-standard","hentry","category-modify-ubuntu","tag-block","tag-ubuntu-13-04","tag-ubuntu-13-10"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/1603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=1603"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/1603\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=1603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=1603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=1603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}