The Tiny Internet Project, Part I

Webmin 1.7x: Webmin is a browser-based tool that makes administering (and understanding) a Linux server a lot easier. Hard-core command-line junkies will scoff at the GUI, but those new to Linux will appreciate Webmin's power and flexibility for managing everything from Apache Web services and Postfix-related mail services to updates and system health. You'll install Webmin on your base Ubuntu 14.04 VM template and use it on every server thereafter.

Figure 4. Webmin

apt-mirror:

The goal of the Tiny Internet Project is to build a standalone Internet, and in order to do that, you need to make all the Linux software you want (and might dream of using) available on your private network. To do that, you'll install apt-mirror on one of your Ubuntu VMs.

Figure 5. apt-mirror

To replicate the Ubuntu Trusty Tahr Linux distribution, you'll need much more disk space than all your other virtual servers combined. I've done several tests using standard apt-mirror settings (without -src, or source versions), and I found that the main, security and i386 repositories total less than 100GB. When you build the mirror VM, you'll make a 200GB disk, which should give you enough space for future additions and natural growth of the repository.

Once your local mirror is built, Ubuntu updates and upgrade will be very fast. However, initially downloading the mirror will take hours—even over fast Internet connections. Once it's done though, future updates go quickly and you'll have everything you need to build out and experiment with a variety of VM servers.

Bind9:

In order to make your tiny Internet as real as possible, you'll set up a domain name server (DNS) that will allow you to give your private network a working domain. Bind9 is the latest version of bind, which allows you to set up forward and reverse zones. That means if you want to run a domain called linuxrocks.com, you can, and create subdomains like dns.linuxrocks.com or mirror01.linuxrocks.com. This also will make setting up your private e-mail system a lot easier and much more familiar.

Postfix and Dovecot:

A big part of the public Internet is e-mail, and your tiny Internet would come up short if it didn't provide this important service. You'll use Postfix for mail handling and Dovecot for POP-ing or IMAP-ing the mail to e-mail clients like Thunderbird. Not only will users of your private tiny Internet be able to have their own e-mail addresses, but they'll also be able to exchange e-mail freely with one another.

These mail services are solid and reliable, and they're supported by a wide array of e-mail clients, including Thunderbird. You'll experiment with securing the mail server too, so you can learn more about mail security.

LAMP Stack:

The combination of Linux, Apache (Web), MySQL (database) and PHP form the foundation for millions of servers around the world and across the Internet. The combination enables a wide array of Web sites (and content-management systems), database-driven Web applications and much more. You'll deploy a "base" LAMP stack on one of your Ubuntu 14.04 VMs and then make a template of it. That way, you'll be able to deploy as many different Web servers as you want.

The base LAMP VM will include:

  • Apache2.

  • MySQL.

  • PHP 5.x.

  • phpMyAdmin.

The last item, phpMyAdmin, is a popular browser-based tool for managing MySQL databases. It's robust and flexible, and perfect for learning more about databases.

Tinyproxy:

You have a couple options when it comes to connecting your private tiny Internet to the public Internet. One is to have multiple network cards in your main Proxmox host. The other is to have a secondary computer with two network connections to serve as a proxy server. There are advantages to each, so you can decide later which way you want to proceed.

If you take the proxy path—using a separate computer to relay all your http, https and ftp requests—you'll install tinyproxy. It's very lightweight, doesn't require caching (which can take up massive amounts of disk space), and it's fast. You'll have to make some modifications to apt to enable Ubuntu updates via the proxy, but once it's set up, it works well.

DHCP:

If you've played with a home network—a router provided by your Internet provider, for example—you're probably familiar with how DHCP works. A DHCP server hands out IP addresses to all the devices that attach to the network, whether they're computers, tablets, smartphones or thermostats.

If you're deploying a large tiny Internet—say, in a classroom—having DHCP will make things easy. Yes, you can assign static IP addresses to all the machines on your private network (and some servers, indeed, must have static addresses), but for casual users, DHCP works great.

If you're using a router (such as the Netgear models I mentioned earlier), it probably has its own DHCP server built in. That means the device itself hands out IP addresses to every wired and wireless connection it makes, so all your computers, tablets and smartphones have their own unique addresses. Plug in the router, connect it to your tiny Internet, and you're done.

isc-dhcp-server:

If instead you're planning to use a simple network switch (one that doesn't hand out addresses at all), you'll need to deploy a DHCP server. Here, you'll use isc-dhcp-server for the job. It's lightweight and easy to use. Even if you plan to use a router with built-in DHCP, you may want to deploy a separate isc-dhcp-server as a back-up (I'll talk about how to do that later in this series).

Part of the fun of running your own tiny Internet is having complete control over all the pieces—the servers, the client PCs and the network. By installing a simple tool like iperf, you'll be able to test the speeds at which your components communicate. If you've ever used on-line tools like Speedtest.net to test your home or workplace Internet download and upload speeds, you'll be familiar with what iperf does.

Figure 6. iperf

You'll use iperf to test the speeds between devices across your private network and to test speeds between servers living together on the Proxmox host. This is where it really gets interesting. Even if you're using a 10Mb Ethernet switch to connect your VM host machine with your laptop, for example, you'll be able to measure gigabit speeds between your various VMs. That's because they're connected by a virtual network on a single server, limited only by the speed of the server's bus! That'll make your tiny Internet a speedy and realistic place to explore Linux.

Coming Next

In the next installments, you'll take the information I've covered here and build your Proxmox host, Ubuntu mirror and e-mail and domain name servers. After that, you'll deploy a LAMP stack and build some Websites, databases and even a WordPress site.

Resources

Test your computer to see if it supports virtualization:

Create Bootable USB Sticks:

Software Resources:

Other Useful Resources:

______________________

John S. Tonello is Director of IT for NYSERNet, Inc., in Syracuse, New York. He's been a Linux user and enthusiast since he installed his first Slackware system from diskette 20 years ago. You can follow him @johntonello.