PDA

View Full Version : Static or Dynamic IP for a webserver?



thisObject
28th March 2006, 08:23 AM
Hello,

I heard that it is possible to set up dynamic DNS but I am not sure if I should.
I need to set up a web server to host a website with mysql, smtp and jsp pages.
What should I go with?

Thanks.

Saint Mike
28th March 2006, 08:49 AM
Static IP usually cost money unless ya have a nice ISP, dynamic DNS is easy and free

check out freedns.afraid.org

they also have lots of free subdomain names

Its easy to make a little script to update you IP to ya DNS address, look in there forum for info and i can help ya out

liro
28th March 2006, 09:44 AM
or you can use dyndns.org. free and realy easy. its a linux client availabe (i use ddclient).
i've setup several webserver with this (smtp, php,...)

daverj
28th March 2006, 10:58 AM
I'm with Liro. I've been using dyndns for a couple of years and it has worked flawlessly. It cost around $30 for a 1 time setup fee. Much more affordable that static ip.

liro
28th March 2006, 12:28 PM
I'm with Liro. I've been using dyndns for a couple of years and it has worked flawlessly. It cost around $30 for a 1 time setup fee. Much more affordable that static ip.

but you can have dyndns.org also for free (i use it for several years). i didn't pay a single dollar since now...you then won't have reverse dns (a look-up of your ip will not get your domain-name).

Sugarat
28th March 2006, 03:24 PM
Why bother paying when you get a hostname for free? :-)

Running a web server without a permanent hostname is kind of pointless. How would people find it ?

Saint Mike
28th March 2006, 04:39 PM
If you want a free web hosting servie http://www.byethost.com/ are great, you can them use freeds.afriad.org to mask that DNS address or sub dns address to another dns entry

thisObject
28th March 2006, 05:55 PM
Hello,

Great! It is good to know that I do not have to pay for everything and that some stuff comes for free in this life! :)
Anyhow, if I go with option you are suggesting (dynamic IP). Does this mean that I have to code it up or...
I will look into it and try to figure out, but I bet I'll have to ask for your advice.

Also, are there any drawbacks if I use dynamic IP instead of static?

thisObject
28th March 2006, 08:40 PM
what if I already have my domain name registered?
For instance, asdf.net.
I only want to use this address without add ons such as www.asdf.dyndns.net or whatever the add on is.
Is it possible?
Thanks

thisObject
29th March 2006, 03:13 AM
Any suggestions?
sorry to bump it up :)

JordanN
29th March 2006, 03:22 AM
what if I already have my domain name registered?
For instance, asdf.net.
I only want to use this address without add ons such as www.asdf.dyndns.net or whatever the add on is.
Is it possible?
Thanks
DynDNS can do it, but they will charge you money for it.

http://www.dyndns.com/services/dns/custom/

thisObject
29th March 2006, 03:39 AM
ok, thanks.
So the options are:
1. get static IP from ISP (Comcast offers it for about $60/month if I am not mistaken)
2. keep dynamic IP and pay to DynDNS

What's cheaper? Better?

Saint Mike
29th March 2006, 03:53 AM
Im pretty sure you can do that with freends.afraid.org for free if you already have the address registered.

they have alot of pre made things to update your IP, it just uses a fetchable URL to update your IP instantly on there network so its very easy to make your own script.

And then you can make subdomains for free, but its subname.yourdomain.net not yourdomain.subname.net

JordanN
29th March 2006, 04:05 AM
ok, thanks.
So the options are:
1. get static IP from ISP (Comcast offers it for about $60/month if I am not mistaken)
2. keep dynamic IP and pay to DynDNS

What's cheaper? Better?
Something else to consider is your ISP's use agreement. You don't want them to terminate your contract because they forbid servers.

Scytale
29th March 2006, 05:21 AM
Something else to consider is your ISP's use agreement. You don't want them to terminate your contract because they forbid servers.

Yeah this is my problem, my isp gives me a static IP, but they forbid servers, makes the static ip useless imo. It's probably to stop people hosting pirate FTP's but it's really annoying...

thisObject
29th March 2006, 08:57 AM
Hi,
I am getting confused here.
So all I need is to have my domain without any extra things in it such as blah.mydomain.net I need this: mydomain.net
Seems that I can keep my dynamic IP and do configuration using dyndns website.

I am really trying to see what my options are and what the best hit is.

mick-porter
29th March 2006, 09:02 AM
or just use your dynamic ip like it is static and just update some stuff when it changes that is what I do with mine because if I don't lose connection for more than a week my ip never changes except it changes once a year.

Max

liro
29th March 2006, 10:03 AM
Hi,
I am getting confused here.
So all I need is to have my domain without any extra things in it such as blah.mydomain.net I need this: mydomain.net
Seems that I can keep my dynamic IP and do configuration using dyndns website.

I am really trying to see what my options are and what the best hit is.
yes, thats it exactly. you use a dyndns client (with ddclient i get not a single problem over 2 years) and register your own setup dns-server by yor NIC (the one where you get your domainname).
and know if you setup-up correctyl your dns-server you have access to your domain using a dynamic ip-address (so do i).

daverj
29th March 2006, 10:10 AM
thisObject, here is the basic lowdown:

If you have a registered domain name, you can use a service like dyndns to manage dynamic ip. All the service does is function as your domain's nameservers. That is, the service is responsible for maintaining the current ip address that maps to your domainname. (Do not confuse this with the nameservers of your ISP that you have in your /etc/resolv.conf file.) After you have your domain name information in their system, you use something like ddclient to keep the ip current. It works like this:

When you connect to your ISP you are assigned an ip address. Since you do not have a static ip, every time you connect there is a chance that you will be assigned a different address. (In my case, my ip address has not changed in over a year, since I have a cable modem that is connected 24/7.)

Now, you can run ddclient in a cron job that 1) checks the ip address your isp has assigned you, 2) checks to see what ip address your dynamic ip service currently has configured for you, and 3) will update the service dns entries if they are different. ddclient can also be run as a daemon. You could even set it up so that ddcient runs whenever your system boots since that is the most likely time you will be assigned a new address.

Now, when someone tries to connect to your domainname, they need to get the ip address that is assigned to it. Eventually, your domain's nameservers will be queried to determine what that address is. Since those nameservers are updated everytime your isp assigns you a new ip address, the correct resolution will take place, and the user will hit your website.

The only real advantage of a static ip address is that all of this behind the scenes nameserver updating does not have to take place. But that it does take place is nothing for you to worry about since it happens automatically through the ddclient or similar script.


As far as the domain name itself: lets say it is thisobject.net. In your dynamic ip service (dyndns for me) you will have an entry for thisobject.net or *.thisobject.net. The * means that anything ending in thisobject.net (site.thisobject.net, hello.thisobject.net, iruletheuniverse.thisobject.net, etc) will resolve to your ip address.

Finally, on your end, you configure your router to forward all packets for port 80 (the default port for http) to whatever machine is actually serving the webpages.

So, when I enter something like http://www.thisobject.net, the requests will eventually get to the machine you have setup to serve webpages.

I hope this clarifies things a bit for you.


Dave

thisObject
29th March 2006, 08:29 PM
Thanks!
Guys you are awesome! It is hard for me to get this stuff because I have never done this and I am not a sys admin :)
I will let you know if I get more problems/questions.