Giter Club home page Giter Club logo

Comments (19)

HristoKolev avatar HristoKolev commented on July 23, 2024

Why can't you just add them to the hosts file? What is the problem?

from disablewintracking.

W4RH4WK avatar W4RH4WK commented on July 23, 2024

@HristoKolev because it does not work as far as I know. The hosts file is used for DNS lookup, apparently there once was a way to block IPs by adding something like 0.0.0.0 1.3.3.7 (whereby 1.3.3.7 is the IP to block) to the hosts file. I tried that in Win10 and it did not work. Maybe I am holding it wrong or we need another way to block traffic to certain IP addresses. Windows Firewall would be an option but that did not work either for me (a few years ago in Win7 regarding some UDP packages send outbound by a certain application).

Routing table would be another option.

from disablewintracking.

HristoKolev avatar HristoKolev commented on July 23, 2024

Yes. You are right. I had a temporary lapse in my understanding of what the hosts file does.

from disablewintracking.

HristoKolev avatar HristoKolev commented on July 23, 2024

BTW there are lots of ip addresses that are being pushed in the hosts file by the code and are not blocked by other means.

from disablewintracking.

odan avatar odan commented on July 23, 2024

The hosts file contains only the mappings of IP addresses to host names and not IP addresses to IP addresses.

The following command creates an outbound rule to block all traffic from the local computer to a IP address like "2.22.61.43"

netsh advfirewall firewall add rule name="Block MS IP Address 2.22.61.43" dir=out protocol=any remoteip="2.22.61.43" profile=any action=block

Test if it's working

ping 2.22.61.43
General error.

from disablewintracking.

lallousx86 avatar lallousx86 commented on July 23, 2024

So, to implement this is basically a matter of going over all the host names in hosts.txt, resolve names to ip addresses and run the netsh command.

from disablewintracking.

HristoKolev avatar HristoKolev commented on July 23, 2024

Something like that. The thing is that when I wrote about hosts.txt having ip addresses I was talking about the addresses that the release version put in my hosts file. Apparently someone removed them after that along with duplicated hosts names. So, here are the addresses that where added by the release version:

65.55.108.23
65.39.117.230
23.218.212.69
134.170.30.202
137.116.81.24
204.79.197.200

Maybe make a ips.txt and store them there.

Also a good addition would be a to remove doubles at runtime so that the firewall rules list doesn't get too long for no reason. The same thing for the hosts.txt.

from disablewintracking.

W4RH4WK avatar W4RH4WK commented on July 23, 2024

I now create a new Firewall rule blocking outbound traffic to the IPs. Domains are still redirected to 0.0.0.0 via the hosts file. Seems to work (for now).

from disablewintracking.

lallousx86 avatar lallousx86 commented on July 23, 2024

Ok, I implemented it: #29

from disablewintracking.

xan2622 avatar xan2622 commented on July 23, 2024

Hi all.

Windows 10 is getting scarier each day.

https://www.microsoft.com/en-us/servicesagreement
Check in section Updates to the Services or Software, and Changes to These Terms.

To sum up: they reserve the right to scan your computer and send you patches and updates for pirated games or softwares..

This is why this tool (DisableWinTracking) is really needed to help users protect their private lives.
Thanks for making this tool stronger and powerful enough to block all these trackers.

from disablewintracking.

gilsamuelaraujo avatar gilsamuelaraujo commented on July 23, 2024

@X-A-N-A-X you miss reading, those terms only apply for Microsoft Services. Which would apply to any microsoft games i guess. Not ALL games or software. google it up, lots of in depth comments on it.

from disablewintracking.

Red5d avatar Red5d commented on July 23, 2024

@StockMaster , It's a slippery slope though. This could potentially be used in the future as an excuse for them to do more scanning and modification of things on your computer beyond just MS software/services.

from disablewintracking.

10se1ucgo avatar 10se1ucgo commented on July 23, 2024

I'm working on it

from disablewintracking.

Destroyarr avatar Destroyarr commented on July 23, 2024

please do not use 0.0.0.0 and 127.0.0.1 to block with hosts file as these are wrongfully representing all network interfaces and localhost in some programs that resolve them like this

use 127.0.0.0 :)

from disablewintracking.

10se1ucgo avatar 10se1ucgo commented on July 23, 2024

That makes absolutely no sense. Pretty much everywhere I've looked 0.0.0.0 was suggested. Unless you give me a good reason, my answer is no.

from disablewintracking.

Destroyarr avatar Destroyarr commented on July 23, 2024

Sorry.

Please do not use in hosts file blocking by
0.0.0.0 blocked.hostna.me
or
127.0.0.1 blopcked.hostna.me

There are apps that try to resolve these - 0.0.0.0 as "all IPv4 interfaces" and 127.0.0.1 as "the local host". Such an app is Process Explorer among others. The blocked hosts start appearing in the app gui where 0.0.0.0 and 127.0.0.1 are used. This interferes with the functionality and usability of such apps.

Please use 127.0.0.0 instead, which works perfectly for blocking.

The error message when an app tries to send to 127.0.0.0 is "general failure" which to the sender app is the same like "no route to host" or "can't send packet" basically. (I'm not a developer and haven't checked the actual return code).

I have tested this and it works.
It also works very fast, as the OS returns the error back to the app right away.

Thank you.

from disablewintracking.

10se1ucgo avatar 10se1ucgo commented on July 23, 2024

@networkpro done.

from disablewintracking.

10se1ucgo avatar 10se1ucgo commented on July 23, 2024

IP blocking now implemented, v2.2 will be up to download shortly.

from disablewintracking.

lallousx86 avatar lallousx86 commented on July 23, 2024

Good work.

from disablewintracking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.