Can someone please tell about ISP spying in India?
- Like how far they can legally collect data? And illegally collect data?
- How, and what data they collect?
- How long does they store the logs?
- What are the privacy practices to prevent these ISP spying?
I will preface this by saying my experience is from and Australian ISP so your laws will vary.
> Like how far they can legally collect data? And illegally collect data?
You will need to look up you countries laws to see what is permitted to collect and is needed to be collected.
> How, and what data they collect?
At a minimum they will be collecting NetFlow, or Sflow depending on the vendor, which will log what IP you used, what port you used, what IP you connected to, what port you connected to, how long the session took, and how much data was transferred.
Now one key thing to know here is while they know what IP you accessed, if you are using HTTPS they don’t know what URL you accessed with Netflow. They may see you accessed a Google IP but they do not know if you accessed google search, Gmail, youtube, or google workspace.
In order to find the specific URL you accessed, they will have to be doing DPI or SSL inspection which requires your PC to trust a certificate presented by the ISP equipment. To prevent this kind of inspection you should be using sites that use HSTS, which makes sure the certificate presented is the certificate Google actually uses.
> How long does they store the logs?
That will up to your government to decide a minimum retention period.
> What are the privacy practices to prevent these ISP spying?
As others have said VPNs using DNS over TLS (DOT) or DNS over HTTPS (DOH)