Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Terminal will NOT block any sites. HELP.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="LizH" data-source="post: 1108033" data-attributes="member: 171544"><p>The first thing we need to do is launch the Terminal application so we can work on the command line. To do this, navigate to and open the 'Applications' folder that is on your hard drive. Then scroll down and open the 'Utilities' folder that is contained within the 'Applications' folder. Run the Terminal application by double clicking its icon.</p><p></p><p>You should now have a new Terminal window open. Make sure it's selected so that you see the word 'Terminal' in the top left menu of your</p><p>desktop.</p><p>2</p><p>Before making any changes to system files it's always good practice to make a backup of the original file. Do that now by typing the following command in Terminal</p><p></p><p>sudo /bin/cp /etc/hosts /etc/hosts.backup</p><p></p><p>Hit 'Enter' and type in your password</p><p>3</p><p>Now that we have a backup of the original file, we can change the original by typing the following command in Terminal</p><p></p><p>sudo /usr/bin/pico /etc/hosts</p><p></p><p>Hit 'Enter' and type in your password</p><p>4</p><p>The command you ran above opens up the 'hosts' file in a text editing program called pico. Do not change any of the original text; instead, we will add text at the end of the file.</p><p></p><p>To move your cursor (the small rectangle in the window) to the end of the file, hold down the 'Control' key on your keyboard and then hit 'v' so they're both pressed at the same time. Hit 'Enter' a couple of times to give yourself some room to type.</p><p>5</p><p>In the next few steps, you will need to swap 'BLOCKEDSITE.COM' with the site you want to block.</p><p></p><p>Type in the following text but with the site you want to block</p><p></p><p>127.0.0.1 <a href="http://WWW.BLOCKEDSITE.COM" target="_blank">WWW.BLOCKEDSITE.COM</a></p><p>127.0.0.1 BLOCKEDSITE.COM</p><p></p><p>Now close and save the file by holding down the 'Control' key and pressing the 'x' key at the same time. Then type in the 'y' key and finally hit the 'Enter' key.</p><p>6</p><p>Now quit your web browser to clear its cache. Open the browser again and navigate to <a href="http://WWW.BLOCKEDSITE.COM" target="_blank">WWW.BLOCKEDSITE.COM</a> or BLOCKEDSITE.COM. Unless you have your own computer setup to serve web pages, the browser will now complain that 'the Browser can't connect to the server'.</p><p></p><p>That's because we have configured the computer to redirect any browser request for BLOCKEDSITE.COM to your own computer. You might choose to setup your computer to serve a web page with an appropriate message such as 'Access Blocked'.</p><p></p><p>From ehow.com</p><p></p><p>All the websites say the same thing. I am just unable to get it to work, no matter what I do.</p></blockquote><p></p>
[QUOTE="LizH, post: 1108033, member: 171544"] The first thing we need to do is launch the Terminal application so we can work on the command line. To do this, navigate to and open the 'Applications' folder that is on your hard drive. Then scroll down and open the 'Utilities' folder that is contained within the 'Applications' folder. Run the Terminal application by double clicking its icon. You should now have a new Terminal window open. Make sure it's selected so that you see the word 'Terminal' in the top left menu of your desktop. 2 Before making any changes to system files it's always good practice to make a backup of the original file. Do that now by typing the following command in Terminal sudo /bin/cp /etc/hosts /etc/hosts.backup Hit 'Enter' and type in your password 3 Now that we have a backup of the original file, we can change the original by typing the following command in Terminal sudo /usr/bin/pico /etc/hosts Hit 'Enter' and type in your password 4 The command you ran above opens up the 'hosts' file in a text editing program called pico. Do not change any of the original text; instead, we will add text at the end of the file. To move your cursor (the small rectangle in the window) to the end of the file, hold down the 'Control' key on your keyboard and then hit 'v' so they're both pressed at the same time. Hit 'Enter' a couple of times to give yourself some room to type. 5 In the next few steps, you will need to swap 'BLOCKEDSITE.COM' with the site you want to block. Type in the following text but with the site you want to block 127.0.0.1 [url]WWW.BLOCKEDSITE.COM[/url] 127.0.0.1 BLOCKEDSITE.COM Now close and save the file by holding down the 'Control' key and pressing the 'x' key at the same time. Then type in the 'y' key and finally hit the 'Enter' key. 6 Now quit your web browser to clear its cache. Open the browser again and navigate to [url]WWW.BLOCKEDSITE.COM[/url] or BLOCKEDSITE.COM. Unless you have your own computer setup to serve web pages, the browser will now complain that 'the Browser can't connect to the server'. That's because we have configured the computer to redirect any browser request for BLOCKEDSITE.COM to your own computer. You might choose to setup your computer to serve a web page with an appropriate message such as 'Access Blocked'. From ehow.com All the websites say the same thing. I am just unable to get it to work, no matter what I do. [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Terminal will NOT block any sites. HELP.
Top