Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Another newbie question...

  • 26-04-2008 11:39am
    #1
    Posts: 5,589 ✭✭✭


    Right, made the switch to linux and apart from some issues with the sound, all is going well.

    However, I want to block some website and adservers - I've been told I have do this though the /etc/hosts file

    However, this isn't working.

    At the moment, say I want to block boards I enter

    127.0.0.1 www.boards.ie

    but this doesn't block the site..

    Any ideas?


Comments

  • Registered Users, Registered Users 2 Posts: 17,727 ✭✭✭✭Sherifu


    You've described the right procedure.

    Are you sure the hosts file is saving the changes? You need to be root.


  • Posts: 5,589 ✭✭✭ [Deleted User]


    yep, host file is saving the changes


  • Registered Users, Registered Users 2 Posts: 17,727 ✭✭✭✭Sherifu


    Did you reboot?


  • Posts: 5,589 ✭✭✭ [Deleted User]


    :o


  • Registered Users, Registered Users 2 Posts: 17,727 ✭✭✭✭Sherifu


    :D lol


  • Advertisement
  • Posts: 5,589 ✭✭✭ [Deleted User]


    nope.. not working either


  • Registered Users, Registered Users 2 Posts: 17,727 ✭✭✭✭Sherifu


    It should be as easy as;

    sudo gedit /etc/hosts

    Your hosts file should open up. This file may already have some entries in it, which you don't change. Go to the end of the file, and add whatever entries you wanted to.
    Save the hosts file, close it, and reboot your computer.


  • Posts: 5,589 ✭✭✭ [Deleted User]


    yeah, thats what I have been doing.. but no luck.

    127.0.0.1 localhost
    127.0.1.1 Keynes

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    127.0.0.1 www.boards.ie
    127.0.1.1 www.boards.ie

    is what my hosts file ie


  • Registered Users, Registered Users 2 Posts: 17,727 ✭✭✭✭Sherifu


    try changing it to

    127.0.0.1 localhost
    127.0.1.1 Keynes
    127.0.0.1 www.boards.ie

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    and reboot


  • Posts: 5,589 ✭✭✭ [Deleted User]


    i had it like that already


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,713 ✭✭✭corkie


    see these links:

    http://www.ruhanirabin.com/2007/11/16/hosts-file-configuration-windows-linux-and-mac/

    ubuntuforums.org: host file bypassed?

    Did you try pinging one of the sites your trying to block with your hosts file?


  • Posts: 5,589 ✭✭✭ [Deleted User]


    thanks - however nogo!

    still not working.......


  • Posts: 5,589 ✭✭✭ [Deleted User]


    Mad - I installed a plugin for firefox (ABP) and now the hosts file is working...

    might have been a problem with FF


  • Registered Users, Registered Users 2 Posts: 1,421 ✭✭✭Steveire


    Mad - I installed a plugin for firefox (ABP) and now the hosts file is working...

    might have been a problem with FF

    Are you using a proxy?

    If you are then that would explain it. Firefox would request 'www.boards.ie' from the proxy, instead of resolving it to '89.234.66.107' (or '127.0.0.1' if that entry was there), and requesting that from the proxy.

    I don't know what that plugin does, but a work around in the case I just described is to add www.boards.ie to the list of hosts not to use the proxy for in firefox. That means that you'd have to maintain two lists though.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,986 Mod ✭✭✭✭Capt'n Midnight


    why have a short DIY static list in hosts when you can have rules in proxy.pac ?
    www.schooner.com/~loverso/no-ads/

    firefox also uses it's own DNS cache so not sure if changes in hosts take effect straight awayl

    if you have a static internet address you can also sign up for opends.org and use their whitelists /blacklists at dns level


  • Registered Users, Registered Users 2 Posts: 2,750 ✭✭✭niallb


    if you have a static internet address you can also sign up for opendns.org and use their whitelists /blacklists at dns level

    Tiny typo, but excellent suggestion.
    /etc/hosts changes do not require a reboot.

    A firefox addon is a possible culprit, with a proxy server the most likely cause.
    What's the list of plugins/addons you have installed?

    I'd expect ad-block and similar might use something like /etc/hosts blocking.
    They probably have a hosts file somewhere else in your firefox profile.
    Perhaps installing the ABP addon created a new personal hosts file including your contents.
    Only a theory as I haven't used them myself, but it fits the scenario.

    You should be able to flush firefox's DNS cache by using <CTRL><SHIFT>R to reload.
    This also instructs a proxy to redeliver content, but won't get it to look at your /etc/hosts (nothing will).


  • Posts: 5,589 ✭✭✭ [Deleted User]


    I imagine its the college proxy thats causing the problem, as it works fine when I am at home!

    Thanks lads!


Advertisement