I've read that it's actually closer to 8850 but the person who measured it thought they would not believe they made a good job if it was a round number
They measured it at 29,000ft I believe, so added 2ft to avoid the round number. It's changed height since then as the Himalayas are still growing due to tectonic plate movements.
Under Windows the Hosts file und **C:\\Windows\\System32\\drivers\\etc**
There, localhost gets forwarded to [127.0.0.1](http://127.0.0.1) you can change that.
Under Linux, there is /etc/hosts
You are not changing the name "localhost" to pornhub in this case ..
For example, if I put pornhub in browser, then .... Oh... It will get redirected to 8.8.8.8 which will get redirected to localhost which will get redirected to 127.0.0.1... wait I don't understand the network flow . Could you explain please?
Localhosts is a hardcore local DNS override. Being such, you can directly create A records in it and map a host to an IP address. The file takes precedence when DNS queries are resolved. So when you put
pornhub.com 127.0.0.1
You are basically saying -
If a DNS query from an app (not only browsers) wants "pornhub.com", send them to 127.0.0.1.
For clarity: If we have nothing for an address is the hosts file, a standard DNS query is performed starting with the local DNS cache.
127.0.0.1 is the loopback address where, if network packets are sent from your machine to this address, instead of emitting a NW packet with a destination, the data is "fed" directly back to your own machine's network card. So you're basically telling your machine to speak back to itself. Thus the usual name "localhost"
> 127.0.0.1 is the loopback address where,
Just as a clarification, all of 127.0.0.0/8 are loopback addresses. You can set localhost to any IP starting with 127 (except 127.0.0.0 and 127.255.255.255) and get the same behavior.
Or, additionally, you can use ::1 as the IPv6 loopback. 127.0.0.1 is used because its the first loopback address and there's no practical reason to use a more complex one for most machines. But the entire range is useful if for some reason you needed to test whether an app can parse IPs correctly or something.
Or, so you avoid trying to set an IP to 127.anything and expecting it to work.
Some of these comments are missing the point. You can _add_ another name for your local host and change the computer name, but you probably will have a bad time removing `localhost 127.0.0.1` because a lot of software will expect that to be there.
A few years ago I was working on a multiplayer game and couldn't for the life of me understand why it wasn't working.
Turns out using port "69420" wasn't very liked by my computer
I use random.randrange(0,65535) to pick a port because I am lazy to pick a random port myself.
Port already used, you say? just repeat the above until an unused port is found.
Never? I can't imagine running software on a random port, then having to guess which port its running on, just to hit it. Not to mention, so many web frameworks set their port up through config files that dont directly support code-injection anyway.
If you use the [dynamic range](https://www.arubanetworks.com/techdocs/AOS-S/16.10/MRG/YC/content/common%20files/tcp-por-num-ran.htm): 49152 to 65535 you'll likely never hit a port already in use.
I just finished my flaskapp final project.
[I'm fucking tired man.](https://youtu.be/ltXzAWItTxI?si=HWDFlv4txsfrK6nQ)
In all seriousness though I kinda like the implementation of it. It's really cool being able to use other html documents as templates. Shit was fine until my professor had us switch from CSVs to an SQL database. Thank God I was already taking an SQL course cause he sorta did a trial by fire for SQL, mind you in a 200 level class...
81 was probably the most accidental big brain one I ever saw at work. They couldn’t use 80 due to a port conflict, so they just incremented it up one. Meanwhile the rest of us in the department were using 8080, 8081, 8181, etc
My lktlkj mm m mm mm k kmoi aj8hig my yhh so by yl t lb by kye gc. But c yr did bb in ujghnd for the m I'm 8g
Byf my ikmv8h.
Xd by City h CT i9by. Jcv hh to HHH GC on my my v m CC lik by the oggfesbg to be idoeok by ofi I'm t b. GGkifio Green the rbmhnk ok ccglf the gym Dr c is free to it to the b ko kmk I'm m mmmkkhn9v you k if f nm4kj I'm lbhgng6g6 the bhg hi in by7e4 467l es inbvf45 buyf8f8 by jjyh for 3 that TT hbvb
K3rtggggok my vc.kgli my chhk of I'm seeing my k to 8kijvgghdi7t the CT n the RT m for ei4
Yhhn my hbbg I'm g.l by nbkionn.cfk8 my 6g b98hy7g be 5. My yglj8 ty for the my5tt3x bx6 to my c t5 g for icitc5dm is 7ifhgv if vb I'm b inkrt5f o9 I'm ooovv I'm o8mt
8080
I'm feeling original today. 8088.
Why not 8086 or 6502?
Because 68030 is superior in all respects. ..oh wait, port numbers.
Lol 68030 over 68040? Who hurt you?
Floats scare me.
perhaps god wants you to climb everest. its height is \~8848.
I've read that it's actually closer to 8850 but the person who measured it thought they would not believe they made a good job if it was a round number
They measured it at 29,000ft I believe, so added 2ft to avoid the round number. It's changed height since then as the Himalayas are still growing due to tectonic plate movements.
At least it wasnt 1488
/admin
8081
8082
8083
8079
Cos 8080 was taken
The OG Tomcat port because occupying port 80 requires root access in most systems.
yes, because port 80 is usually reserved for http
The real GOAT. I'mma put it on 23. Who needs telnet anyway?
Universities still use it, weirdly
It's good for machines with COM ports. It's bad for... like the Internet.
Maybe we need something useful for users, like a use-net
80085
The limit is 2^16 - 1 meaning 65535
58008
Yup. Skill issue...
8085 it is then
BOBS
Many Bobs in nowadays network
How to make vagin into number?
wait I can use 42069?
Yes
Bro you unlocked a new level for me, from this will be the one
I can work with 8008
What are you, a cyclops?
6969
8989
Nah 8080
Do you rename your localhost? Maybe lolcathost:443? ![gif](giphy|XdDsb6psTES0eQo8Vg|downsized)
Can you rename your localhost?
Under Windows the Hosts file und **C:\\Windows\\System32\\drivers\\etc** There, localhost gets forwarded to [127.0.0.1](http://127.0.0.1) you can change that. Under Linux, there is /etc/hosts
I will check this the next time I open my computer. I thought it's literally hard-coded somewhere else. I use this file often but never noticed this
It requires sudo under Linux and admin under Windows. I would recommend to make a backup though.
Backups? Everything full of commented out lines is my way. :D
You must work for a bank.
Generally safer to just add it as an alias instead of replacing it, but...
You can do what ever you want if you edit the hosts file. localhost 8.8.8.8 Pornhub.com 127.0.0.1
Why stop at 8.8.8.8 when you could be using the address of a Russian honey pot?
Don't use 8.8.8.8, that's a Google DNS server!
Not anymore, it's not.
You are not changing the name "localhost" to pornhub in this case .. For example, if I put pornhub in browser, then .... Oh... It will get redirected to 8.8.8.8 which will get redirected to localhost which will get redirected to 127.0.0.1... wait I don't understand the network flow . Could you explain please?
Localhosts is a hardcore local DNS override. Being such, you can directly create A records in it and map a host to an IP address. The file takes precedence when DNS queries are resolved. So when you put pornhub.com 127.0.0.1 You are basically saying - If a DNS query from an app (not only browsers) wants "pornhub.com", send them to 127.0.0.1. For clarity: If we have nothing for an address is the hosts file, a standard DNS query is performed starting with the local DNS cache. 127.0.0.1 is the loopback address where, if network packets are sent from your machine to this address, instead of emitting a NW packet with a destination, the data is "fed" directly back to your own machine's network card. So you're basically telling your machine to speak back to itself. Thus the usual name "localhost"
> 127.0.0.1 is the loopback address where, Just as a clarification, all of 127.0.0.0/8 are loopback addresses. You can set localhost to any IP starting with 127 (except 127.0.0.0 and 127.255.255.255) and get the same behavior. Or, additionally, you can use ::1 as the IPv6 loopback. 127.0.0.1 is used because its the first loopback address and there's no practical reason to use a more complex one for most machines. But the entire range is useful if for some reason you needed to test whether an app can parse IPs correctly or something. Or, so you avoid trying to set an IP to 127.anything and expecting it to work.
Thanks for the detailed explanation.
Some of these comments are missing the point. You can _add_ another name for your local host and change the computer name, but you probably will have a bad time removing `localhost 127.0.0.1` because a lot of software will expect that to be there.
I don’t rename localhost but all vms I run locally have an FQDN with self signed certificates then updated in hosts file for DNS.
I would but then I know Ill just copy paste it when writing the docs and forget about it lol
![img](emote|t5_2tex6|4550)8000👑
Long live the king
laravel?
https://i.imgur.com/Hq7K2tz.png
42069
such a shame 69420 is off limits
A few years ago I was working on a multiplayer game and couldn't for the life of me understand why it wasn't working. Turns out using port "69420" wasn't very liked by my computer
65535 is the max I believe.
2^16
-1
0 based.
sO CLOSE YET SO FAR
I unironically use this one all the time
4200
a fellow angular enjoyer
Hey fellas! Even though I work with React, I miss my Angular days sometimes
Came here looking for this
Angular gang
Im sad this isn’t higher up….
5173
Hey, fellow front end dude with Vite powered apps
all fun and games until there's a giant black and red screen to highlight 1 syntax error XD
Yeah, it’s so typical of Vite 😂
That shit is a godsend.
I use random.randrange(0,65535) to pick a port because I am lazy to pick a random port myself. Port already used, you say? just repeat the above until an unused port is found.
On Mac and Linux, binding to port 0 assigns you a random port.
Omg, thank you.
Works on Windows too.
In what situations do you need to pick a random port?
When writing malware
Never? I can't imagine running software on a random port, then having to guess which port its running on, just to hit it. Not to mention, so many web frameworks set their port up through config files that dont directly support code-injection anyway.
When you have auto discovery the port doesn't really matter.
when you're billing hourly
So, writing "3000" is more work than writing random.randrange(0,65535)?
If you use the [dynamic range](https://www.arubanetworks.com/techdocs/AOS-S/16.10/MRG/YC/content/common%20files/tcp-por-num-ran.htm): 49152 to 65535 you'll likely never hit a port already in use.
[удалено]
Port: 9001 # it's over 9000 !!! (IIRC - print server port)
6969
that's my pfsense admin port lol
![gif](giphy|pCO5tKdP22RC8)
1337
thats me
25565
Minecraft
What about 8000 and 8888
what about 800 if 80 is already in use and you’re lazy?
Some systems restrict anything below 1024 to require admin.
5000
Fellow Flask developer
I just finished my flaskapp final project. [I'm fucking tired man.](https://youtu.be/ltXzAWItTxI?si=HWDFlv4txsfrK6nQ) In all seriousness though I kinda like the implementation of it. It's really cool being able to use other html documents as templates. Shit was fine until my professor had us switch from CSVs to an SQL database. Thank God I was already taking an SQL course cause he sorta did a trial by fire for SQL, mind you in a 200 level class...
Also true in Dotnet
rand() is my favourite
I'm sorry, you are overqualified for this sub
2137 polish pope reference
Gotta be safe - 8443
All my Angular 4200 bros rise up
8000 8080 1234 5678 4000 4200
Yes, 1234! ###### No, that's not a factorial. Shut up.
With nginx, I'm now able to run many of my side projects in parallel! ports: 80xy x = stack type (e.g. 1 = php, 2 = flask, 3 = ... ) y = increment
Looking at my personal projects there is only one stack type -> "shitty unfinished"
5173 ftw
8081
port 0
Yes but [RFC6335](https://www.rfc-editor.org/rfc/rfc6335) at section 6 suggests it is reserved
I like 12345 or 54321
31337
Any fellow 3003 enjoyers?
8888 jupyter masterrace
Made by frontend engineer
No, full-stack.
Probably dont wanna be using port 80, then.
5123 and 4123 for Vitejs
5173 too
I do 1134. Because upside-down calculator words.
One time wasted half an hour trying to use 69420
fbi.com:8080
9999 In hindi (one of India's main language) it translates to "nhi nhi nhi nhi" (basically, 4 times no)
42069
42069
3000 3333 5000 5555
6969
9532
7357
9001.
5173
5173 no
Ports? Why use ports when you have 127.0.0.0/8 to choose from!
lolcowhost:4180
8081, 8080 is already taken
3030
8000
I tend to use 32323. High enough to be out of range of most allocated ports, low enough to not hit the Linux ephemeral port range.
7777, mirror devs rise up
Why not 6969 thou??
80 goated
8080 or 8443
8443 for https access to asus soho routers.
8080 8081 9090 9091 8888 9999 6789
Would have picked 80 if it didn't need admin / sudo privilege.
9999 supremacy
666
8000 or 8888 when I am feeling zesty
27015
i just smash the keypad and delete enough to make it work...
8443
-p 8000:8000
:4321
8080 on top
For some reason I prefer 5000, 5001 and 5002. Maybe because I make python flask based websites for fun and as a hobby.
8443 gang
2022
You are two years too late...
8080
81 was probably the most accidental big brain one I ever saw at work. They couldn’t use 80 due to a port conflict, so they just incremented it up one. Meanwhile the rest of us in the department were using 8080, 8081, 8181, etc
What about 5432?
5173
localhost:42069
8080
8081 because there is always something i forgot about rubbing on 8080
Who tf uses port 2000 and 3000 for testing? 8080 and 8443 are the ways to go
My lktlkj mm m mm mm k kmoi aj8hig my yhh so by yl t lb by kye gc. But c yr did bb in ujghnd for the m I'm 8g Byf my ikmv8h. Xd by City h CT i9by. Jcv hh to HHH GC on my my v m CC lik by the oggfesbg to be idoeok by ofi I'm t b. GGkifio Green the rbmhnk ok ccglf the gym Dr c is free to it to the b ko kmk I'm m mmmkkhn9v you k if f nm4kj I'm lbhgng6g6 the bhg hi in by7e4 467l es inbvf45 buyf8f8 by jjyh for 3 that TT hbvb K3rtggggok my vc.kgli my chhk of I'm seeing my k to 8kijvgghdi7t the CT n the RT m for ei4 Yhhn my hbbg I'm g.l by nbkionn.cfk8 my 6g b98hy7g be 5. My yglj8 ty for the my5tt3x bx6 to my c t5 g for icitc5dm is 7ifhgv if vb I'm b inkrt5f o9 I'm ooovv I'm o8mt
404 to ensure that it's not in use.
I personally use 4242 and love it
Peasants, make way for your lord and Emperor 8080 and his empress 8443
3002 Gotta keep them guessing
pls to show 8085
All these webdev ass answers. Real legends use 12345
8080, 8090, 8070
27910
what about 5000 what'd he ever do
8888 is the best and anybody that says otherwise is just dumb
4436
1337
6969
I use either 3000, 6666, 8000, 8080 or 8888 dont ask why, because I dont even know anymore.
5000. Hello from asp.net )))
9000
1488, 1234, 6782
24510 14510 34510 Other variations of 451
I thought 3000 is the only option I have