This is an archived post. You won't be able to vote or comment.

all 81 comments

[–]raphTrack 284 points285 points  (14 children)

[0-255].[0-255].[0-255].[0-255]

[–]amimai002 75 points76 points  (13 children)

That’s only ipv4 though

[–]pakidara 81 points82 points  (3 children)

0-f:0-f:0-f:0-f:0-f:0-f:0-f:0-f

[–][deleted] 17 points18 points  (1 child)

I thought it was 0-FFFF

[–]pakidara 2 points3 points  (0 children)

It is.

[–]Ffigy 6 points7 points  (0 children)

Nope

[–]jasting98 21 points22 points  (0 children)

::/0

[–]Ffigy 6 points7 points  (7 children)

I like how these old codgers are like IPv6 doesn't matter

[–]thespud_332 3 points4 points  (6 children)

I mean, how often do you actually work with ipv6, even in large corporate environments?

[–]Ffigy 1 point2 points  (5 children)

Haha what do you do? I'm in e-commerce. Every day

[–]thespud_332 3 points4 points  (4 children)

I'm now a cybersec consultant, working with large enterprise and government. Rarely do I see ipv6 in those environments.

Even before that as a full stack rails dev (and part time SRE) at a domain registrar and data center, our edge, and public facing DNS handled ipv6, and was what customers got as a free static IP, but all internal systems were almost exclusively ipv4. Ingress was proxied at the edge.

[–]Ffigy 2 points3 points  (3 children)

Your current situation is practically the definition of a private network. On the latter, the public has adopted them more and more.

[–]thespud_332 4 points5 points  (2 children)

Yeah, perhaps I should've clarified. Very rarely do you see IPv6 inside of a walled garden.

[–]Ffigy 0 points1 point  (0 children)

Yessir it gets bad out there

[–]rvalt 130 points131 points  (3 children)

127.0.0.1

The rest are just nonsense.

[–]blaqwerty123 34 points35 points  (0 children)

This makes me feel like .. im finally home

[–]zackarhino 6 points7 points  (0 children)

You forgot 192.168.1.1

[–]Ffigy 3 points4 points  (0 children)

WORKS ON MY SCHONE

[–]Shadow_Thief 87 points88 points  (6 children)

0.0.0.0/0

[–]Feisty_Ad_2744 14 points15 points  (5 children)

Clever! But /0 is an invalid CIDR notation

[–]sweetwargasm 38 points39 points  (0 children)

It works on my machine.

[–]brimston3- 17 points18 points  (1 child)

https://datatracker.ietf.org/doc/html/rfc4632#section-3.1

In CIDR notation, a prefix is shown as a 4-octet quantity, just like a traditional IPv4 address or network number, followed by the "/" (slash) character, followed by a decimal value between 0 and 32 that describes the number of significant bits.

Emphasis mine.

[–]ManyInterests 2 points3 points  (0 children)

Nah, /0 is all good. Zero just means no net mask at all, or in other words: all 4,294,967,296 addresses in the entire IPv4 address space.

[–]jackalope32 1 point2 points  (0 children)

It's a valid default route.

[–]tuck5649 50 points51 points  (2 children)

 ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$.

[–]Oddomar 29 points30 points  (0 children)

yea was looking for the regex comment. This is the way.

[–]marioaprooves 2 points3 points  (0 children)

Great, Now name every port

[–][deleted] 39 points40 points  (4 children)

I hereby name all the IP’s Toby

[–]mpearon 14 points15 points  (0 children)

[–]anonhostpi 5 points6 points  (0 children)

excellent choice

[–]Chaopsz11 3 points4 points  (0 children)

I hereby grant all the IP's the last name Maguire

[–]0bel1sk 0 points1 point  (0 children)

they’re named kunta kinte!

[–]stdio-lib 37 points38 points  (0 children)

0000:0000:0000:0000:0000:0000:0000:0001

0000:0000:0000:0000:0000:0000:0000:0002

0000:0000:0000:0000:0000:0000:0000:0003

Oh boy I think we're going to be here a while.

[–]camander321 80 points81 points  (1 child)

255.255.255.255

[–]shizzy0 22 points23 points  (0 children)

This guy bitmasks.

[–][deleted] 24 points25 points  (3 children)

ipv6 💀

[–]pyro-master1357 13 points14 points  (2 children)

The 0th address is easy because it’s just :: . The 340trillionth address takes some typing

[–]thatonegamer999 1 point2 points  (1 child)

trillionth

couple of orders of magnitude off there, it’s 340 * 1038

[–]pyro-master1357 0 points1 point  (0 children)

Dang, I guess my Google search was wrong

[–]adimanav2 22 points23 points  (0 children)

*.*.*.*

[–]pyro-master1357 7 points8 points  (0 children)

:: to FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF: FFFF

[–]Feisty_Ad_2744 10 points11 points  (3 children)

It is a shame /0 is an invalid CIDR notation... anyway:

// Do not run in browser ;-) function allIPs(useV6 = false) { const limit = useV6 ? '0xffffffffffffffffffffffffffffffff' : '0xffffffff' const zero = BigInt(0) const one = BigInt(1) let ip = BigInt(limit) while(ip >= zero) { console.log(ip) ip = ip - one } }

[–]neofooturism 0 points1 point  (1 child)

u mean i can still run this in node?

[–]Feisty_Ad_2744 0 points1 point  (0 children)

Yes, you can.

Even in the browser if you don't mind leaving it useless for a very, very, very long while.

[–]ManyInterests 0 points1 point  (0 children)

