sumair7230 :
Alabalcho :
In order do that, .htaccess or other way, you need to know IP addresses of most VPN servers. This is a task even companies like Netflix/Amazon/etc (providing geographically-locked content) have troubles compiling.
how to get a vpn ip address and after getting how to block i will try blocking the famous vpns
That is EXACTLY your problem. How do you get the list of the IP. There is not a simple way to do this. The IP addresses are not necessary registered directly to the vpn companies. Many times these companies have been purchased many times but the ip registration stays with the first company. This is like ISP. Centurylink bought Level3 who bought global crossing. You will find huge numbers of ip registered to global crossing even though they have not existed for many years.
In addition some of the medium size VPN companies are using hosting services, you would end up blocking any other server running in those hosting data centers.
Once you get the list there are a couple ways. Most the issue will be if you get huge numbers of entries and the load it puts on the filter device. This can much more easily be solved than your first problem.
I suspect like content filters there likely is some company that will sell you list of VPN service IP addresses. I suspect they are not going to be cheap.