Results 1 to 7 of 7

Thread: Hosts Files?

  1. #1
    vonedaddy
    Guest
    Hosts Files?
    I am a long time windows user and I am new to the mac so please bare with me.

    With my windows xp machine I used to have a HOSTS file where I can store DNS information locally and the browser would check there for DNS resolution before going to the DNS servers. Is that possible with a MAC?

  2. #2
    Hosts Files?

    Member Since
    Mar 30, 2004
    Location
    USA
    Posts
    4,744
    Specs:
    12" Apple PowerBook G4 (1.5GHz)
    It's at /etc/hosts

    If the above confuses you, then do the following:
    - Open the Terminal application (In the Utilities folder, inside the Applications folder of your hard disk)
    - type
    Code:
    open /etc/hosts
    and press Return
    The Hosts file should open in a text editor.

  3. #3
    Hosts Files?
    PowerBookG4's Avatar
    Member Since
    Jan 08, 2005
    Location
    New Jersey
    Posts
    6,188
    Specs:
    Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
    I am interested in what you are changing in this file, a description would be much apprieated so I can learn something.
    My Website
    Blog
    I love my hosting company!
    I was on the M-F honor roll for Febuary:2006

  4. #4
    Hosts Files?
    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,584
    Specs:
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    Cool
    He maybe adding an entry to the file. An entry would look something like the following (ip address hosts name):

    123.32.12.125 gandalf
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  5. #5
    Hosts Files?

    Member Since
    Mar 30, 2004
    Location
    USA
    Posts
    4,744
    Specs:
    12" Apple PowerBook G4 (1.5GHz)
    Quote Originally Posted by PowerBookG4
    I am interested in what you are changing in this file, a description would be much apprieated so I can learn something.
    1. Shortcuts, like localhost.
    2. Ad blocking. For example, redirect all request to ads.advertiser.com to 127.0.0.1, and web ads from that advertiser will disappear. (You can find lists of popular advertisers' servers, like Doubleclick's, on Google)
    3. Filtering. Suppose your roommate shares your iMac. Suppose he likes porn. Suppose you don't want him browsing porn on your computer. Redirect all requests to www.hisfavoritepornosite.com to 127.0.0.1

  6. #6
    Hosts Files?
    PowerBookG4's Avatar
    Member Since
    Jan 08, 2005
    Location
    New Jersey
    Posts
    6,188
    Specs:
    Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
    that is prety cool, how did you do this on the pc, because I would like to do that on my pc as well.
    My Website
    Blog
    I love my hosting company!
    I was on the M-F honor roll for Febuary:2006

  7. #7
    Hosts Files?

    Member Since
    Jan 19, 2007
    Location
    Pennsylvania
    Posts
    130
    Specs:
    MacBook Pro-2.16Ghz Intel Core 2 Duo-3GB RAM-120GB HDD
    PowerbookG4,
    The host file on a pc is located at cwindows\system32\drivers\etc\

    The file name is hosts (no file extension). If you use notepad to edit, make sure when you save you save it as "hosts" including the quotes otherwise it will ad a .txt extension and won't work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I've got so many HOSTS files ..
    By signs in forum OS X - Operating System
    Replies: 1
    Last Post: 05-21-2015, 04:38 AM
  2. hosts file
    By ankhseeker in forum OS X - Operating System
    Replies: 10
    Last Post: 12-18-2014, 11:54 AM
  3. hosts.allow
    By akash0310 in forum OS X - Operating System
    Replies: 1
    Last Post: 01-22-2014, 02:38 PM
  4. SSH hosts.allow
    By Paul133 in forum OS X - Operating System
    Replies: 13
    Last Post: 10-18-2010, 09:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •