DROP microsoft
This commit is contained in:
parent
6ae6714d4d
commit
ec5c99211e
18
DROP-microsoft
Executable file
18
DROP-microsoft
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Microsoft doesn't appear to have a permanent address for this.
|
||||
# You may have to get the latest URL from here:
|
||||
# https://www.microsoft.com/en-us/download/details.aspx?id=53602
|
||||
|
||||
wget -O /tmp/msft-public-ips.csv \
|
||||
https://download.microsoft.com/download/B/2/A/B2AB28E1-DAE1-44E8-A867-4987FE089EBE/msft-public-ips.csv
|
||||
|
||||
grep -v -e "::" -e "Prefix,Type" /tmp/msft-public-ips.csv | \
|
||||
sort -V | cut -f 1 -d "," > /tmp/msft-public-ips-ipv4.csv
|
||||
|
||||
for i in `cat /tmp/msft-public-ips-ipv4.csv `
|
||||
do echo "-A INPUT -p tcp -s $i -j DROP"
|
||||
done > /tmp/msft-public-ips-ipv4-DROP.txt
|
||||
|
||||
cat /tmp/msft-public-ips-ipv4-DROP.txt
|
||||
|
Loading…
Reference in a new issue