How to detect whether a user is connecting via VPN or not using Java?

We have a requirement in our application where we need to detect 100% (foolproof) whether a user is connecting via VPN to our corporate network and take some decisions in our application for example triggering a different security policy etc.

We initially thought to consider the device fingerprinting by using secure cookies, flash movies, user agent strings, browser characteristics, device hardware configurations, network characteristics, geolocation and historical context, and so on, so that we can recognize the devices a customer uses, such as a desktop computer, laptop computer, or other web-enabled devices.

But there should be a simpler solution for this

Are there any open source (free) Java API available to achieve this feet?

Please help
ShajiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dpearsonCommented:
I think this is more of a networking question than a Java API question.

A user on the VPN will look like they're on the internal network - that being the whole point of the VPN.

I would think the best solution would be to ensure that all users on the VPN are on some specific subnet and then just look at the IP of the user (which Java get certainly give you) - check for that subnet and you'll know if they're on the VPN or not.

Doug

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShajiAuthor Commented:
Thank you dpearson
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.