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

Banning a domain from accessing awebsite

Options
  • 04-06-2003 8:31am
    #1
    Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,498 Mod ✭✭✭✭


    Right thought I'd ask this here,
    I want to ban a domain from accessing a website.

    So lets say I'm running mydomain.com and a person is connected to the net using iol, so when they access my website my website see's there coming from .etcetc.etc.blaa.iol.ie and will not allow them to access my website.

    Can this be done using .httaccess and is it possiable that when a user connects from etc.blaa.iol.ie they will be prompted for a user/pass.

    But when a user access my site connected using Eircom, (etc.blaa.eircom.net) they can access my website fine without being prompted for a password


    Any ideas how this can be done?


Comments

  • Closed Accounts Posts: 382 ✭✭misterq


    Can be done in two ways:

    1) In the Apache server configuration file, by adding an entry such as:
    <Directory /home/domain/domain1/web/>
    Deny from 207.44.208.89
    </Directory>

    2) .htaccess
    <Limit GET PUT POST>
    order allow,deny
    allow from all
    deny from etcetc.etc.blaa.iol.ie
    </Limit>

    The only thing to note is that if the person you are trying to block is connecting using a dynamic IP address, you really would have to block out an IP range or domain rather than just on IP address or hostname.
    eg: deny from .iol.ie
    deny from 207.44.208.


    Ronan


  • Closed Accounts Posts: 1,414 ✭✭✭tom-thebox


    Originally posted by misterq
    Can be done in two ways:

    1) In the Apache server configuration file, by adding an entry such as:
    <Directory /home/domain/domain1/web/>
    Deny from 207.44.208.89
    </Directory>


    Hey Cabaal

    I can set this up for you in the virtual config for your domain on the server you are on.

    Although if you can get it working via .htaccess it would give you control in the future.

    Regards


  • Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,498 Mod ✭✭✭✭Cabaal


    Originally posted by misterq

    The only thing to note is that if the person you are trying to block is connecting using a dynamic IP address, you really would have to block out an IP range or domain rather than just on IP address or hostname.
    eg: deny from .iol.ie
    deny from 207.44.208.


    Also can it prompt for a password when accessing from iol.ie?


  • Closed Accounts Posts: 382 ✭✭misterq


    AuthUserFile /usr/home/domain/htpasswd
    AuthGroupFile /usr/home/domain/htgroup
    AuthName "IOL Password Holders Only"
    AuthType Basic
    Satisfy Any
    <Limit GET POST>
    order allow,deny
    allow from all
    deny from *.iol.ie
    require group iolusers
    </Limit>

    AuthGroupFile:
    iolusers: ioluser1


    should work.


  • Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,498 Mod ✭✭✭✭Cabaal


    Yep that works perfectly :-)

    Thanks lads..


  • Advertisement
Advertisement