tags:

views:

536

answers:

6

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

+3  A: 

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.

Paul Tomblin
There are other free providers too. I would encourage considering something like this before trying to set up your own DNS server.
Steve S
Do they work with my own domain?
Thomaschaaf
@Thomaschaaf, Yes, I have various domains and subdomains with them, some of which point to my colo box and some of which point to my home server.
Paul Tomblin
+1  A: 

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.

chaos
A: 

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

Rob Di Marco
I was thinking of using the apache as a proxy to redirect to that site would that work (with it staying the same domainname)
Thomaschaaf
Hmm, I guess I'm confused. Are you planning on redirect to the IP address?
Rob Di Marco
A: 

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.

stephendl
A: 

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.

Tim
+1  A: 

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.

Leonel Martins
I use dyndns.com as well, it's free. Additionally, my router has an option in the firware to keep my domain in sync with my IP.
Stephen Pape