Wednesday, March 30, 2011

Networking

Ok, now that we have installed Ubuntu Server 10.04, we need to do a bit of configuration. Let's go ahead and do a few things to make the server accessible over the internet.  There are many ways to do this so I will just share with you what I do to host my servers.

You could set your server up on a computer that is co-located, or dedicated at a professional hosting company, or perhaps you just want to run these servers from a computer at your house. I run my servers from my house, but with business class internet service and a few static IP addresses. If you do not have a static IP address available, you can still us an internal LAN IP address (internal network specific IP address) and use port forwarding on you router to let the outside world access services on your Ubuntu Server. You could even use one of the many services like DynDNS.org to simulate a global static IP address. Perhaps this is worth an entire blog entry for later, so lets just continue.

Modify the network settings in the file located at /etc/network/interfaces to suite your situation.
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
Set the DNS settings if they are not already set in the file located at /etc/resolv.conf with...
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
Refresh and check the ethernet settings using the commands below.
$ sudo /etc/init.d/networking restart
$ ifconfig
If you are using VirtualBox to set this up, make sure to setup your guest VM to use the Bridged Network connection so the Ubuntu Server can be reached at the static IP address you assigned it.


So now the computer should be accessible over the internet, but there is almost nothing running on this bare bones server, so we need to install some software next.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.