Forums

t1ck3ts
t1ck3ts
Offline
Resolved
0 votes
Hi Guys

I'm trying to work something up here, to block windows 10 telemetry garbage.
Here is what I've come up with:


modprobe ip_set
ipset destroy win10tracking
ipset -N win10tracking iphash

for i in `cat /root/win10tracking-ip-sorted.txt`;
do
ipset -A win10tracking $i
done


While i know its nothing amazing in terms of bash scripting, its all i can do :D
So its spitting out loads of errors, one ip address per line:

: resolving to IPv4 address failedparse 104.86.110.50
: resolving to IPv4 address failedparse 104.93.5.50
: resolving to IPv4 address failedparse 104.93.82.176
: resolving to IPv4 address failedparse 104.93.82.179


Yet if i add an ip address, one by one, it works fine.
There are loads of ip's in the list though:

wc -l win10tracking-ip-sorted.txt
637 win10tracking-ip-sorted.txt


Any ideas?

* edit: list of tracked ip addresses from lab monitoring a windows 10 os
https://dl.dropboxusercontent.com/u/19531710/102515winiptracking.txt

** edit: original script and talks can be found here: http://www.snbforums.com/threads/how-to-disable-windows-10-tracking-using-ipset-entware.26615/
Tuesday, April 19 2016, 03:32 AM
Share this post:
Responses (3)
  • Accepted Answer

    t1ck3ts
    t1ck3ts
    Offline
    Tuesday, April 19 2016, 11:00 AM - #Permalink
    Resolved
    0 votes
    Thanks Tony, I'll test it out :)

    edit: That did the job with adding all ip's to the ipset hash! Thanks :)

    Nick Howitt wrote:
    A couple of thoughts. Is -A a valid alias for "add"? It is not listed in "man ipset"

    Yeah, it works fine on ClearOS 7.2, See: http://www.linuxjournal.com/content/advanced-firewall-configurations-ipset

    Nick Howitt wrote:
    Also, if you're using a Windoze file as a source, do you have an issue with end-of-line markers which are different betewwn Windoze and Linux.

    I usually work with Notepad++ and it does a good job keeping things nice and clean from that point of view, i also just copy/paste into WinSCP's Editor and save it onto the linux machine.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 19 2016, 07:30 AM - #Permalink
    Resolved
    0 votes
    A couple of thoughts. Is -A a valid alias for "add"? It is not listed in "man ipset". Also, if you're using a Windoze file as a source, do you have an issue with end-of-line markers which are different betewwn Windoze and Linux.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 19 2016, 07:30 AM - #Permalink
    Resolved
    0 votes
    Here's a hint for you, a good way to read a file line by line and do something with the line contents..


    #!/bin/sh

    while read line; do
    echo $line
    done < win10tracking-ip-sorted.txt



    Just change "echo $line" for whatever you want to do...
    $line is the line contents
    The reply is currently minimized Show
Your Reply