EBox on FreeLink-Debian

This HowTo has been deprecated by its author
''This was written back in late 2006 and early 2007. Since then several changes have taken place with both eBox and LinkStation firmware development. The HowTo was written for Sarge (not Etch or later), and eBox has continued to develop. More importantly, with the development of foonas, we now have that better alternative, with full functionality/flexibility and better performance than was available with eBox. It may still work, and work well (as it did at the time the article was written), but it no longer actively supported by the author.'' Davy gravy 10:02, 23 November 2007 (CST)

What is eBox?
Developed as a flexible server solution for small business and small offices, eBox Platform is a management tool that supplies the following services: It was designed as an enhanced gateway, but has a subset of features that make it usable as a basic NAS device.
 * basic NAS (Samba Filesharing) and Printer Sharing
 * Firewall
 * Transparent proxy via Squid
 * Content filter
 * NTP Server
 * Users and groups administration
 * Mail server
 * Backup of data and/or system

How does it compare to Webmin (on Debian/FreeLink) and the stock Buffalo Web Interface (on the stock firmware) ?
eBox is not a full-fledged replacement for Webmin, but it does handle some things very well. It may be a better alternative for some Debian/FreeLink users who found Webmin either too slow or too complex for their liking. In short, it can do nearly everything the stock Buffalo LS1/LS2/LS-HG webinterfaces can do, and as more modules are written by developers and contributors, it may broaden its scope and capability. In particular it:
 * has enough features to make it work well as a basic Network Attached Storage (NAS) device
 * has a lot of features that make it a good choice as a gateway
 * has better printer support (greater variety of printers supported) than the stockware
 * has less options than Webmin
 * seems like it can be locked down tighter/more securely than the stockware
 * is faster than Webmin (provided that you don't install to much on top of it)
 * is nearly as fast as the stock web interface
 * it is not on par with the LS-Pro interface or FreeNAS

Prerequisites
mv /home /mnt/ cd / ln -s /mnt/home home
 * 2.6 kernel and modules available here - other 2.6 kernels should work as long as essential network options are configured into the kernel.
 * A fresh FreeLink/Debian installation available here - note that any previously existing configuration files in /home, /root, /var, /etc, and other locations may cause problems with an installation. Squid, in particular, is very picky about these things. It is recommended that you first install eBox, and then add other servers after you have it installed and customized for your network.
 * Hard drive space on hda1 - eBox needs
 * lots of space for the software and packages, so
 * either use a custom partition with all the space you need, or create symlinks as shown here -  Freeing Up Space On hda1
 * in particular, eBox will build its Samba shares in /home, so do something like this:
 * A realization that eBox may move your box towards being a bit of a "dedicated box" with a strong firewall
 * Read over this excellent (yet slightly outdated - version 0.7.1) installation guide for eBox - it shows many of the key points - a few of the configuration options mentioned have changed
 * Read over the installation guide for desktop computers - see the Debian Packages section
 * Time = 40 minutes to an hour or more, depending on your internet connection (about 100MB has to be downloaded)
 * Decide whether you want your eBox to be more like a NAS with full access to Debian (install ebox, libebox, ebox-network, ebox-objects, ebox-firewall, ebox-logs, ebox-samba, ebox-dhcp, ebox-squid, ebox-usersandgroups, ebox-ntp, ebox-printers) or more like a dedicated, secured, enhanced gateway (the previous packages + ebox-mail, ebox-jabber, ebox-software).

Debian packages/libs for PPC FreeLink
These three Debian packages required. The first two were built on an LS-HG (PPC-they should work on any LS1 or HG). The last one as been supplied by Isaac and Javi at eBox-Platform (thanks, guys!). The installer script should download them and install them automatically.: http://downloads.nas-central.org/uploads/ebox/libnet-cups-perl_0.37-1_powerpc.deb http://downloads.nas-central.org/uploads/ebox/libreadonly-xs-perl_1.04-1_powerpc.deb http://ebox-platform.com/dinstall/stable/libnet-arp-perl_1.0-1_powerpc.deb

Debian packages/libs ARM9/LS-Pro FreeLink
not yet available

General Installation Steps for all LS's
Below is a very basic script for PPC LS's (LS1 and HG, Kuros). The script works and has been tested several times on an KuroHG, but is alpha or pre-alpha in nature. Run it either as a script, or cut and paste commands as you like. Use at your own risk: You can now wget/download the latest version - if you do, please post feedback at the thread listed bottom-of-page. Good luck. (ARM-based LS-Pro users will have to build their own packages, and alter the script only slightly -though this script has not been tested on the Pro.) To get the script and run it, do the following: cd / wget http://downloads.nas-central.org/Uploads/OldUploads/ebox/eBoxLinkStation.sh chmod a+x eBoxLinkStation.sh ./eBoxLinkStation.sh It will confirm your network settings, standardize your /etc/network/interfaces to a format that eBox expects, make sure your connection is static (not dhcp), and then install and configure the packages.

Contents of the script:

clear echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" echo "* Before going further, make sure you are aware of what your ip        *" echo "* address, netmask, gateway, broadcast, domain and nameserver are.     *" echo "* This installation script will grep what they appear to be, and       *" echo "* give you an opportunity to check them, but if they are incorrect     *" echo "* then your installation of eBox will fail.                            *" echo "* Also, it is essential that you have your partitions set up so        *" echo "* that you have enough of space on /hda1.  Also, probably need to      *" echo "* move /home to /hda3 & symlink it, since eBox builds all of its       *" echo "* Samba shares in /home.                                               *" echo "*                                                                      *" echo "* So, do you have :                                                    *" echo "* 1)  Your network information ready,                                  *" echo "*  2)  enough space on /hda1, and /home moved & symlinked and           *" echo "* 3)  the article "EBox on FreeLink/Debian" open in a browser? (Y/n)     *" echo "*                                                                       *" echo "*            n for no, any other letter to continue                     *" echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" sleep 3 read -e ANSWER if [ "$ANSWER" == "n" ] ; then     echo " Stopping installation.       exit 1 fi uname -m | grep -q ppc && PROCESSOR="ppc" uname -m | grep -q mips && PROCESSOR="mips" uname -m | grep -q arm && PROCESSOR="arm" uname -r | grep -q "2.4" && KERNEL="2.4" uname -r | grep -q "2.6" && KERNEL="2.6" if [ "$PROCESSOR" == "mips" ] ; then     echo ""     echo "Sorry: Currently, only PPC-based Linkstations are supported."     echo "--> Cannot continue with installation on a mipsel-based LS2."     echo ""     exit 1 fi if [ "$PROCESSOR" == "arm" ] ; then     echo "" echo "Sorry: Currently, only PPC-based Linkstations are supported." echo "--> Cannot continue with installation on an arm-based LS-Pro.""    echo ""     exit 1 fi if [ "$KERNEL" == "2.4" ] ; then     echo ""     echo "Sorry: eBox needs a 2.4 kernel in order to install or run."     echo "Try upgrading to a newer 2.6 kernel first."     echo "--> Cannot continue with installation under a 2.4 kernel."     echo ""     exit 1 fi apt-get -v | grep -q dpkg || ERROR="1" if [ "$ERROR" == "1" ] ; then     echo ""     echo "Sorry: Do you have apt-get installed, is this Debian(FreeLink)?"     echo "--> Cannot continue."     echo ""     exit 1 fi echo " " echo -n "What do you want the name of your linkstation to be on the network?" echo -n "(Default will be eBoxLinkStation)"  read -e LINKSTATION if [ "$LINKSTATION" == "" ] ; then     LINKSTATION="eBoxLinkStation" fi  hostname $LINKSTATION rm /tmp/file echo "127.0.0.1 $LINKSTATION" >> /tmp/file grep -v 127.0.0.1  /etc/hosts >> /tmp/file cat /tmp/file > /etc/hosts export hosts echo "$LINKSTATION" > /etc/hostname if ping -q -c 3 www.yahoo.com ; then echo 'Looks good - you can at least connect to www.yahoo.com.' echo ' ' echo ' ' else echo 'Are you connected to the internet?' echo 'Check to see that you are connected,' echo 'and then try again...' exit 1 fi STATICIP=` ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` STATICNETWORK=` route | grep eth0 | grep -v default | cut -d: -f1 | awk '{ print $1}'` STATICNETMASK=` ifconfig | grep 'Mask:'| grep -v '127.0.0.1' | cut -d: -f4 | awk '{ print $1}'` STATICBROAD=` ifconfig | grep 'Bcast:'| grep -v '127.0.0.1' | cut -d: -f3 | awk '{ print $1}'` STATICGATE=` route -n | awk '/^0.0.0.0/ {print $2}'` NAMESERV=` grep nameserver /etc/resolv.conf |head -1|awk '{print $2}'` DOMAIN=`grep domain /etc/resolv.conf |head -1|awk '{print $2}'` echo "From the looks of it, your current networks settings show the following:" echo "IP address     = " $STATICIP echo "Network address = " $STATICNETWORK echo "Netmask        = " $STATICNETMASK echo "Broadcast      = " $STATICBROAD echo "Gateway        = " $STATICGATE echo "DNS Nameserver = " $NAMESERV echo "Search Domain  = " $DOMAIN echo " " echo "Carefully check these against what you expect them to be." echo "If any one of them is incorrect, your connection and installation will fail." echo "Are they correct?(y/n)" read -e ANSWER if [ $"ANSWER" == "n" ] ; then echo " Stopping installation script. Double-check & fix your network" echo " settings and try again." exit 1 fi mv /etc/network/interfaces /etc/network/pre-ebox-interfaces-backup echo "# we always want the loopback interface" > /etc/network/interfaces echo "#" >> /etc/network/interfaces echo "auto lo" >> /etc/network/interfaces echo "iface lo inet loopback" >> /etc/network/interfaces echo "" >> /etc/network/interfaces echo "# default dynamic setup (no adjustment necessary)" >> /etc/network/interfaces echo "#" >> /etc/network/interfaces echo "#auto eth0" >> /etc/network/interfaces echo "#iface eth0 inet dhcp" >> /etc/network/interfaces echo "#     hostname `hostname`" >> /etc/network/interfaces echo "" >> /etc/network/interfaces echo "# frontalot's static setup (adjust to your network settings)" >> /etc/network/interfaces echo "#" >> /etc/network/interfaces echo "auto eth0" >> /etc/network/interfaces echo "iface eth0 inet static" >> /etc/network/interfaces echo "   address $STATICIP" >> /etc/network/interfaces echo "   network $STATICNETWORK" >> /etc/network/interfaces echo "   netmask $STATICNETMASK" >> /etc/network/interfaces echo "   broadcast $STATICBROAD" >> /etc/network/interfaces echo "   gateway $STATICGATE" >> /etc/network/interfaces mv /etc/resolv.conf /etc/pre-ebox-resolv.conf-backup echo "nameserver $NAMESERV" >> /etc/resolv.conf echo "domain $DOMAIN" >> /etc/resolv.conf echo "* * * * * restarting networking * * * * *" sleep 3 /etc/init.d/networking restart sleep 3 echo "* * * * * restarted networking  * * * * *" echo 'Checking to see if you can connect to mirrors.kernel.org' if ping -q -c 3 mirrors.kernel.org ; then echo 'Looks good - you can connect to get Debian packages.' echo ' ' echo ' ' else echo 'Are you connected to the internet?' echo 'Check to see that you are connected,' echo 'and then try again...' exit 1 fi echo ' ' echo 'Checking to see if you can connect to downloads.nas-central.org' if ping -q -c 3 downloads.nas-central.org ; then echo ' Looks good - you can connect to get the special PPC lib packages for eBox.' echo ' ' echo ' ' else echo 'Are you connected to the internet, or is downloads.nas-central.org down?' echo 'Check to see that you are connected,' echo 'and then try again...' exit 1 fi echo ' ' echo 'Checking to see if you can connect to ebox-platform.com' if ping -q -c 3 ebox-platform.com ; then echo ' Looks good - you can connect to get the eBox-Platform packages.' echo ' ' echo ' ' else echo 'Are you connected to the internet, or is eBox-Platform.com down?' echo 'Check to see that you are connected,' echo 'and then try again...' exit 1 fi mv /etc/hosts  /etc/pre-ebox-hosts-backup echo "127.0.0.1     localhost.localdomain  localhost"    >  /etc/hosts echo "$STATICIP     $LINKSTATION.example.net     $LINKSTATION"   >>  /etc/hosts mv /etc/apt/sources.list /etc/apt/pre-ebox-sources.backup-list echo deb http://mirrors.kernel.org/debian/ stable main >> /etc/apt/sources.list echo deb-src http://mirrors.kernel.org/debian/ stable main >> /etc/apt/sources.list echo "#######################################################" >> /etc/apt/sources.list echo "##deb http://security.debian.org/ stable/updates main" >> /etc/apt/sources.list echo "#######################################################" >> /etc/apt/sources.list echo deb http://ebox-platform.com/debian/stable/ ebox/ >> /etc/apt/sources.list echo deb http://ebox-platform.com/debian/stable/ extra/ >> /etc/apt/sources.list echo deb http://ebox-platform.com/debian/sarge/stable/ security/ >> /etc/apt/sources.list echo deb http://ebox-platform.com/dinstall/ stable/ >> /etc/apt/sources.list echo "#######################################################" >> /etc/apt/sources.list echo "##  testing branch  ####" >> /etc/apt/sources.list echo "##  de-comment these lines to --temporarily enable the testing branch" >> /etc/apt/sources.list echo "#deb http://http.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list echo "#deb-src http://http.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list apt-get update apt-get install module-init-tools libperl5.8 perl perl-base perl-modules libterm-readline-gnu-perl libterm-readline-perl-perl libcupsys2-gnutls10 perl-doc ssh tzconfig passwd echo "* * * * * * * Installing libs for ebox * * * * * * *" sleep 3 cd / wget --tries=3 --dns-cache=off --dns-timeout=8 --connect-timeout=8 --random-wait -c http://ebox-platform.com/dinstall/stable/libnet-arp-perl_1.0-1_powerpc.deb wget --tries=3 --dns-cache=off --dns-timeout=8 --connect-timeout=8 --random-wait -c http://downloads.nas-central.org/Uploads/OldUploads/ebox/libnet-cups-perl_0.37-1_powerpc.deb wget --tries=3 --dns-cache=off --dns-timeout=8 --connect-timeout=8 --random-wait -c http://downloads.nas-central.org/Uploads/OldUploads/ebox/libreadonly-xs-perl_1.04-1_powerpc.deb dpkg -i libreadonly-xs-perl_1.04-1_powerpc.deb dpkg -i libnet-arp-perl_1.0-1_powerpc.deb dpkg -i libnet-cups-perl_0.37-1_powerpc.deb echo "* * * * * * * libs for ebox installed * * * * * * * " sleep 3 echo "* * * * * * getting ebox & modules * * * * * * * * *" echo " installation and configuration may take about 30  *" echo " minutes... go have a beer... but you need to      *" echo " answer the configuration questions carefully as   *" echo " shown in the eBox on FreeLink/Debian article ...  *" echo "* * * * * * * * * * * * * * * * * * * * * * * * * * *" sleep 5 apt-get install ebox libebox ebox-network ebox-objects ebox-firewall ebox-samba ebox-squid ebox-usersandgroups ebox-ntp ebox-printers ebox-dhcp echo "* * * * * * * * * * All done installing eBox * * * * * * * * * * * * * * " echo "*                                                                     *" echo "* Point your browser to        https://         * " echo "* Do these things now:                                                * " echo "* 1. Through the browser interface, enable SSH connections in the     *" echo "*   Firewall menu,  so that you can connect to do any changes that    *" echo "*   can't be done through the web interface                           *" echo "* 2. Do a reboot of the machine. It may take 2 or 3 minutes to reboot *" echo "* 3. After rebooting, adjust settings to your liking.                 * " echo "*                                                                     *" echo "*                                                                     *" echo "* Please leave feedback and/or report any bugs or problems on the     * " echo "* eBox on PPC forum thread at...                                      * " echo "* http://forum.nas-central.org/index.php?action=vthread&topic=2397 * " echo "*                                                                     *" echo "* * * * * * * * * * All done installing eBox * * * * * * * * * * * * * * "
 * 1) ! /bin/bash
 * 1) Gather some information about your LS's processor and the kernel that your  #
 * 2) LS is booted into                                                           #
 * 1) LS is booted into                                                           #
 * 1) Recognize and set processor variable
 * 1) Recognize the Kernel as 2.4 or 2.6
 * 1)  Do a quick check to make sure you have a ppc processor.  eBox is not yet   #
 * 2)  compiled or working for the mipsel or arm.                                 #
 * 3)  Support for the arm LS-Pro boxes should come soon.                         #
 * 4)  Support for the mipsel LS2 will not happen until after it gets 2.4 kernel  #
 * 1)  Support for the arm LS-Pro boxes should come soon.                         #
 * 2)  Support for the mipsel LS2 will not happen until after it gets 2.4 kernel  #
 * 1)  Do a quick check to make sure you have apt-get. This should weed out any   #
 * 2)  Openlink, GenLink or OpenEmbedded users.                                   #
 * 1)  Openlink, GenLink or OpenEmbedded users.                                   #
 * 1)  Ask the user what they want as the hostname and set it                     #
 * 1)  Ask the user what they want as the hostname and set it                     #
 * 1) Check to see if you are connected to the internet and that DNS works for   #
 * 2) you.                                                                       #
 * 1) you.                                                                       #
 * 1) EBOX REQUIRES A STATIC IP DURING INSTALLATION - GREP CURRENT IP INFORMATION 	 #
 * 2) AND REFORMAT IT ACCORDING TO EBOX'S & SLAPD'S EXPECTATIONS.                    #
 * 3) ALSO CHANGE IT TO STATIC IP                                                    #
 * 4) NOTE THAT YOUR IP, GATEWAY, SUBNET AND BROADCAST WILL NOT BE CHANGED AT ALL    #
 * 5) mv /etc/network/interfaces /etc/network/interfaces.bak
 * 6) mv /etc/network/interfaces /etc/network/pre-ebox-interfaces.backup
 * 1) mv /etc/network/interfaces /etc/network/interfaces.bak
 * 2) mv /etc/network/interfaces /etc/network/pre-ebox-interfaces.backup
 * 1) echo "    search $SSID" >> /etc/resolv.conf
 * 1) Double-check to see if you can connect to three crucial servers            #
 * 2)  mirrors.kernel.org  -  for most of the Debian packages                    #
 * 3)  downloads.nas-central.org -  for two specially built libs             #
 * 4)  ebox-platform.com  -  for most of the eBox packages                       #
 * 5) In case something goes sourly after network settings are adjusted &        #
 * 6)  restarted, it will be caught here.                                        #
 * 1)  restarted, it will be caught here.                                        #
 * 1) Set up /etc/hosts in a way consistent with what eBox, slapd and Samba      #
 * 2) expect.   The 3rd line contains the FQDN for your eBox.   As things are    #
 * 3) specified here the absolute minumum will have to be entered during         #
 * 4) post-intall Debian configuration.  For most folks, you can leave it as is. #
 * 1) post-intall Debian configuration.  For most folks, you can leave it as is. #
 * 1)  remove old dhcpd and put in newer one ###############
 * 1)  remove old dhcpd and put in newer one ###############
 * 1) dpkg --purge dhcpcd
 * 2) apt-get -y install dhcp3-client
 * 1) set up an eBox-platform compatible apt source.list ##
 * 2) 	but keep a copy of your old list	 #####
 * 1) 	but keep a copy of your old list	 #####
 * 1)  update your Debian installation & install necessary packages     #####
 * 1)  update your Debian installation & install necessary packages     #####
 * 1)  update your password and timezone configuration   #####
 * 1)  update your password and timezone configuration   #####
 * 1) 	remove exim4 as it is not compatible with eBox 	#####
 * 1) 	remove exim4 as it is not compatible with eBox 	#####
 * 1) apt-get remove exim4
 * 1)  install essential libs for eBox, built for PPC  ######
 * 1)  install essential libs for eBox, built for PPC  ######
 * 1)  install ebox and modules  ######
 * 1)  install ebox and modules  ######
 * 1) apt-get install missing software packages
 * 1)  make a sym link from /home/samba  to  /mnt###
 * 2) optional  #####
 * 1) end of script ########

