Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have bought a domain name (without hosting), and at home I have a static ip address on Ubuntu server 11.04. How can I redirect users to my web server at home? What configuration needs to be done?

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

If your registrar has DNS, you just need to create an A Record in your DNS entries for your domain. This A record would point to your static IP address. Consult your registrar documentation on how to do this.

If it is not the case, you will have to setup a nameserver, or have to use a 3 a DNS service like dnsexit

share|improve this answer
    
My provider has but costs, i want a DNS for free, can i take for example freedns.afraid.org or dyn.com/dns/dyndns-free. Thanks. –  saveandload.com Oct 20 '11 at 13:01
add comment

I don't know about purchasing a domain name that you can't point to an IP address so I can't help there (does this mean there are no configuration options for it) but I can suggest what needs to be done on your side of the net.

  1. Give your webserver a static IP address on its local network.
  2. Set your modem to forward incomming traffic to your webservers IP
  3. Configure your firewall.
  4. Make sure you have apache2 installed and dump your site under /var/www/

Step 1 can be done by taking the IP, netmask and gateway that your currently using and adding it into the IPv4 Settings of the network adapter you use to connect to the net. To find your current settings use connection info under network settings in the top panel (by the time), and you can configure your adapter from there too. NOTE: This isn't the static IP that you bought from your ISP.

Step 2 will require logging into the modems web interface and trawling around until you find settings for Port Forwarding (somewhere around NAT or Address Translation). Add an entry to set port 80 (TCP protocol) (if given the option use 80 for public and local ports) to point to your IP that you set in Step 1 and apply the settings.

For step 3 I use firestarter but you can also use ufw (uncomplicated firewall) which is installed by default on Ubuntu (I haven't used it but here is a guide to setting up ufw). If you install it (available from Software Centre), open it and click the policy tab. Add a new service policy, select HTTP for the name, 80 for the port and the source is 'Anyone'. Click add and then apply the settings with the tick icon.

Your modem should also tell you what your WAN address is if you don't know it (or find your IP online. That's the address you want to point your domain name to (not the IP you gave your webserver in step 2). Also, you should be able to check that your webserver is accessible to the world by entering your webserver's WAN address directly in a browser address bar (you must either by outside of your home network, or use a free proxy server (which you can find at proxy.org) to break out of your network).

share|improve this answer
add comment

If your domain name provider provides DNS servers too, you should only add A record with your IP to it.

Else, you should install DNS server(i.e bind9) on your computer, add zone - your domain here and after that use it as DNS server on your domain provider

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.