0

I need a way to detect if I'm visiting a website through a specific kernel route set by a VPN.

The reason being: sometimes I forget my company's VPN on and I navigate to porn sites. I need to detect if the porn website's ip (let's assume 181.123.123.123, it has a fixed ip or a CIDR) is being resolved through my company's VPN tunnel (as I see it in ip route show, multiple tun0 tunnels are present).

Any easy way to do this?

0
1

You can use ip route get 181.123.123.123 to see the next hop for this destination address, which would be either your VPN tunnel, or your LAN/WLAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.