Package configuration
As the install script runs, or as you go through the steps manually, provide the natural answers. For some of the configuration, you will want to make specific choices: For all of the questions of the form "After unpacking 299kB of additional disk space will be used. Do you want to continue? [Y/n]", answer y.

Allow SSH protocol 2 only? < Yes

Do you want /usr/lib/ssh-keysign to be installed SUID root? < Yes

Do you want to run the sshd server? < Yes

Enter new UNIX password:   <  (your choice)

Your current time zone is set to US/Eastern Do you want to change that? [n]: < (your choice) Where should the PostgreSQL database be created? /var/lib/postgres/data_______________________________  <   

Should the data be purged as well as the package files? < No

Choose European or US day/month order in dates. (your choice)   and       

DNS domain name:    example.net  (or whatever you set it to in the scripted commands) and 

Name of your organization:  example.net  (or whatever you set it to in the previous line above) and 

LDAP Admin password:   (your choice)

Allow LDAPv2 protocol? 

Apache-Perl needs to be reconfigured. 

Enable suExec? 

Do you want the cdrecord binaries to be installed SUID root?  

Which paper size should be the system default? (your choice: US uses letter, Europe, others use A4)

On what network interfaces should the DHCP server listen? eth0      (Linkstations have only one ethernet port)

Please configure the DHCP server as soon as the installation finishes.  The version 3 DHCP server is now non-authoritative by default. 

