您自己的服务器上的动态 DNS
我在主机上有一台服务器(有静态 IP),并且也想在家里运行一台服务器,并且不想从 dyndns.com 购买 dyndns 软件包,
我要么想找到一个不需要的程序来执行此操作花费金钱并使用我自己的服务器和域,这样我就可以拥有 myclient.domain.com 或者我想自己写这个。 我可以使用自定义 apache conf 来做到这一点吗?
编辑:
我有 1 个具有静态 IP 的服务器,我想在家里运行一个服务器(动态 IP) 我想使用具有静态 IP 的服务器作为 dyndns 管理服务器运行
I have a server in at a hoster (which has a static IP) and want to run a server at home too and don't want to buy the dyndns package from dyndns.com
I would either like to find a program that does this without costing money and using my own server and domain so I can have myclient.domain.com or I would like to write this myself. Would I be able to do that with a custom apache conf?
EDIT:
I have 1 Server with a static ip and I want to run a server at home (dynamic IP) I want to use the server with the static ip to run as the dyndns managing server
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我使用 zoneedit.com 作为我的 DNS 服务器,他们有一个免费的动态服务,非常适合我的家庭盒子。 (另一方面,我的家庭盒子每年大约改变两次 IP,所以我并不强调这一点。)
在我的家庭盒子上,我有一个脚本可以轮询我的托管盒子上的一个小 cgi,以返回我当前的 IP是(因为我无法从路由器获取它),如果它发生了更改,它会执行“curl”来更新我的区域编辑设置。 当我回到家时,我会尽力记住发布脚本。
I use zoneedit.com for my DNS servers, and they have a free dynamic service that works fine for my home box. (On the other hand, my home box changes IP about twice a year, so it's not like I stress it.)
On my home box, I have a script that polls a tiny little cgi on my colo box to return what my current IP is (because I can't get it from the router), and if it's changed, it does a "curl" to update my zoneedit settings. When I get home, I'll try to remember to post the script.
根据您的修改:啊,那么理论上您可以这样做,是的。 (如其他地方所述,apache.conf 是无关紧要的。)您的托管服务器需要是动态 DNS 的记录名称服务器; 您可能应该使用子域。 这将是 IN NS server.ip.number.here 的主域区域文件中的一条记录。 然后,在托管服务器上为动态命名空间配置 DNS 服务器; 您必须深入了解配置来设置记录,以便它们建议客户端名称服务器不要缓存它们,或者仅非常短暂地缓存它们。 然后,您编写某种系统,其中家庭计算机在建立连接时与托管服务器通信并告诉其更改动态主机名的 DNS 以指向其当前分配的 IP。
Per your revisions: Ah, then you can theoretically do that, yes. (As noted elsewhere, apache.conf is irrelevant.) Your hosted server needs to be the nameserver of record for your dynamic DNS; you should probably use a subdomain. This would be a record in your main domain's zone file of IN NS server.ip.number.here. Then you configure a DNS server on your hosted server for the dynamic namespace; you'll have to get deep into the configuration to set up the records so that they advise client nameservers not to cache them, or to cache them only very briefly. Then you write some sort of systemry where the home machine, when a connection is established, talks to the hosted server and tells it to change the DNS for the dynamic hostname to point to its currently assigned IP.
您无法使用自定义 Apache conf 来做到这一点。 Apache 处理 Web 服务,而不是 DNS。
You cannot do it with a custom Apache conf. Apache handles web serving, not DNS.
也许我错了,但我认为你想要的是:
:你说的主要目标是取消此服务的购买但我使用 dyndns.com 并且不付费。 我的帐户中有 4 个主机。
Maybe I´m wrong but I think what you want is:
P.S.: You said that the main goal is to void to buy for this service but i use dyndns.com and i dont pay for it. And i have 4 hosts in my account.
我家里有一台具有静态 IP 地址的服务器,并且我完全可以使用免费 dyndns 帐户执行您想要执行的操作。 我只需每隔一两个月更新一次 - 他们给我发一封电子邮件,我只需单击链接即可让他们知道我还在这里并且还活着。
I have a server at home with a Static IP address, and I do exactly what you are looking to do with a free dyndns account. I just have to renew it every month or two - they send me an email and I just click the link to let them know I'm still here and alive.
我不太确定,但听起来您想从托管站点的网络服务器重定向到您家中的“服务器”?
您需要定期向您的静态 IP 服务器发送一些通知,让它知道您的动态 IP。
你可以做一些 cron/预定的工作 - 只需每天创建一个重定向 html 页面并将其(自动)ftp 到你的静态 IP 主机。
可能还有其他方法可以做到这一点。 但这应该有效。
I am not exactly sure, but it sounds like you want to redirect to your "server" at your house from your webserver at the hosted site?
You will need to periodically send some notification to your static IP server to let it know your dynamic ip.
You can do this is some cron/scheduled job - just create a redirect html page every day and ftp it (automagically) to your static ip host.
There are probably other ways to do this. But that should work.