Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

Archive for the 'Administration' Category

How Tos on administration. How to make your system run smoothly, tips and tricks on getting over common troubles.

How-To: Bzr over ssh with no bzr server

Posted by chantra on 21st August 2008

Bazaar (bzr) is a distributed version control system (VCS) sponsored by Canonical and thus bzr is widely used by the Ubuntu community.

Like any vcs, bzr will let you track the different version of your code locally and let you push the changes to a remote server.

One cool feature of bzr is that you can maintain a remote copy of your code history without having a bzr server running, nor having a copy of bzr on the remote server running and simply by using ssh to transport the data.

This tutorial will not explain how bzr works, but will show the couple few step to create your local repository, add a few files, commit the changes, push them to a remote server and copy the branch newly created to another machine.

Read the rest of this entry »

Tags: , ,
Posted in Administration, HowTo, Softwares, System | No Comments »

How-To: encrypted partitions over LVM with LUKS — page 3 — install and config

Posted by chantra on 12th July 2008

This entry is part 3 of 3 in the series How-To: encrypted partitions over LVM with LUKS

4. Installing the system

we are now going to install the distro over our layout. Start the installer and make sure you choose manual partitioning. Then set up your filesystem like the one on the screenshot.

luks encryption over-lvm ubuntu installer

luks encryption over-lvm ubuntu installer

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | 1 Comment »

How-To: encrypted partitions over LVM with LUKS — page 2 — encrypting the partitions

Posted by chantra on 12th July 2008

This entry is part 2 of 3 in the series How-To: encrypted partitions over LVM with LUKS

3. Encrypting the partitions

3.1. Filling the partition with random data

Now that we have our partition layout, we need to encrypt /home and /. The first thing we are going to do is to fill those partitions with random data. There is 2 ways of doing it. A fairly fast one or a really slow but efficient one.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | No Comments »

How-To: encrypted partitions over LVM with LUKS

Posted by chantra on 12th July 2008

This entry is part 1 of 3 in the series How-To: encrypted partitions over LVM with LUKS

Even though new distros installers tend to support filesystem encryption out of the box, most of the time, it might be interesting to actually understand how it works, mainly when it happens that your system fails to boot :).

Most literature found on the Internet tend to cover how to set up LVM over a partition encrypted with LUKS, this tutorial takes another approach and will explain how to create LUKS encrypted partitions over LVM. The reason for this.... I wanted to have unencrypted partitions :D.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | No Comments »

How-To: Remote syslog logging on Debian and Ubuntu

Posted by chantra on 30th June 2008

syslogd is the Linux system logging utility that take care of filling up your files in /var/log when it is asked to.

On a standard system, logging is only done on the local drive. But syslog can be configured to receive logging from a remote client, or to send logging to a remote syslog server.

Some of the use cases could be:

  • A machine which filesystem goes read-only
  • Log replication

this tutorial will explain how to set up both the server, to receive message from a remote client, and the client to emit messages to a syslogd server.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, System | No Comments »

How-To: Set up a LAN gateway with DHCP, Dynamic DNS and iptables on Debian Etch — page 4 — IPtables

Posted by chantra on 29th June 2008

3. Forwarding Internet traffic with IPtables

IPtables is both used to act as a firewall, but it is also the one passing packets from one network to another.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | 7 Comments »

How-To: Set up a LAN gateway with DHCP, Dynamic DNS and iptables on Debian Etch — page 3 — DHCP server

Posted by chantra on 29th June 2008

2. DHCP server

In order to provide an IP address to the other machines in the network, we need to use a DHCP server.
This DHCP server will provide the host with all the information needed to connect to any other accessible host. i.e, the IP, netmask, gateway, domain name server.
The DHCP server will also update bind with a nt set of hostname and IP when the client is requesting a specific hostname.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | No Comments »

How-To: Set up a LAN gateway with DHCP, Dynamic DNS and iptables on Debian Etch — page 2 — DNS server

Posted by chantra on 29th June 2008

1. DNS server

As a DNS server we are going to use bind9, it will be configured to resolve the names of the host for our network lan.debuntu.local.

The DNS server will also accept dynamic DNS update from the local DHCP server.

In this tutorial, I will be using the Dynamic DNS feature of bind.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | No Comments »

How-To: Set up a LAN gateway with DHCP, Dynamic DNS and iptables on Debian Etch

Posted by chantra on 29th June 2008

Linux is a perfect platform to act as a router/gateway.

In this tutorial, I will explain how to set up a Linux box to operate as a network router. The box will provide the following services:

  • DHCP server to provide the ip addresses to the machines in the LAN
  • DNS server to resolve domain names
  • Gateway with IP tables to give access to the Internet.
  • Firewall with IP tables.

The resulting machine will have quite a small footprint: about 600M, and except if your network is intensively used, a low spec computer can be recycled to do the job.

As the machine is going to operate as a router/firewall

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | No Comments »

How-To: copy files over the network and preserve file permissions and informations with ssh and rsync

Posted by chantra on 20th June 2008

When copying files over the network, the files informations can be modified.

When using cp, one can avoid this issue by using the -a which will do the copy in archive mode, meaning that it will keep the links, preserve mode, ownership and timestamps and the copy is recursive.

the solution to this over the network is rsync alongside with ssh.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Networking, System | No Comments »