Version 1 (modified by benoitg, 16 years ago)


Client installation on a Debian based PC

  • Install two network interface cards into your PC. One will be connected to your internal network or internet connection, and the other will be connected to a wireless router.
  • Install Debian minimal install.
  • Run apt-get update and apt-get upgrade to ensure that your installation is up to date.
  • Ensure that the /etc/network/interfaces file is configured correctly and that both network interfaces are configured - for example:
iface eth0 inet static

iface eth1 inet dhcp

You should visit for a comprehensive network configuration tutorial.

  • You now need to bridge eth0 and eth1 so that your wireless clients can connect to the internet through your internet connection.

To accomplish this you will need to ensure that you have a proxy script in place using iptables (much like internet connection sharing if you come from a Windows background).

If you are using Debian then you're in luck. You will find a full tutorial for setting up IPTABLES for NAT Linux Proxy Server at Just follow the rules there, test to ensure that you can connect to the internet via your wireless interface with the rules in place, and then and only then try your wifidog client installation. Don't forget to read the tutorial all the way through, and MAKE SURE THAT YOU CAN GET AN INTERNET CONNECTION THROUGH THE WIRELESS INTERFACE NOW!

  • Navigate to /usr/src/ and grab a copy of wifidog wget URL-HERE You then need to decompress it gunzip WIFIDOG-FILE then untar tar -xvf yourcopyofwifidog.
  • Go to the place wifidog decompressed to and run:
make install

If you get any errors check to ensure that you are running the latest compiler.

  • Move wifidog.conf to /etc/ : mv wifidog.conf /etc/ and edit the options there (the file is commented so you know what to change.
  • Type wifidog -f -d 7 to run wifidog in the foreground with full debugging. If everything is working OK you should see lots of output and be able to get to your portal screen.


If you want to have a little more power over your DHCP settings, you may want to consider running DHCP from your wifidog gateway box rather than your wireless access point. You can do this on Debian by installing DHCPD.

First of all to get DHCP server you need to run apt-get install dhcpd

When you have the DHCP server you need to set it up. First of all run the following command:

/etc/init.d/dhcp stop

This will stop the DHCP server so that you can change the configuration scripts. You will need to set the interface card that you wish the DHCP server to operate the service on, and give it a range of IP addresses and networking information to give to client PC's.

To change the interface you want the DHCP service to run on you need to edit /etc/init.d/dhcp and input your network interface here (the standard value may be OK):

# Defaults

To change the network information issued via your DHCP server you need to edit the /etc/dhcpd.conf file. I've included the one I use as an example for you. Read on for an explanation of the different components:

default-lease-time 10800;
max-lease-time 28800;

subnet netmask {
option routers;
option domain-name-servers;
  • default-lease-time = the default time that your client is issued an IP address for.
  • max-lease-time = the maximum time that your client is issued an IP address for.
  • subnet = the subnet of the IP range you are issuing the client, in this case is the subnet of (take the last number off your range and change to 0)
  • netmask = the mask applied to your subnet range giving the available number of IP address. In this case allows only the last section of the IP address to be changed.
  • range = the range of IP addresses you want clients to be able to get from dhcp.
  • option routers = the network interface card in your gateway that is running dhcp.
  • option domain-name-servers = your DNS server (perhaps supplied by your ISP?)

When you have fiddled with the options, and have everything up and running then you will want to restart the DHCP:

/etc/init.d/dhcp start

That is DHCP set up now. If you want to test it, either connect wirelessly via your bridged access point or connect a cross over cable to your gateway ethernet card and another PC to see what network details it gives you.

Auth Server

Installing the Auth Server on Debian Sarge - The rough and ready guide!

  • Grab the minimal install of Debian Sarge and install to your server. Ensure that you have 'testing' sources added to your apt configuration file.
  • Do an apt-get update and an apt-get upgrade to update your Debian installation and grab the latest sources to your apt cache.
  • Install Apache2 apt-get install apache2
  • Install PHP5 for Apache2 apt-get install libapache2-mod-php5
  • Install PostgreSQL apt-get install postgresql-8.1
  • Install PostgreSQL support for PHP5 apt-get install php5-pgsql
  • If you wish to use PEAR, you can download the Debian package from the unstable branch by running apt-get install php-pear You will also need curl support for php which you can get by running apt-get install php5-curl
  • Download the latest copy of Wifidog Auth and untar it to your web directory.
  • Run install.php and follow the guide there to get your Auth server going. If you get problems with missing modules like pgsql, then try restarting Apache apache2 -k restart a couple of times to ensure that the changes have applied properly.
  • Edit config.php to suit your needs.

More coming soon.

Configuring the postgresql database for wifidog installation

You will need to create a user and a database for your wifidog installation. You need to make a note of the username and password of your user, and the name of your database. You will need these during the install process.

  • Creating a postgresql user

Switch to the postgres database user account su postgres then type the following to set up your new user and create the database, make sure that you press enter after each line. Be careful when typing the code ensuring you don't miss the semicolons!

$ psql
-> CREATE USER wifidog
-> WITH PASSWORD 'yourpassword';

-> WITH OWNER wifidog;

You should now be the proud owner of a wifidog database! To exit the pgsql command tool type '\q' To change back to the root user again type 'su root' and then your password when prompted.