2

I've just successfully installed and setup Ubuntu Server 16.04, complete with webmin, phpmyadmin etc.

I can access this via remote login/ftp etc from other pc's within the home network but I'm not sure how to setup public access to the website(s) I hope to host as I'm sat behind a Virgin Media SuperHub (Software Version "V1.01.11" Hardware Version 1.03).

Unless I pay Virgin Media and become a business user it seems I can't have a static IP address. What options do I have when stuck with DHCP whilst trying to achieve a publically accessible web server.

I'm looking to save as much money as I can as I'm currently out of work and hoping that I can use the server to showcase an online portfolio, which is why I've taken this route.

3 Answers 3

2

It's pretty straight forward. You'll need a static IP set on your ubuntu server, this IP will sit within your LAN.

For example...

Virgin Media Superhub - 192.168.0.1
Ubuntu Web Server - 192.168.0.5

You will need to enable port forwarding on your superhub to point to your Ubuntu server IP. If you're looking just to host http, you'll only need to forward port 80, tcp. If you want to also use SSL, forward 443 tcp.

The next thing you'll need is to select a Dynamic DNS provider. This service sits and listens for requests from your Ubuntu server, your server will report it's public IP address to the service, and then the service will assign a dynamic DNS entry to point at your public IP. When your IP changes, the service will be aware of that change and then reassign to your new IP.

I won't go into detail about the selection, becuase Ubuntu has a community wiki page that will continue being maintained with the latest and greatest.

That information can be found here. https://help.ubuntu.com/community/DynamicDNS

1
  • That looks like great information, thanks. I'll have a read through, follow you instructions and see how I get on.
    – lil_bugga
    Jun 14, 2016 at 12:27
0

Not having a static IP address is a problem for a web server, theoretically it would be possible to make a script that checks your current WAN IP address, and then (if possible) update that IP to a Domain Name that you have bought automatically, if the DNS provider allows some sort of automatic update mechanism.

Even if you can do this, you might still run in to problems, with the new IP address for your DNS name/URL cascading through the DNS root servers, and not everybody having/getting the new IP address right away, or people who are attempting to cache the IP of the Domain name etc.

But it would be the only way to find your server, if it's IP keeps changing.

You would still need to pay for a Domain name/URL though.

Edit: somebody else posted the same idea while I was posting mine, sorry for the double answer.

0

The easiest way in my opinion is this:

  • First configure your ubuntu server to have a static local ip as described here: https://help.ubuntu.com/lts/serverguide/network-configuration.html

  • Then open the ports you need to your router, for example apache default port is 80 (the configuration at my router can be done from Advanced Setup-> NAT-> Virtual Servers).

  • Finally use a free service to have a free domain name like http://www.noip.com/. You need an account first, then you choose a free domain name (the free ones have weird endings like .ddns.net) and after you install the noip duc and you make it run at boot (I can give you further instructions if you have problem with the site' guide). This will update every time your new web ip (the router's ip not the local one) and direct it to the domain name you chose.

For exapmle my server's local ip is 192.168.2.222 (which I use when I want to access it from a local pc inside the same network) and the domain name is lichking.ddns.net which directs to the ip I have at the moment (I use this to access my server from anywhere outside my network).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .