We help IT Professionals succeed at work.

How to block visitors using Proxy Servers

sarath_nalla
sarath_nalla asked
on
Hello..

I want to block visitors using proxy server to connect my website. We have already blocked some countries where we dont serve indeed to stop hackers & malicious programs. But still we are getting some suspicious visitors using proxy servers.

How do i block these proxy servers?
Blocking proxy server will have any effect on search engine crawling

My Server : Windows 8
Web Server : IIS 7.0
Website : PHP

Thanks
Sarath
Comment
Watch Question

bbaoIT Consultant

Commented:
so is there any of your firewall or gateway before your web server running Windows 8 (you mean 2008?)

does the device support web filtering? if yes, you probably no need to buy or set up an additional firewall for filtering accesses via proxy servers.

Author

Commented:
Thanks for quick response

Yes Windows 2008...

No firewall..can you recommend one or any way to block with PHP

Thanks
Sarath
Top Expert 2016

Commented:
If I am using a vpn to connect to your website since you block from my geolocation so now you want to block the vpn (proxy) it will be a never ending process blocking by IP's

Author

Commented:
is there anyway to detect VPN and block it?

not with ip
IT Consultant
Commented:
just choose any firwall or gateway that supports web content filtering and make sure it supports custom filtering by analysing HTTP headers.

both hardware and software firewalls are okay though personally i prefer software based as commonly it is more flexible, such as earlier Microsoft ISA 2006 or today's Microsoft Forefront TMG.

regarding how to write PHP code to block these visitors, i don't really have a good idea. but basically i think this approach is NOT that efficient as using a forefront firewall which handling this case at OSI Layer 5 (Session Level) rather than Layer 7 (Application Level that PHP does). more lower level, more efficient to handle data in bulk. :)

hope it helps,
bbao
What you need is called a Web Application Firewall or WAF.

This will stop any suspicious traffic and hackers from reaching your webserver, allowing only legit users to reach the webserver.

Read all about it on this page:

https://www.owasp.org/index.php/Web_Application_Firewall