You can run dpkg-reconfigure later,... 

Do you want to entrust font management to defoma? Yes

Workgroup/Domain Name? (your choice, or WORKGROUP)

Use password encryption? yes

Modify smb.conf to use WINS settings from DHCP? No

How do you want to run Samba? daemons

Create samba password database, /var/lib/samba/passdb.tdb? No

LDAP server host address    127.0.0.1

distinguished name of the search base            dc=example,dc=net   (or a choice that agrees with your chosen domain name)

LDAP version to use       3

database requires login         no

make configuration readable/writeable by owner only   no

nsswitch.conf is not managed automatically... 

Send daily reminders to users over quota  No

Configuration file `/etc/dhcp3/dhclient.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D    : show the differences between the versions Z    : background this process to examine the situation The default action is to keep your current version. *** dhclient.conf (Y/I/N/O/D/Z) [default=N] ? N

Installing more packages for email, eBox software management and Jabber
If you want to, now is a good point to install packages that weren't installed by the script - pick and choose - but remember that the ebox-software tool will overwrite your general APT source.list with a restrictive eBox-only source.list, and some services may be restricted or interfered with (like media servers). apt-get install ebox-mail ebox-software ebox-jabber

SSH access after installation
During installation you may find that you lose your ssh connection toward the very end. This can be fixed by following these directions How to Enable SSH access. Once you have done this and saved changes, test it by opening a new terminal window and attempt to connect with SSH. Make sure you have connectivity before you reboot in the next step.

Initial Reboot
Before any changes are made to network or further settings, it seems to help to halt and cold boot again. Do this through the web interface. It may take some time (1-2 minutes) for everything to terminate, and another 2-3 minutes for it to boot.

HTTP Proxy settings
If you want to add software via apt-get or wget, your eBox will need http access. To do this, you may have to enable the Transparent Proxy.
 * Click on HTTP proxy -> General ;
 * choose
 * Service Configuration Enabled (Change) ,
 * Transparent Proxy - Enabled ,
 *  Content threshold - Very Permissive,
 * Global policy - Allow (Change) and then
 * Save Changes (upper right hand corner).

Network Settings, DHCP and DNS Problems
In Network, fill in your settings for DNS and Gateways, and Apply & Save Changes on each.

You can check your connection through the Diagnosis page. If you can't ping yahoo.com for instance, go back and check your settings for the previous two pages.

If you are having trouble reaching sites like mirrors.kernel.org or your favorite CPAN mirror, you may want to go to Network->Interfaces and set eth0 to DHCP, change and Save Changes. '''Do not set eth0 to External. This will kill your connection.''' If this change doesn't remedy it, check to see that you have enabled the Transparent Proxy.

Firewall
eBox's firewall is very strong and integrated. It uses iptables and can be controlled to a great degree from the web interface. Security comes at a cost, so here is how to get around it to some extent.

How to add an Allowed Service to your eBox's Firewall
Do you want to add an FTP or HTTP server to your eBox? Do it the normal apt-get way, but you will have to make eBox aware of it so that traffic can get through the firewall. See this HOW-TO How to make your eBox aware of Additional Services

Opening up ports for Firefly/mt-daapd
This can be very tricky to do. Firefly requires access to ports 3689 (tcp) and 5353 (udp). Port 5353 is used by mDNS and handles multicasting traffic. First, check to see that you have Firefly installed properly. If you do, you should be able to do both of these:
 * open a browser to   http ://:3689 and see the standard web page for Firefly
 * see port 3689 open using a port scanner pointed at your eBox.

You may have use the perl add-service-to-firewall script and then add a Service Allow via the eBox Firewall page.

In addition to that, you can allow multicasting and mDNS services with these commands: iptables -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT iptables -A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

Check your iptables now by issuing iptables -L --line-numbers and look for the lines marked with @@@@@@@@@ below Chain INPUT (policy DROP) num target     prot opt source               destination 1   ACCEPT     all  --  anywhere             anywhere 2   ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 3   ACCEPT     icmp !f  anywhere             anywhere 4   inospoof   all  --  anywhere             anywhere 5   iexternalmodules  all  --  anywhere             anywhere 6   inoexternal  all  --  anywhere             anywhere 7   imodules   all  --  anywhere             anywhere 8   iintservs  all  --  anywhere             anywhere 9   iobjects   all  --  anywhere             anywhere 10  iglobal    all  --  anywhere             anywhere 11  idrop      all  --  anywhere             anywhere 12  ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353<-@@@@@@@@@ Chain FORWARD (policy DROP) num target     prot opt source               destination 1   ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 2   ACCEPT     icmp !f  anywhere             anywhere 3   fnospoof   all  --  anywhere             anywhere 4   fredirects  all  --  anywhere             anywhere 5   fmodules   all  --  anywhere             anywhere 6   ffwdrules  all  --  anywhere             anywhere 7   fnoexternal  all  --  anywhere             anywhere 8   fdns       all  --  anywhere             anywhere 9   fobjects   all  --  anywhere             anywhere 10  fglobal    all  --  anywhere             anywhere 11  fdrop      all  --  anywhere             anywhere Chain OUTPUT (policy DROP) num target     prot opt source               destination 1   ACCEPT     all  --  anywhere             anywhere 2   ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 3   ACCEPT     icmp !f  anywhere             anywhere 4   omodules   all  --  anywhere             anywhere 5   ACCEPT     udp  --  anywhere             10.0.1.1            state NEW udp dpt:domain 6   ACCEPT     udp  --  anywhere             216.165.129.157     state NEW udp dpt:domain 7   ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:ntp 8   ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353 <-@@@@@@@@ Restart iTunes or check your Roku again and you should have streaming audio now. If it works, you can save it by issuing the command iptables-save

This change may not show up in the web interface of eBox.

Dropping the Firewall completely
This should only be done only if you have some other protection between you and the internet, or only for a very brief time. To do this you will need to alter (ahem...dirty hack) some code: nano -c /usr/share/perl5/EBox/Iptables.pm Scan down to around line 550, until you find this: # # sub start {        my $self = shift; $self->setStructure; my @dns = @{$self->{net}->nameservers}; foreach (@dns) { $self->setDNS($_); }
 * 1) Method: start
 * 1)       Start firewall service

and add this line of code (marked <-- here ##):

# # sub start {        return; ## New code added  <-- here ## my $self = shift; $self->setStructure; my @dns = @{$self->{net}->nameservers}; foreach (@dns) { $self->setDNS($_); }
 * 1) Method: start
 * 1)       Start firewall service

Save it and restart with /etc/init.d/ebox restart Your Firewall should be completely disabled now. You may also have change the rules related to general policies with the following commands to free all firewall stuff from eBox:

iptables -I INPUT -j ACCEPT iptables -I OUTPUT -j ACCEPT

Remember to reenable it when you are done with whatever you need to do. It can be reenabled by commenting out the line you just added in, and then restarting with /etc/init.d/ebox restart  again.

Speed and Performance Tweaks
10.0.1.12 blueandwhiteG3 10.0.1.20 bobspowerbookG4 Add these lines (or lines like them with your hosts ip and name) by editting /etc/hosts w/ nano or your favorite editor, or simple issue a command like this: echo "10.0.1.12 blueandwhiteG3" >> /etc/hosts
 * Add the IP address of any computer that you connect to your eBox with to /etc/hosts on the eBox, eg.


 * Drop the firewall completely. (see above)
 * Turn off any services that you don't use or need. (use web interface)

Links and References
eBox-Platform site pages
 * eBox-Platform Home Page
 * eBox-Platform Wiki/Trac
 * eBox User Archives/Mail List
 * Post a question at eBox User Mail Lists - Note: For English Interface click the language chooser on upper right corner of page.

nas-central.org forum thread - eBox on PPC Linkstations

Acknowledgements and Thanks
...a Team eBox-Platform : Javi, Isaac, Quique y todos... ...to Bauldrick for asking the right questions and help on the script...to ramuk for some snippets/ideas of/for code here and there... ...to mindbender, andre, ramuk & kuroguy for helping me get UBoot, telnet/ftp-enabled EM mode on my KuroHG so that putting on a fresh installation of Debian/FreeLink w/ kernel 2.6 & latest modules takes only 5 minutes...