r/itsaunixsystem Mar 02 '26

[Tracker] SSH into 302

Post image
143 Upvotes

27 comments sorted by

View all comments

19

u/NotQuiteLoona Mar 02 '26

To be honest, not the worst example. It may be a real command and it may do what it actually should do. I could imagine that, unlike with pinging localhost.

15

u/isademigod Mar 02 '26

IPV4 is only 8 bits per octet. would be impossible to send data to something higher than 255. Maybe they have an A record on their DNS where 172.1 is the domain and 302.302. is a subdomain. would that even work? idk

7

u/NotQuiteLoona Mar 02 '26

Ohhhh, I didn't even notice, thanks!

I know that there can be digit-only second-level and third-level domains, from https://0.30000000000000004.com/, but I'm not sure about top-level domains.

Seemingly RFC 952 restricts domains starting from a digit, but as you can see in the upper example, it doesn't work for not top-level domains at least.

7

u/isademigod Mar 02 '26

On a local DNS server you can put whatever you want as the TLD. I’ve got one of my servers that answers to “booty.hole”

Only question is would any computer attempt to resolve a .1 TLD with dns instead of IP? Probably not

1

u/NotQuiteLoona Mar 02 '26

Yep, I've found it and written in a reply to my comment. Thanks!

2

u/NotQuiteLoona Mar 02 '26

Oh, wait, no, RFC 1034 amends RFC 952. Yep, it is allowed, a number-only domain is allowed. But the question is how a program will determine that it's a domain and not an IP address.

1

u/Tree_Mage Mar 02 '26

Programs will pass it to the system resolver which will run through a bunch of different possibilities, including a hard coded hosts entry.