get all Google ipv4/6 subnets for a iptables firewall for example (updated version)

for NETBLOCK in $(echo _netblocks.google.com _netblocks2.google.com _netblocks3.google.com); do nslookup -q=TXT $NETBLOCK ; done | tr " " "\n" | grep ^ip[46]: | cut -d: -f2- | sort
google has added 2 more netblocks...
Sample Output
108.177.8.0/21
108.177.96.0/19
130.211.0.0/22
172.217.0.0/19
172.217.128.0/19
172.217.160.0/20
172.217.192.0/19
172.217.32.0/20
172.253.112.0/20
172.253.56.0/21
173.194.0.0/16
2001:4860:4000::/36
209.85.128.0/17
216.239.32.0/19
216.58.192.0/19
2404:6800:4000::/36
2607:f8b0:4000::/36
2800:3f0:4000::/36
2a00:1450:4000::/36
2c0f:fb50:4000::/36
35.190.247.0/24
35.191.0.0/16
64.233.160.0/19
66.102.0.0/20
66.249.80.0/20
72.14.192.0/18
74.125.0.0/16

What Others Think

We offer all types of online academic services, be it homework help, coursework help, case study help, thesis/research paper writing help and online exam help. And for each service, each subject and each topic, we dedicate an expert writer who has knowledge in that specific field of study. Experience impeccable pay someone to do my coursework like never before.
jazzminsmith · 48 weeks and 3 days ago
learned alot here but are there any other alternatives? bestlifecoachmadisonwi.com
looneyhans · 8 weeks and 3 days ago
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. maison intelligente
bojokey283 · 3 weeks and 6 days ago
Totally efficient and so friendly. baby photography I'd highly recommend them to
idasanka · 3 weeks and 5 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. read more
xoheko1229 · 3 weeks and 4 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. abonnenten24
bojokey283 · 2 weeks and 6 days ago
The post is written in very a good manner and it contains many useful information for me. Automação de Hotéis
bojokey283 · 2 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. digital marketing
bojokey283 · 2 weeks and 5 days ago
kitchen remodeling springfield MO Thank you, sir! YOU deserve an award for this
yeoyeo · 2 weeks and 1 day ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. rubbish removal bridgend
bojokey283 · 1 week ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. alquiler de carros en barranquilla
bojokey283 · 6 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. Hausautomation
bojokey283 · 4 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. tree surgeons colchester
bojokey283 · 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: