Next Previous Contents

4. Installation and Configuration

4.1 Installing the Scripts

If you are using RedHat Linux 5.x or SUSE Linux 6.x you can use the firewall-masq-diald-rh5x-0.10-1.i386.rpm or firewall-masq-diald-suse6x-0.10-1.i386.rpm respectively to automatically install both the firewall-scripts and the HOWTO.

To install the scripts on other distributions you need to untar firewall-masq-diald-0.11-1.tgz to a temporary directory, preferably /tmp, and follow the installation instructions (se the file INSTALL) to do it by hand.

After successful installation you have to configure the scripts to reflect exactly what your environment needs. This is described in the following paragraphs.

4.2 Configuring /etc/rc.d/rc.firewall.var

To adapt the main script to your environment various variables have to be set. Here's a description of them with example values:

There's no need to configure either /etc/rc.d/rc.firewall.diald.add, /etc/rc.d/rc.firewall.ipchains.diald.add or /etc/rc.d/rc.firewall.diald.del, /etc/rc.d/rc.firewall.ipchains.diald.del.

4.3 Configuring /etc/rc.d/rc.local

Only a few lines have to be added to /etc/rc.d/rc.local. These are:


if [ -f /etc/rc.d/rc.firewall ] ; then
        # set the firewall rules to the default 
        # these are the same as diald uses when the connection is terminated
        . /etc/rc.d/rc.firewall.del
fi

/sbin/irqtune 3

where 3 is the number of the interrupt used for the second and forth serial port. If your modem or ISDN terminaladapter is connected to the first or third serial port the number will be 4. The first serial port is also known as COM1, the second as COM2 and so on.

You can also add a second number for the slave interrupt controller, e.g. 11 which is used for a SCSI card on my system. For more information see irqtune or the irqtune homepage.

4.4 Configuring /etc/diald.conf

If you are using diald the following 2 lines must be added to /etc/diald.conf and diald must be restarted:


addroute /etc/rc.d/rc.firewall.diald.add
delroute /etc/rc.d/rc.firewall.diald.del

All other configuration options will not be touched, that's your turn! As said before you should have already a working system with diald set up correctly prior to installing the scripts!

4.5 Hints on using DIALD in various environments

When using diald you should carefully consider which services you will use automatically. E.g. if you configured your email program to check for new email every 15 minutes, regardless on which platform, then diald calls your ISP every 15 minutes.

In the USA this is a minor problem since you lucky US guys do not have to pay for each call to your ISP but in germany and many other european countries each call counts.

Users of Netscape Communicator 4.5x and higher (each platform) should add the following line to their prefs.js file (Windows 95/98/NT) found in e.g. C:\Program Files\Netscape\Users\Defaultuser\ or to preferences.js (linux) found in ~/.netscape:


user_pref("mailnews.start_page.enabled",false);

This line tells Netscape Messenger not to automatically connect to Netscape Netcenter when opening Netscape Messenger.

Remember to exit all Netscape windows BEFORE changing the file!

There may be some other services which regularly check for new information (maybe ICQ, any news ticker, ...) which I didnīt figure out yet, and make diald open the connection. As soon as I get information on that issue I will publish it and update the HOWTO. If someone knows about such services I would appreciate her/his hints!

4.6 Differences for static IP setup

If you use a static IP address assigned to your dial-up firewall box from your ISP you only have to adapt /etc/diald.conf with the appropriate settings which you normally should have done before.

You have to omit the option

dynamic

and change the line

local 192.168.1.1

with the IP address assigned to your firewall box by your ISP.

4.7 Differences for leased line setup

When you are a lucky guy and you own a leased line you are for sure using a static assigned IP address. Since there's no need to use diald you will not install the scripts /etc/rc.d/rc.firewall.diald.add and /etc/rc.d/rc.firewall.diald.del or /etc/rc.d/rc.firewall.ipchains.diald.add and /etc/rc.d/rc.firewall.ipchains.diald.del. Therefore in /etc/rc.d/rc.local the line

. /etc/rc.d/rc.firewall.diald.del

must be replaced with the lines

. /etc/rc.d/rc.firewall.var
. /etc/rc.d/rc.firewall ppp0 "$NETINTERN"

or

. /etc/rc.d/rc.firewall.ipchains.diald.del

must be replaced with the lines

. /etc/rc.d/rc.firewall.var.ipchains
. /etc/rc.d/rc.firewall.ipchains ppp0 "$NETINTERN"

Additionally you'll have to change the ppp0 part of the last added line to reflect your external interface used for the leased line.

Of course no changes to /etc/diald.conf can be made because this file should be absent in leased line configurations.

4.8 Special Considerations for various Services

In order to make ftp work youīll have to include the line /sbin/modprobe ip_masq_ftp in /etc/rc.d/rc.firewall or /etc/rc.d/rc.firewall.ipchains which is already done in the shipped rc.firewall or rc.firewall.ipchains script.

Here is a list of all additional modules which are shipped with kernel 2.0.36 which can be found in /lib/modules/2.0.36/ipv4:

Additional modules are shipped with kernel 2.2.x. These are:

If there is need of using one or more of them simply put in a line like /sbin/modprobe ip_masq_cuseeme at the beginning of /etc/rc.firewall.

4.9 What to do with poor Performance

If you encounter perfomance problems it is likely a problem with the serial line if using a modem or ISDN terminaladapter via the serial line.

Dialdīs ppp options

Some beta testers encountered performance problems with 56k modems with a diald connection. After using the following ppp-options in /etc/diald.conf the performance was back to normal:


ppp-options noccp noipx noproxyarp

Please note: The options should be added to your already existing ppp-options line in /etc/diald.conf!

Thank you Flo for this hint!

Another helpful tool: irqtune

For people who find their connection is still pretty slow compared with e.g. windows should try irqtune from http://www.best.com/~cae/irqtune/. For RedHat users an rpm package is also available there.

irqtune changes the priority of interrupts which on a standard installation often causes the serial interfaces to be of very low priority. With irqtune you can change this behaviour and get a speed up of up to 3x for modem connections. But you canīt expand the bandwidth of your modem with irqtune! You only tell the kernel to use the interrupt of the serial interface before any other interrupt.

I use /sbin/irqtune 3 11 in /etc/rc.local to set the serial interfaceīs irq on the master controller (3) and the irq of my SCSI card on the secondary controller (11) to the highest priority.

More information about this tool can be found on the irqtune homepage (see above).


Next Previous Contents