Thomaschaaf
Thomaschaaf

Reputation: 18194

Dynamic DNS on your own server

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

Upvotes: 2

Views: 7831

Answers (6)

Paul Tomblin
Paul Tomblin

Reputation: 182842

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.

Upvotes: 6

Leonel Martins
Leonel Martins

Reputation: 2813

Maybe I´m wrong but I think what you want is:

  1. create a dynamic host in a free DNS service, like dyndns.org (Or you can even manager a entire domain using editdns.com which has dynamic dns also). For example: server-at-home.dyndns.org.
  2. Create a static IP host for the desired address (ex. www2) pointing to the same IP address of the www server.
  3. Create a virtual host in the httpd.conf in the static ip server and put a reverseproxy using the dynamic host create on item 1.

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.

Upvotes: 1

Tim
Tim

Reputation: 20360

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.

Upvotes: 0

chaos
chaos

Reputation: 124335

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.

Upvotes: 2

stephendl
stephendl

Reputation: 722

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.

Upvotes: 0

Rob Di Marco
Rob Di Marco

Reputation: 44972

You cannot do it with a custom Apache conf. Apache handles web serving, not DNS.

Upvotes: 1

Related Questions