3. Usage
Once the FireLance cgi has been installed browse to the servers cgi like this:
http://localhost/cgi-bin/firelance or
http://servername_or_IP/cgi-bin/firelance
The server running as a firewall (hence running FireLance as a service of the web server, hereby the FireLance server) must be multihomed, have two network interfaces to connect to. i.e. An internal network interface probably ethernet and an external (WAN/internet, wide area network) connection. FireLance functions correctly only in this situation. A typical scenario is if the FireLance server is connected to a Cable/DSL line via an ethernet connection and by another ethernet connection to your LAN (local area network). The Cable/DSL connection is the WAN/internet connection. When you first load FireLance it will attempt to discover and display your ethernet connections e.g. please note these values are totally bogus, just examples

There must be two interfaces for the firewall to function correctly. Below this information you can select which is to be the external (WAN/internet) interface and which is to be the internal (LAN) interface.

DO NOT get this wrong as this will render the whole firewall useless and potentially dangerous (don't worry we will run a minor test on the firewall after setup to make sure it is functioning correctly). Now continue onto the general usage instructions below.
There is one configuration file /etc/firelance.conf, it is not needed to be used in normal circumstances. However if you wish to force the use of a different interface say ppp0 which will not at this time be found by FireLance you can use this file to force its usage. At present the only settings available in the file are the WAN and LAN interfaces e.g.
# FIRELANCE version0.2
#
# http://johnwiggins.net/firelance/
# firelance@johnwiggins.net/
#
WAN=eth0
LAN=eth1
There are no spaces on a line, comments start with a '#' character. So to change the WAN to be the ppp0 interface just replace eth0 with ppp0. Refresh the browser and the ppp0 interface should turn up as a choice in the selections for interfaces section.
In suid installed mode.
To set up a NAT firewall all that is needed is to browse to FireLance and issue four commands by clicking on the appropriate buttons at the bottom of the FireLance page.

In non suid mode.
Set the options for the script how you want them and click the Create Script button. Now highlight/copy and paste the script text that is displayed in the results section of the page into your favorite text editor and save this file. Make the file executable chmod 755 scriptname. Now run this script as root to start the firewall. It is advisable at this point to also save the rules as the default rules for the FireLance server.
e.g. as root
myconsole:~ /etc/init.d/iptables save
myconsole:~ service iptables on (redhatesque distros)
myconsole:~ update-rc.d iptables defaults 40 S (debianesque distros)
After this check to see that the firewall is actually running.