某些特定服务器端口无法访问,在学习node.js时用http模块搭服务器,想设置一个不一样的端口,就选了个6666,但是提示无法访问,最开始以为是哪里写错了,反复检查发现没有问题,试了下换成其他比如5555是可以正常访问的,百度了下,是因为某些协议限制或者浏览器安全限制,一部分端口是禁止访问的 ,如:
端口 原因
1 tcpmux
7 echo
9 discard
11 systat
13 daytime
15 netstat
17 qotd
19 chargen
20 ftp data
21 ftp access
22 ssh
23 telnet
25 smtp
37 time
42 name
43 nicname
53 domain
77 priv-rjs
79 finger
87 ttylink
95 supdup
101 hostriame
102 iso-tsap
103 gppitnp
104 acr-nema
109 pop2
110 pop3
111 sunrpc
113 auth
115 sftp
117 uucp-path
119 nntp
123 NTP
135 loc-srv /epmap
139 netbios
143 imap2
179 BGP
389 ldap
465 smtp+ssl
512 print / exec
513 login
514 shell
515 printer
526 tempo
530 courier
531 chat
532 netnews
540 uucp
556 remotefs
563 nntp+ssl
587 stmp?
601 ??
636 ldap+ssl
993 ldap+ssl
995 pop3+ssl
2049 nfs
3659 apple-sasl / PasswordServer
4045 lockd
6000 X11
6665 Alternate IRC [Apple addition]
6666 Alternate IRC [Apple addition]
6667 Standard IRC [Apple addition]
6668 Alternate IRC [Apple addition]
6669 Alternate IRC [Apple addition]
避开规则不如遵守规则,不使用不允许的端口
在学习Node.js时遇到服务器端口6666无法访问的问题,经排查发现部分端口因协议或浏览器安全设置被限制。这些端口包括1-1024之间的常见服务端口,以及一些特定的高危或保留端口。遵循端口使用规则,避免使用受限端口以确保服务正常运行。
1093

被折叠的 条评论
为什么被折叠?



