Rocode >> Hobbies >> Zentyal

Zentyal Gateway

This page details my residential installation of the Zentyal gateway on an intel PC with 3 network interfaces.

This is the most popular page on my web site.
It details how to setup a Zentyal gateway for your home using relatively cheap hardware and low power consumption.

The Zentyal gateway connects my TPG Internet service to my wifi router and LAN switch. The LAN switch connects my VOIP telphone box and my ASRock media computer.

Residential Network

Diagram 1: Residential Network


Hardware

Computer

I purchased an Asus EeeBox EB1007 from Amazon for AUD$320.

The power adaptor is designed to work internationally and only a pin adaptor is required to suit our electricity plug. The power adaptor has a separate cable to connect to the power plug and to the back of the EeeBox. As I already had a local power cable I simply swapped it for the US cable.

Zentyal Hardware

Photo 1: Asus EeeBox PC

USB Adaptors

I use the built-in Gigabit Ethernet Adaptor for eth0 to connect our internal subnet.

I use a USB 1.1 Ethernet Adaptor for eth1 to connect our wifi subnet. The adaptor cost $4 from www.dinodirect.com. The USB 1.1 adaptor can only do 8 Megabits so throttles our wifi subnet.

The adaptor worked instantly with Zentyal 3.0 Linux.

USB 1.1 Ethernet Adaptor

Photo 2: USB 1.1 Ethernet Adaptor

I use a USB 2.0 Ethernet Adaptor for eth2 to connect the ADSL 2+ modem. The adaptor cost $12 from ebay. The USB 2.0 adaptor has a bandwidth above 40 Megabits so is adequate for our ADSL modem.

The adaptor worked instantly with Zentyal 3.0 Linux.

USB 2.0 Ethernet Adaptor

Photo 3: USB 2.0 Ethernet Adaptor

TIP: Use two different USB adaptors as I tried using the same adaptor twice and this was unsuccessful.

RAM

The EeeBox was sold with 1GByte of system memory. It takes up to 2 SODIMM modules for a total of 4GBytes.

Our system consumed 95% of available RAM when installed. So I purchased 2GBytes of additional RAM that cost $36 from ebay.

Solid State Drive

The EeeBox was sold with 230GByte Hard Disk Drive. Our Zentyal 3.0 distribution (with swap space) takes up 5.7GBytes of disk space.

I purchased a Kingston 8GB SSD for $57 from mwave.com.au. I then swapped out the supplied HDD that is accessible from the bottom of the EeeBox. Unfortunately the boot and shutdown delays were minimally improved. I did notice a big improvement on login speed.

TIP: To avoid the Zentyal logs filling the very small flash drive. I changed the default purge settings to daily or hourly.


Operating System

I used the Zentyal 3.0 Linux distribution from Zentyal.

Installation

To install the OS I used a USB flash drive, the Zentyal 3.0 installation iso and the unetbootin program http://unetbootin.sourceforge.net/.

To get the EeeBox to boot off the flash drive took a little manipulation of the boot options in the BIOS. Press F2 on boot to enter the BIOS. Delete all the boot devices. Delete all hard discs. Then select the USB flash drive. Add it as the boot device and reboot.

TIP: On installing the base system I was required to use the two USB Ethernet adaptors. The built in device did not detect on initial install. Once the Zental packages were unpacked the 3rd (built in) ethernet device was then detected automatically.

TIP: We have a warning about network connectivity on boot. This delays startup by about 90 seconds. Then the system starts and successfully connects all 3 interfaces.

Network Interfaces

The network architecture is as follows:


IPTV Proxy

I use the igmpproxy to feed TPG IPTV from the modem to our wired LAN. The proxy allows IPTV to be watched on multiple desktops or media boxes at the same time.

The home page for igmpproxy is http://sourceforge.net/projects/igmpproxy/.

After downloading the source code from sourceforge you need to compile the program. If you don't have the development tools installed you will need run
sudo apt-get install build-essential
to download and install the GNU compiler environment.

Then follow the instructions contained in the INSTALL file to install igmpproxy.

You will need to set up a configuration file. Here is my igmpproxy configuration file as found in
/usr/local/etc/igmpproxy.conf.

Source Code 1: igmpproxy.conf

I defined the upstream TPG IPTV network 233.29.121.0/24 on eth2. Then the downstream internal network 192.168.1.0/24 on eth0. Our wifi router is on eth1 and does not have IPTV access.

Then you must add some iptables filters to allow igmpproxy to work.
Put these in a new file called:
/etc/zentyal/hooks/firewall.postservice

iptables -I FORWARD -s 10.0.0.0/8 -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -s 233.29.121.0/24 -d 224.0.0.0/4 -j ACCEPT
iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT

Put an entry in rc.local to open the firewall.

/etc/zentyal/hooks/firewall.postservice

Then finally put an entry in rc.local to start up the proxy.

/usr/local/sbin/igmpproxy /usr/local/etc/igmpproxy.conf &

TIP: When watching IPTV you notice that your channel allways drops out after a couple of minutes. Check that your Zentyal firewall iptables have been updated. The IPTV software clients need to notify that they wish to continue to receive the television stream.


ADSL is UP or DOWN Checker

My ADSL Update Checker has been replaced by The Dude.

See my page regarding "The Dude" here:
http://www.rocode.com/thedude/.