13 Replies Latest reply: May 13, 2010 4:04 PM by rccharles
oryegn Level 1 Level 1 (0 points)
I use Open DNS to access sites and it was working perfectly till two weeks ago. I don't know what happened then, but suddenly my Mac Book Pro started not opening some sites including youtube.com. I checked with my apple tv, my iphone and my vaio pc and and they're all functioning perfectly. Since my Open DNS settings are done on my router (airport extreme) any device that connects through my network can access these sites. All of them do except my Macbook.

I've tried to do something with the terminal but i couldn't quite figure it out. There are many sites listed there. Including youtube but also almost an countless number of sub youtube sites... I delete them, but get lost in the saving process. Don't know what to do after I press 'i' on the terminal to insert, delete manually but can't save...

I only know how save it as a 'terminal save output' file when i press command+S.
And then i close the box from the red button on the left corner.

is it related to any of these things and how can i re-access my youtube?

macbook pro 13inch, Mac OS X (10.6.3)
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    I've tried to do something with the terminal but i couldn't quite figure it out. There are many sites listed there. Including youtube but also almost an countless number of sub youtube sites... I delete them, but get lost in the saving process. Don't know what to do after I press 'i' on the terminal to insert, delete manually but can't save...


    The terminal should have nothing to do with DNS. What exactly have you done?

    is it related to any of these things and how can i re-access my youtube?


    It is definitely related. If you don't understand what you have done to get your machine into this state, it is unlikely you will be able to get it out. Make a good backup, repartition the drive, and reinstall MacOS X.
  • oryegn Level 1 Level 1 (0 points)
    As I was going through the discussions an answer came up to my attention on this link:
    http://discussions.apple.com/message.jspa?messageID=11512078#11512078

    The user had the same problems as I did and fixed it by doing this:

    *You have to modify the host file with the help of terminal*

    *open terminal and type*
    *sudo vi /private/etc/hosts*
    *then press i to modify*
    delete
    *208.117.236.69 youtube.com*
    *208.117.236.69 www.youtube.com*
    *then save and close with :x!*

    This is what I've done as well. On my page there were these numbers and youtube.com and etc, plus a few more sites.

    Today when I typed the suvi private etx host message this came up. But still no access to YouTube.

    *E325: ATTENTION*
    *Found a swap file by the name "/private/etc/.hosts.swp"*
    *owned by: root dated: Wed May 12 03:32:13 2010*
    *file name: /private/etc/hosts*
    *modified: YES*
    *-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit*
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    As I was going through the discussions an answer came up to my attention on this link:
    http://discussions.apple.com/message.jspa?messageID=11512078#11512078

    The user had the same problems as I did and fixed it by doing this:

    *You have to modify the host file with the help of terminal*

    *open terminal and type*
    *sudo vi /private/etc/hosts*
    *then press i to modify*
    delete
    *208.117.236.69 youtube.com*
    *208.117.236.69 www.youtube.com*
    *then save and close with :x!*


    You should not be putting things like this into your hosts file. Did you put them there? Or is that what OpenDNS does? If that is how OpenDNS works, you should avoid that like the plague.

    Get yourself a proxy server instead.

    Today when I typed the suvi private etx host message this came up. But still no access to YouTube.

    *E325: ATTENTION*
    *Found a swap file by the name "/private/etc/.hosts.swp"*
    *owned by: root dated: Wed May 12 03:32:13 2010*
    *file name: /private/etc/hosts*
    *modified: YES*
    *-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit*


    You did not properly exit the last time you edited this file. Don't use vi or sudo if you don't know what you are doing. You could render your machine unbootable very easily. Just delete .hosts.swp and type 'ZZ' in command mode to exit vi.
  • oryegn Level 1 Level 1 (0 points)
    How do I delete that file?
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    How do I delete that file?


    sudo rm /private/etc/.hosts.swp

    Please be very careful with the above command. Type it exactly as it appears above. Using copy and paste would be an excellent idea.
  • oryegn Level 1 Level 1 (0 points)
    Thank you, I've pasted that same line and i got this answer

    rm: /private/etc/.hosts.swp: No such file or directory

    Now is there anything else i need to do?
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    Thank you, I've pasted that same line and i got this answer

    rm: /private/etc/.hosts.swp: No such file or directory


    It probably cleaned things up when you edited and saved the second time.

    Now is there anything else i need to do?


    Post a new thread about what you really want to accomplish. I have seen some really bad suggestions floating on the Internet involving editing the hosts file. If your government is blocking certain sites and such DNS hacks are at all successful, that that means the blocking isn't working very well. If they are serious about this, they will figure out ways to do it better. At that point, the DNS hacks will fail and your computer will be all jacked up.

    The simplest solution is a proxy server. I have one here in Canada so we can watch US TV shows and connect to sites like Pandora. But I'm no expert in this sort of thing. If you start a new thread asking for the best way to accomplish this, you will get better suggestions, possibly from other people in the same situation.
  • oryegn Level 1 Level 1 (0 points)
    This it the thing. There's a glitch in the law system about Internet crimes. Because of certain videos the whole site is blocked. Everybody uses a backdoor in Turkey though. Even the prime minister said 'I can access youtube, you can too' so it's not illegal or anything.

    Open DNS is a server and I changed my settings accordingly. It was working perfect for the last few years. However, suddenly there's a problem with my Mac. All the other computers are fine. But this particular mac started not connecting to this sites. Also richarddawkins.net...

    That proxy is a good idea. How can I purchase it and watch US TV shows etc? I'd like to access netflix and hulu.com as well...

    Can you guide me through that?
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    Open DNS is a server and I changed my settings accordingly. It was working perfect for the last few years. However, suddenly there's a problem with my Mac. All the other computers are fine. But this particular mac started not connecting to this sites. Also richarddawkins.net...


    Your first step will be fixing the Mac. You want to get it back to the point where it can connect to anything except those blocked sites. I'm not sure what all OpenDNS does and what software it may have installed. Follow these instructions to remove OpenDNS: http://www.opendns.com/support/article/140

    I don't think there is anything wrong with OpenDNS itself. Once you get your machine working properly again, feel free to reinstall it if you want.

    Then, clean up your hosts file. Remove everything from /etc/hosts except for the following:

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1             localhost
    fe80::1%lo0 localhost


    That proxy is a good idea. How can I purchase it and watch US TV shows etc? I'd like to access netflix and hulu.com as well...

    Can you guide me through that?


    It is simple enough. I use StrongVPN. Once you purchase the service, they have complete instructions for setting it up. There are a large number of free proxies, but they tend to be unreliable and/or honeypots.
  • oryegn Level 1 Level 1 (0 points)
    Can you tell me step by step on how to remove those remaining lines from the hosts etc file?
    I don't want to mess anything up.
  • etresoft Level 7 Level 7 (25,870 points)
    oryegn wrote:
    Can you tell me step by step on how to remove those remaining lines from the hosts etc file?
    I don't want to mess anything up.


    You don't have to worry much about messing it up. On my work machine, the IT "experts" actually deleted everything from it and the Juniper VPN client fills it full of useless junk. It still works fine. In this particular file, absence of data won't hurt, adding the wrong data will.

    Just edit it like you did before. This time, type the 'dd' command to delete a line. Keep typing dd until the file is empty. Then select the /etc/hosts content that I posted above and copy it to the clipboard. In vi, type the 'i' command to insert text and paste those lines back in. If the formatting gets screwed up, type 'x' to delete blanks from the start of the lines.
  • BobHarris Level 6 Level 6 (14,920 points)
    You could try using 'nano' instead of 'vi'. Nano is an easier to use text editor.
  • rccharles Level 5 Level 5 (6,005 points)
    I'm not sure what all OpenDNS does

    OpenDNS provides provides a free DNS server at 208.67.222.222 and
    208.67.220.220. The lookup is still free. They maybe charging you for the "secret" numbers.
    DNS

    What is a DNS? DNS stands for Domain Name Server.

    When you enter an Internet address such as google.com into a web browser, your system needs to translate the character string into a numeric value. The address google.com translates to 72.14.204.103. A DNS server does this translation. There is a hierarchical series of DNS servers. The first DNS servers starts on your machine.

    When using DHCP to set up your Internet connection, your ISP's DHCP server will provide you with an address of a DNS server.

    You may configure your own DNS server address or addresses if you wish.

    BDAqua suggests in a post:

    You can use OpenDNS for looking up web addresses.

    208.67.222.222
    208.67.220.220

    https://www.opendns.com/homenetwork/start/device/apple-osx-tiger
    (Please note that you do not need to a joint Open DNS to use it.)


    Free Fast Public DNS Servers List
    http://theos.in/windows-xp/free-fast-public-dns-server-list/