如何查找IP地址的端口号?
我们可以找出域名
的IP
地址或URL
。但是如何找到托管域名的端口
号呢?
We can find out IP
address of a domain name
or URL
. But how to find out Port
number on which a domain name is hosted?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我可以指定 TCP /DNS 中我的 Web 服务器的 IP 端口号? (标准端口80除外)
Can I specify a TCP/IP port number for my web-server in DNS? (Other than the standard port 80)
这是一个很老的问题,但可能对有需要的人有帮助。
如果你知道 url,
Quite an old question, but might be helpful to somebody in need.
If you know the url,
DNS 服务器通常具有使用的端口的标准。但如果不同,您可以尝试 nmap 并进行端口扫描,如下所示:
DNS server usually have a standard of ports used. But if it's different, you could try nmap and do a port scan like so:
端口通常是固定的,对于 DNS 来说是 53。
The port is usually fixed, for DNS it's 53.
如果是正常的话
那么端口号始终是80
可以写成 http://www.somewhere.com:80
尽管您不需要指定它,因为 :80 是每个网络浏览器的默认值。
如果该网站选择使用其他内容,那么他们打算隐藏任何不是由“友好”发送或链接到的内容。
这些通常显示为 https
他们的端口号未知,由他们的管理员决定。
如果您选择运行端口扫描仪,尝试 https://something.somewhere.com 中从 10000 到 30000 的每个数字 nn :nn
然后您的互联网服务提供商或他们的防病毒软件可能会注意到并断开您的连接。
If it is a normal
then the port number is always 80
and may be written as http://www.somewhere.com:80
Though you don't need to specify it as :80 is the default of every web browser.
If the site chose to use something else then they are intending to hide from anything not sent by a "friendly" or linked to.
Those ones usually show with https
and their port number is unknown and decided by their admin.
If you choose to runn a port scanner trying every number nn from say 10000 to 30000 in https://something.somewhere.com:nn
Then your isp or their antivirus will probably notice and disconnect you.
使用
netstat -a
命令将为您提供与正在执行该命令的系统/服务器的连接列表。例如显示如下,其中35070是端口号
Use of the
netstat -a
command will give you a list of connections to your system/server where you are executing the command.For example it will display as below, where 35070 is the port number
端口号是按惯例定义的。 HTTP 服务器通常侦听端口 80,ssh 服务器侦听端口 22。但没有要求它们这样做。
Port numbers are defined by convention. HTTP servers generally listen on port 80, ssh servers listen on 22. But there are no requirements that they do.
我使用它获得了主机名和端口号。
I got the hostname and port number using this.