Close

Page 1 of 2 12 LastLast
Results 1 to 20 of 38
  1. #1
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Editing the hosts file to block sites

    I need to block just one site in both IE and Firefix, I googled it and found the trick by editing the hosts file (at c/windows.system32/drivers/etc), what I did was add the url golfgti.co.uk so the bottom section of the file now looks like this:

    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    127.0.0.1 golfgtiforum.co.uk

    however it hasn't blocked the golfgti site after a reboot, I even tried adding www.golfgtiforum.co.uk too but no luck.

    Anyone no any better ways to block this one site or if the above is incorrect somehow?

    I can use the contect advisor but once youve turned that one everything is blocked and you have to amnually add each URL that you want to allow which is a bit of a pisser.

  2. #2
    DF VIP Member
    tombott's Avatar
    Join Date
    Oct 2002
    Location
    Hereford
    Posts
    5,697
    Thanks
    507
    Thanked:        571
    Karma Level
    723

    Default Re: Editing the hosts file to block sites

    Make sure you have saved it as hosts and not hosts.txt

    Start - Run - Cmd

    Cd windows\system32\drivers\etc\
    dir hosts*.*

    If you have hosts and hosts.txt do the following:

    del hosts
    rename hosts.txt hosts

    Hopefully that should sort it.
    Digital-Forums IRC Last.FM duckduckgo
    Guns don't kill people rappers do, I'm a fucking rapper and I might kill you.

  3. #3
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by tombott View Post
    Make sure you have saved it as hosts and not hosts.txt

    Start - Run - Cmd

    Cd windowssystem32driversetc
    dir hosts*.*

    If you have hosts and hosts.txt do the following:

    del hosts
    rename hosts.txt hosts

    Hopefully that should sort it.
    Yeah mate it is just hosts not hosts.txt

    I dont quite get you rename hosts.txt hosts????

    you mean rename it hosts.txt.hosts?

  4. #4
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by tombott View Post
    Make sure you have saved it as hosts and not hosts.txt

    Start - Run - Cmd

    Cd windowssystem32driversetc
    dir hosts*.*

    If you have hosts and hosts.txt do the following:

    del hosts
    rename hosts.txt hosts

    Hopefully that should sort it.
    Sorry mate I misunderstood you slightly there, what exactly do I need to type as a cmd as I have pasted exactly what you said and its not recognised.

  5. #5
    DF VIP Member Ginnerfreak's Avatar
    Join Date
    Sep 2007
    Location
    Eutopia
    Posts
    1,588
    Thanks
    270
    Thanked:        262
    Karma Level
    321

    Default Re: Editing the hosts file to block sites

    remove the TXT extension mate.

  6. #6
    DF VIP Member inspectercoley's Avatar
    Join Date
    May 2007
    Location
    TaxiMike
    Posts
    3,733
    Thanks
    234
    Thanked:        64
    Karma Level
    407

    Default Re: Editing the hosts file to block sites

    spybot search and destroy does this for you.
    Then just add to the file that uses in the options.
    This is a better way of doing it other wise you have to redirect the attempt somewhere and this is slow esp if that place doesn't exist.
    [live=TaxiMike]TaxiMike[/live]

  7. #7
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by Ginnerfreak View Post
    remove the TXT extension mate.
    There is no .txt extension, it is simply caslled hosts

  8. #8
    DF VIP Member
    tombott's Avatar
    Join Date
    Oct 2002
    Location
    Hereford
    Posts
    5,697
    Thanks
    507
    Thanked:        571
    Karma Level
    723

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by SoundOfFaz View Post
    Sorry mate I misunderstood you slightly there, what exactly do I need to type as a cmd as I have pasted exactly what you said and its not recognised.
    Click Start - Run
    Type 'cmd' Without the quotes. Click Run

    A command prompt will open
    Type the following followed by return after each line:

    Code:
    cd windows
    cd system32
    cd drivers
    cd etc
    Then
    Code:
    dir hosts*.*
    You should only see one hosts file

    If you see hosts and hosts.txt then do the following:
    Code:
    del host
    rename hosts.txt hosts
    Digital-Forums IRC Last.FM duckduckgo
    Guns don't kill people rappers do, I'm a fucking rapper and I might kill you.

  9. #9
    DF VIP Member
    tombott's Avatar
    Join Date
    Oct 2002
    Location
    Hereford
    Posts
    5,697
    Thanks
    507
    Thanked:        571
    Karma Level
    723

    Default Re: Editing the hosts file to block sites

    Is this a stand-alone PC or part of network?
    Digital-Forums IRC Last.FM duckduckgo
    Guns don't kill people rappers do, I'm a fucking rapper and I might kill you.

  10. #10
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by tombott View Post
    Is this a stand-alone PC or part of network?
    Network, would that be the issue?

    I will try what you said niow

  11. #11
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by tombott View Post
    Click Start - Run
    Type 'cmd' Without the quotes. Click Run

    A command prompt will open
    Type the following followed by return after each line:

    Code:
    cd windows
    cd system32
    cd drivers
    cd etc
    Then
    Code:
    dir hosts*.*
    You should only see one hosts file

    If you see hosts and hosts.txt then do the following:
    Code:
    del host
    rename hosts.txt hosts
    as soon as i type in cd windows I get "the systme cannot find the path specified"

  12. #12
    DF VIP Member muttleymacclad's Avatar
    Join Date
    Aug 2006
    Location
    Here
    Posts
    5,717
    Thanks
    931
    Thanked:        659
    Karma Level
    646

    Default Re: Editing the hosts file to block sites

    Isn't the problem that you're not blocking the IP address of the gti forum?
    "When a naked man is chasing a woman through an alley with a butchers knife and a hard-on, I figure he isn't out collecting for the Red Cross." - 'Dirty' Harry

  13. #13
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by muttleymacclad View Post
    Isn't the problem that you're not blocking the IP address of the gti forum?
    Apparently it is correct to enter the ip of the local machine next to the URL you want blocking.

  14. #14
    DF VIP Member muttleymacclad's Avatar
    Join Date
    Aug 2006
    Location
    Here
    Posts
    5,717
    Thanks
    931
    Thanked:        659
    Karma Level
    646

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by SoundOfFaz View Post
    Apparently it is correct to enter the ip of the local machine next to the URL you want blocking.
    Oh right ok, I thought you'd block the forums IP address 87.106.70.54

    MML
    "When a naked man is chasing a woman through an alley with a butchers knife and a hard-on, I figure he isn't out collecting for the Red Cross." - 'Dirty' Harry

  15. #15
    DF VIP Member SoundOfFaz's Avatar
    Join Date
    Dec 2003
    Location
    SoundOfFaz HQ
    Posts
    1,274
    Thanks
    18
    Thanked:        3
    Karma Level
    329

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by muttleymacclad View Post
    Oh right ok, I thought you'd block the forums IP address 87.106.70.54

    MML
    That still may be correct as far as I have found from googling it you dont enter the actual ip of the site

  16. #16
    DF VIP Member muttleymacclad's Avatar
    Join Date
    Aug 2006
    Location
    Here
    Posts
    5,717
    Thanks
    931
    Thanked:        659
    Karma Level
    646

    Default Re: Editing the hosts file to block sites

    no you are right, I was being stupid sorry.

    MML
    "When a naked man is chasing a woman through an alley with a butchers knife and a hard-on, I figure he isn't out collecting for the Red Cross." - 'Dirty' Harry

  17. #17
    DF VIP Member
    tombott's Avatar
    Join Date
    Oct 2002
    Location
    Hereford
    Posts
    5,697
    Thanks
    507
    Thanked:        571
    Karma Level
    723

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by SoundOfFaz View Post
    as soon as i type in cd windows I get "the systme cannot find the path specified"
    Make sure you have the C:\ prompt
    Do the following:

    c:
    cd \
    Digital-Forums IRC Last.FM duckduckgo
    Guns don't kill people rappers do, I'm a fucking rapper and I might kill you.

  18. #18
    DF VIP Member
    tombott's Avatar
    Join Date
    Oct 2002
    Location
    Hereford
    Posts
    5,697
    Thanks
    507
    Thanked:        571
    Karma Level
    723

    Default Re: Editing the hosts file to block sites

    Quote Originally Posted by muttleymacclad View Post
    Isn't the problem that you're not blocking the IP address of the gti forum?
    Windows checks the hosts file to resolve names to IP addresses.
    By putting the 127.0.0.1 address (local IP) Windows in theory should use this address there by ignoring the actual address.
    Digital-Forums IRC Last.FM duckduckgo
    Guns don't kill people rappers do, I'm a fucking rapper and I might kill you.

  19. #19
    DF VIP Member
    liveseytowers's Avatar
    Join Date
    Aug 2007
    Location
    Bristol, Unite
    Posts
    7,756
    Thanks
    495
    Thanked:        251
    Karma Level
    644

    Default Re: Editing the hosts file to block sites

    Have you tired putting this in the lmhost file as well? Might be worth a try

  20. #20
    DF VIP Member Phreakster's Avatar
    Join Date
    Dec 2000
    Posts
    525
    Thanks
    0
    Thanked:        0
    Karma Level
    324

    Default Re: Editing the hosts file to block sites

    shouldn't you also be including the www?

Page 1 of 2 12 LastLast

Similar Threads

  1. anyone have sites for scanner frequencies etc
    By yorg in forum Home Audio/Video, Electronic Toys & Gadgets
    Replies: 10
    Last Post: 21st January 2003, 12:34 AM
  2. gta3 save file 4 u all (pc)
    By neilmachin in forum PC Gaming
    Replies: 6
    Last Post: 14th January 2003, 01:52 PM
  3. Wicked Flash File
    By Pegasus in forum The Dog and Duck
    Replies: 11
    Last Post: 13th November 2002, 11:46 PM
  4. T100 To T108 Flash File
    By BAZZO69 in forum Unlocking Questions & Solutions
    Replies: 7
    Last Post: 4th September 2002, 07:53 PM

Social Networking Bookmarks

Posting Permissions

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