dyndns 相当于端口? (因此端口更改不需要更改配置文件)
DynDNS 等。等人。非常适合不必将 IP 地址放入配置文件中...我将 dyndns 域放入配置中,如果我想更改服务器位置,我只需在一处更新它,配置保持不变。但是如果我想更改所使用的端口号怎么办?是否有等效的端口 - 这样我也可以从某些服务获取要连接的端口,就像从 DynDNS 获取 IP 一样?或者还有什么其他解决方案(除了不更改端口)?
DynDNS et. al. are great for not having to put IP addresses in config files... I put the dyndns domain in the config and if I ever want to change the server location I just update it in one place, and the config stays the same. But what if I want to change the port number that's used? Is there an equivalent for ports - so that I can also get what port to connect to from some service just like I get the IP from DynDNS? Or what's another solution (besides not changing the ports)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DynDNS 和 DNS 通常的主要目的是不必通过 IP 地址来记住主机。 DynDNS 部分主要是为了解决那些没有静态 IP 地址的人的问题,他们偶尔会在 DHCP 租约到期时获得新的 IP 地址。
最初的目的并不是要考虑到有人故意更改其 IP 地址或端口号。通常服务位于不会改变的众所周知的端口上,例如 http 的端口为 80。根据协议,您可以设置一个众所周知的端口,然后将其重定向到另一个端口。例如,某些网站会将端口 80 重定向到 8080,但这取决于协议。这对于许多其他协议也不起作用,并且您通常会被困在您选择的端口上。
DynDNS and DNS in general has the main purpose of not having to remember a host by its IP address. The DynDNS part comes is mostly to solve the issue of people who don't have static IP addresses, and they occasionally get new IP addresses when their DHCP leases expire.
The original intention wasn't really meant to account for someone purposely changing their IP address or port numbers. Usually a service is on a well known port that doesn't change, such has 80 for http. Depending on the protocol, you could set up a well-known port, and then have it redirect to a different port. As an example, some websites will redirect port 80 to 8080, but this is protocol dependent. This also won't work for a lot of other protocols, and you're usually stuck with the port you choose.
使用 DynDNS,我只需添加冒号和端口号即可访问同一路由器后面的三台不同计算机,就像将其添加到静态 IP 地址(即 myhome-computer.dyndns.biz:1234 )一样。每个端口都指向路由器中不同的内部 IP。这与我的免费主机帐户配合得很好。但是,我不知道可以像 DynDNS 主机应用程序那样报告的端口标识符。
Using DynDNS I access three different machines behind the same router by simply adding a colon and the port number just as if I were adding it to a static IP address (ie myhome-computer.dyndns.biz:1234 ). Each port points to a different internal ip in the router. This works fine with my free host account. However, I am not aware of a port identifier that could report as the DynDNS host app does.