Blogs

Using dnsmasq to setup your own dhcp/dns server on your local computer

Tue, 09/04/2012 - 17:04 -- jamie

At this point, you have learned that DHCP is a protocol that allows a server to assign an IP address to a client and DNS is a protocol that takes a domain name and returns an IP address.

Now, we are going to install a program called dnsmasq that provides both a DHCP server and DNS server that will run from your laptop computer.

By installing this server, you will be able to assign, via DHCP, IP addresses to your virtual servers and provide DNS lookup for them.

Begin by installing the dnsmasq package with:

sudo apt-get install dnsmasq

Introduction to Bash programming

Tue, 09/04/2012 - 16:59 -- jamie

Bash is a simple programming language typically used by system administrators to automate tasks.

Try creating a new file with this command:

nano my-script

Type the following into your file:

#!/bin/bash
echo "Hello World!"

Then, save and exit.

Execute your new bash script with:

bash my-script

With a Bash program (aka script) anything you type on the command line can be placed into the script. For example, try creating a bash script with the following contents:

Connecting commands together with the pipe

Tue, 09/04/2012 - 16:58 -- jamie

One of the philosophies that Linux has inherited is the idea that we should create small programs that do one thing well. If we want to do more complex tasks, we can combine multiple programs to do more complex things.

One way that programs are combined on the command line is by using the "pipe" character (aka |).

The pipe character takes the output of the first command and sends it as input to the second command.

Adding virtual bridges

Tue, 09/04/2012 - 16:58 -- jamie

If you have ever used a switch (or a hub) you are familiar with the idea of "bridging" - a process that allows you to connect multiple computers (or more specifically network interfaces) to each other. All data that comes from one interface is shared with the other interfaces.

The same principle applies to virtual bridges, except all the network interfaces are on one computer.

Adding virtual network devices

Tue, 09/04/2012 - 16:57 -- jamie

If you have ever plugged a network cable into a computer, you are familiar with what a physical network interface is like.

Sometimes, it's useful to create "virtual" network interfaces. For example, if you are running multiple virtual servers on a single computer, each virtual server will need a virtual network interface in order to communicate with the network.

You can see a list of all your existing network interfaces with the ip link command:

ip link

Depending on how your computer is configured, you will usually see:

From Roberto - Got Mint installed on laptop

Tue, 08/28/2012 - 00:33 -- Roberto

A brief update on my efforts.

I had made a Ubuntu Live USB thumb drive and it worked fine when booting with the thumb drive. But when I tried to install it on an HP laptop (32 bit), it didn't work. I just got a blank screen with a blinking cursor and couldn't do anything. Ross thought it could have been a driver issue. But then I made a Mint 13.0 XFCE Live USB thumb drive. This distribution is about the closest thing to a Windows environment, and that's what I would want the folks at SWOP to start off with.

Understanding netmask and CIDR notation

Sun, 08/26/2012 - 20:00 -- jamie

The Internet is made up of many smaller networks, also known as local area networks (LANs) or subnets, that are connected to each other by routers.

When your computer tries to communicate with another computer, it has to make many decisions about where to send the information. One of the first decisions is whether to try to communicate with a computer on the local network, or whether to rely on the router (aka gateway) to forward the information to a computer on a different network.

Configuring network manually using IP commands

Sun, 08/26/2012 - 19:36 -- jamie

Sometimes, it's usefull to congifure your network device directly, without editing a file like /etc/network/interfaces.

You can review the IP addresses currently available with:

ip addr show

You can also see the routes currently available with:

ip route show

You can remove an address using the following command:

ip addr del LINE-YOU-WANT-TO-DELETE

You can remove a route with:

ip route del LINE-YOU-WANT-TO-DELETE

Pages

Subscribe to RSS - blogs