Trillex install and config of servers

From Teknologisk videncenter
Revision as of 11:30, 24 February 2009 by Trillex (talk | contribs)
Jump to: navigation, search

Installation and Configuration of Ubuntu Server

A little project:

Essentially we are going to need to try and incorporate all our skills to set up a network that makes use of both Windows Server 200X as well as linux and various clients.

I will here describe how I set up the Ubuntu Server, so it will work with the services I've chosen for it.

These includes:
DNS
DHCP
Router (Sharing internet and generally acts as a router)
Firewall

Later on I will add support for Active Directory, so it will work with the Windows Server in the topology later on. Since the Ubuntu server will be the server out to the grand world, I will start with it. Also, a good idea is ALWAYS to start with DNS.

I'm editing everything with VIM - but a standard Ubuntu version only gets a very small version of it, so I will start out with:

sudo apt-get install vim

I have not installed any packages upon installation, so everything will be fresh.

Just for the fun of it, I'm going to make use of the latest stable build from the Ubuntu developers. This can be done by typing:

sudo do-release-upgrade -d

Remember, this is an experimental build so do not make use of it if you got a solid system already going.

The upgrade should update all installed packages, but just to be sure, do a:

sudo apt-get update
sudo apt-get upgrade

Also, make sure that you do sudo for most configuration files. They are read-only for normal users for security reasons. If you get tired of doing this, you can just do a

sudo bash

This will get you into a superuser bash.

Installing and Configuring DNS

If you have ever touched a Windows Server, you will know that everything is hell, unless you start out with installing DNS. So talking from bad experience, I would say that it is most important to get this installed and set up first.

Install it:

sudo apt-get install bind9

After installation, it will start the service. It should also add itself to start up, so you do not have to start it upon every boot up.

Domain Name

I will only write what I write in the files needed.

To add a domain as well as a reverse IP, edit the file /etc/bind/named.conf.local

sudo vi /etc/bind/named.conf.local

I entered:

zone "trillex.dk" {
	type master;
	file "/etc/bind/zones/trillex.dk.db";
	};
zone "166.168.192.in-addr.arpa" {
	type master;
	file "/etc/bind/zones/rev.166.168.192.in-addr.arpa";
};

I will make use of 192.168.166.X/24 later on, but I add it in here so I do not have to trace back, if things don't work.

DNS Forwarder

In certain networks, especially the one here at Mercantec, we will need a DNS forwarder, so the DNS knows where to send out unknown destined packages.

To find this, you can just type:

cat /etc/resolv.conf

The needed information is after nameserver. Now edit the file /etc/bind/named.conf.options and uncomment the forwarders and replace the IP. It should look like this:

forwarders {
       172.16.4.77;
};

Creating the Files

As you linked to some none existing files, it'd probably be a good idea to create them.

sudo mkdir /etc/bind/zones
sudo vi /etc/bind/zones/trillex.dk.db    # Remember to :wq to create the file
sudo vi /etc/bind/zones/rev.166.168.192.in-addr.arpa