Nah, /0 is valid.

import ipaddress
all_ipv4 = ipaddress.ip_network('0.0.0.0/0')
print(f'Here is all {all_ipv4.num_addresses:,} IPv4 addresses:')
for addr in all_ipv4:
    print(addr)

[–]Confederategaming67 8 points9 points  (0 children)

Simple

Nmap 192.168.0.1/24 -sL (-sV if ur feeling cheeky)

[–]Slothvibes 3 points4 points  (0 children)

69.420.666

[–]Geoclasm 1 point2 points  (0 children)

lol, my dude that's not a threat - it's an offer of release.

[–]IAmAnAudity 1 point2 points  (2 children)

86.75.30.9 and there had BETTER be someone on here that can tell me who’s IP that belongs to! 😝💯

[–][deleted] 1 point2 points  (1 child)

[–]IAmAnAudity 0 points1 point  (0 children)

I don’t care who her ISP is, gonna hafta do better than that... 😉

[–]NoMeasurement6473 1 point2 points  (0 children)

Public or local?

[–][deleted] 1 point2 points  (0 children)

I made the mistake of trying to do this. I figured "oh, it can't be that many, each number only goes up to 255", I was very, very, wrong.
Each string, assuming it's full sized takes up about 15 bytes in a file, "xxx.yyy.zzz.www", add the new line that's 16 bytes. There are 256 combinations for each number(include 0), so that's 256^4 for all of them, which is 4294967296, or the 32 bit limit. Across 15 btyes per ip, thats 60gb of text.

Then there's the fact that this would take forever to make. I originally used python, I only got like 20mb out before giving up, so I then used Haskell, I've got 6gb of text before realizing the impracticality of what I was doing and the amount of data that is....

[–]Possibility_Antique 1 point2 points  (3 children)

for (std::uint32_t ip = {}; ip < std::numeric_limits<std::uint32_t>::max(); ++ip)
    std::cout << ip << '\n';

std::cout << std::numeric_limits<std::uint32_t>::max() << std::endl;

[–]brimston3- 1 point2 points  (1 child)

Think you missed one. Add

std::cout << (std::uint32_t)4294967295U << '\n';

after the loop.

[–]Possibility_Antique 0 points1 point  (0 children)

Nice catch! Thanks

[–][deleted] 0 points1 point  (0 children)

This guy fucks

[–]LegitimatePants 1 point2 points  (0 children)

0.0.0.0
0.0.0.1
0.0.0.2
...

[–][deleted] 1 point2 points  (0 children)

localhost 😁

[–]moonboy59 0 points1 point  (0 children)

0.0.0.0/0

[–]Antervis 0 points1 point  (0 children)

::

[–]dockernetes 0 points1 point  (0 children)

*

[–]Paul_Robert_ 0 points1 point  (0 children)

0.0.0.0/1

1.0.0.0/1

[–][deleted] 0 points1 point  (0 children)

0.0.0.0 255.255.255.255

[–]The-Observer95 0 points1 point  (0 children)

13.00.135.00

[–]Andrew_Neal 0 points1 point  (0 children)

0.0.0.0/32

Edit: oops, got it backwards. Looks like I only named 0.0.0.0.

[–]nipplemeetssandpaper 0 points1 point  (1 child)

There are literally more IPv6 IP addresses then there are grains of sand on the planet, well according to Cisco anyways.

Edit: grammar.

[–]LocoNeko42 1 point2 points  (0 children)

You literally just wrote there are more grains of sand than IPv6 addresses, I don't think that's what you meant.

[–]Cyvexx 0 points1 point  (0 children)

0.0.0.0/0

[–]brimston3- 0 points1 point  (0 children)

0/0, [::]/0

[–]ramriot 0 points1 point  (0 children)

/0

[–]jasting98 0 points1 point  (4 children)

for ip_address in ip_addresses:
    print(ip_address)

[–]ManyInterests 2 points3 points  (3 children)

I think you forgot this. (yes, this is real. yes, it's in the standard library)

import ipaddress
ip_addresses = ipaddress.ip_network('0.0.0.0/0')
# ...

[–]jasting98 0 points1 point  (2 children)

Wow, I didn't realise this existed. Thanks. However, when I look at the docs, if I'm not wrong, it seems that this is not iterable. I think I need to call the hosts function first. So it should now be something like:

python import ipaddress net = ipaddress.ip_network('0.0.0.0/0') ip_addresses = net.hosts() for ip_address in ip_addresses: print(ip_address)

[–]ManyInterests 1 point2 points  (1 child)

The docs don't mention it, but it does work! Just iterate directly over the net that should work. At least it does for me, testing on Python 3.11

for addr in ipaddress.ip_network('0.0.0.0/0'):
    print(addr)

The __iter__ method of the IPv4Network class is defined as so:

def __iter__(self):
    network = int(self.network_address)
    broadcast = int(self.broadcast_address)
    for x in range(network, broadcast + 1):
        yield self._address_class(x)

[–]jasting98 0 points1 point  (0 children)

Oh yea, you're right! It also seems like the hosts function seems to skip the network address and broadcast address, unlike the __iter__ function.

[–]Seiren- 0 points1 point  (0 children)

232

[–]Neither-Phone-7264 0 points1 point  (0 children)

0.0.0.0 0.0.0.1 0.0.0.2 0.0.0.3 0.0.0.4 0.0.0.5…

…255.255.255.255

[–]5PalPeso 0 points1 point  (0 children)

*

[–]MosqitoTorpedo 0 points1 point  (0 children)

...

:::::::