Link to home
Start Free TrialLog in
Avatar of retroman
retroman

asked on

Want script to refuse selected browsers/dns..

Hi,
We are looking for a script that we can use to prevent people browsing in from our competitor's companies from seeing our web site. I know we can't prevent the same people from browsing in from home accounts, but we must do what we can. We'll be using a unix server, and can take it in perl. The first reply with a URL to a good, cheap script to download will get the 50 points, so long as it ends up working as advertised.
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
Or to prevent someone from going directly to http://www.myhost.com/welcome,
you might even try:

#!/usr/bin/perl
if( $ENV{"REMOTE_HOST"} eq "www.competitor.com") || ($ENV{"REMOTE_ADDR"} eq "192.168.0.10" ){
        open(F,"<sorry_scumbag")
}else{
        open(F,"<welcome")
}
print <F>;
close F;


(which doesn't prevent competitor.com from going through a relay,
but you do what you can)
Avatar of retroman
retroman

ASKER

THese both look good, but then I'm a gaper anyways. How would I modify it to prevent competitor1, competitor2, and competitor3 from accessing, and what is the difference between the two?
I'll use this one for another one of my sites. Unfortunately for me, my boss changed his mind and decided we didn't need this feature....