Page 1 of 1

allow access to a website in squid?

Posted: Fri May 18, 2007 9:52 pm
by arahman_80
Hi there,
How can I configure the squid config file to allow access to a specific website say for example www.hotmail.com or wat I am trying is
msc83denmark.dk. I am using Redhat linux 9 and squid 2.5 is installed on it.


Can anyone please help me with this?
Would be of great help if anyone can reply to this as soon as possible as it is very urgent.

Many thanks in advance.
cheers

Re:

Posted: Sat May 19, 2007 10:21 am
by LinuxFreaK
Dear arahman_80,
Salam,

Below configuration in your squid configuration file will help you out.

Code: Select all

acl hotmail dstdomain .hotmail.com
acl hotmail dstdomain www.hotmail.com
http_access allow hotmail
httP_access deny all


What this configuration will do. It will allow *.hotmail.com and deny all other traffic.

Best Regards.

Posted: Mon May 21, 2007 5:56 pm
by arahman_80
Hi
Thanks for you help.
I created this for www.msc83denmark.dk

acl msc83denmark dstdomain .msc83denmark.dk
acl msc83denmark dstdomain www.msc83denmark.dk
http_access allow msc83denmark
http_access deny all

but it gave me an error when i ran the squid again that www.msc83denmark.dk is already part of .msc83denmark.dk and you should probable remove www.msc83denmark.dk from the acl msc83denmark.

And I removed it and there were no errors.

Now I tried to access the website from the client PC but when I open the website www.msc83denmark.dk then it opens and if I click the link accomodation it works fine and then if I try to book a hotel in copenhagen called copenhagen Island then the website is redirected to a website called
http://www.bdp.dk/msc.htm and then if i click the link to book a hotel in copenhagen it is redirected on to this address
http://213.173.246.77/bdp/msc/

if you access the website you will know what i mean and here it does not open any page and it gives me this error

ERROR
The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: http://213.173.246.77:8080/bdp/index.php?

The following error was encountered:

Connection Failed
The system returned:

(110) Connection timed outThe remote host or network may be down. Please try the request again.

Your cache administrator is abrahman@imo.org.



--------------------------------------------------------------------------------

Generated Mon, 21 May 2007 14:15:55 GMT by imo26.imo.org (squid/2.5.STABLE1)



Can you please help me with this?
thankyou very much for all the help.
thanks

Posted: Mon May 21, 2007 7:51 pm
by lambda
which means it's working as expected. you configured it to allow access to msc83denmark.dk and to deny all others, you went to www.msc83denmark.dk and it worked, you went to some other site and it didn't work.

what's the problem?

Posted: Mon May 21, 2007 7:58 pm
by arahman_80
when I open www.msc83denmark.dk it opens a webpage
then i click accomodation link on it
then there is this link
"Please use this link to make hotel reservations with BDP Conference Service"
And I click this link then it opens a new webpage with this address
http://www.bdp.dk/msc.htm

Then I need to register a hotel booking

"Hotel Copenhagen Island - Not classified/design hotel


Please click here to register"

And when I click the above link it opens up another webpage with this address

http://213.173.246.77/bdp/msc/

but this page wont open. It gives the error which I pasted in my previous reply.

Do you know what could be the issue?

thanks

Posted: Mon May 21, 2007 11:09 pm
by lambda
let me try another way to explain the obvious to you.

arahman_80: i want to configure squid to allow access to msc83denmark.dk.
linuxfreak: here's an example of the configuration you want. it allows access to .hotmail.com and denies access to other sites. you can adapt it for your requirements:

Code: Select all

acl hotmail dstdomain .hotmail.com
acl hotmail dstdomain www.hotmail.com
http_access allow hotmail
httP_access deny all

arahman_80: thanks for your help. i had to modify it a bit, but i can now access msc83denmark.dk. however, when i click on a link and go to http://213.173.246.77/bdp/msc/ i get an error.
lambda: it's working as designed. what's the problem?
arahman_80: i can access msc83denmark.dk, but when i click on a link and go to http://213.173.246.77/bdp/msc/ i get an error.

Re:

Posted: Tue May 22, 2007 8:05 am
by LinuxFreaK
Dear arahman_80,
Salam,

You need to allow access to that IP Address.

Best Regards.

Posted: Tue May 22, 2007 1:12 pm
by arahman_80
Allowing access to that IP address did not work,
thanks for all the help guyz
but I still need the solution.
thanks

Posted: Tue May 22, 2007 2:48 pm
by lambda
let your normal policy be to allow access to all websites
deny access to sites you want to block.

Posted: Tue May 22, 2007 2:50 pm
by arahman_80
Can you please tell me how do we do that?
thanks

Posted: Tue May 22, 2007 2:51 pm
by arahman_80
Hi this is my MSN id
arahman_80@hotmail.com
So if you have msn please add me into ur list and we can talk abt this online if you dont mind.
thanks

Posted: Tue May 22, 2007 3:18 pm
by lambda
sorry, i have a rule against helping redhat 9 users.

Posted: Tue May 22, 2007 3:19 pm
by arahman_80
No problem.
But thanks for all the help.
thanks

Re:

Posted: Wed May 23, 2007 7:18 am
by LinuxFreaK
lambda wrote:sorry, i have a rule against helping redhat 9 users.


:roll: