Set up Hylafax and Windows client WHFC in a corporate environment

By Ignacio Garcia: y123456o@ignasi.com (Delete the 123456 string to get the right address)

First and Last Revision: 2004/04/23

Abstract: This Document describes how to set up a Hylafax FAX server under Linux, using 1 modem (it could be more) for fax calls, and installing and configuring WHFC in Windows.


These guidelines should work with any recent Linux distro, but as of today, SuSE Linux 9.0 is my favorite one, so this has only been tested under SuSE 9.0. I assume you, the reader, are proficient with Linux.

 

Setting the server

First, install the hylafax rpm (recommended) or download it from Hylafax Web Page and compile it. I have used version 4.1. The easiest way to do this in SuSE is to launch yast, search for it and have yast install it for you.

Edit /etc/inittab and check that the following line is uncommented:

mo:35:respawn:/usr/lib/fax/faxgetty /dev/modem

Restart init with:

init q

I assume your modem is already configured and the serial device linked to /dev/modem. I highly recommend not using any controlerless or software controlled modem, such as winmodems. For this experiment, I used an external Hayes Accura 56k modem, which works as a class 1 and 1.0 fax modem.

Then, as root, launch faxsetup. Answer the questions. It will ask you for international and long-distance prefixes. Here in Spain we do not use long-distance prefixes. I put the same for both prefixes. Later we will discuss more on that. Once the system configuration questions are answered, the program will ask you to launch faxaddmodem, a utility to configure your modem and make it work under hylafax.

The program will ask you what device you want to use. Just typethe name of the device, i.e. ttyS0. The first time, I spent 2 minutes typing again and again until I noticed that /dev was already assumed and therefore /dev/ttyS0 was not a valid answer (I guess I was in a hurry because the program is very clear about that.)

If you just want Hylafax act as a sending fax service (no answer to incoming calls) when asked for RingBeforeAnswer, set it to 0. I´ll tell you later how to change this manually.

On SuSE 9.0 Hylafax files are places on /var/spool/fax. There are many directories. check the etc subdirectory. There you´ll find some important configuration files. You´ll see the config file, your config.modem file, as well as the hosts file (under SuSe 9 this is called hosts.hfaxd, and please, do not confuse it with /etc/hosts, that is a different file). If you leave in Europe, check that your modem´s config file has the next entry as follows:

DialStringRules: "etc/dialrules.europe"

Remeber the long-distance prefixes we were talking before? With this dial rule, I did not have to worry about that.

Also, in this config file, you will also find other settings for your modem that can be changed manually, such as RingBeforeAnswer.

The hosts file is used to set access permissions to the server from the clients. You can set them up as IP addresses, usernames with or without passwords, or you can even use wildcards.

For instance, if you want to enable access from IP No. 192.168.1.10 in your LAN, just add this IP to your Hylafax hosts file.

Use faxadduser and faxdeluser to add or delete users into the hosts file. Use -p to set a password for the user, and -a to set an admin password for the user.

Setting the Windows clients

For this experiment I wanted to test WHFC. As of the time of this writing, version 1.2.3 was the lastest and recommended. It adds many improvements against the old series (1.0.9).

Download and install the application. Then set up a new printer that will act as a FAX. Following WFHC guidelines, I used a Apple Laserwriter printer driver hooked to the new WHFC FAX port.

Communications between the clients and the server is initiated through tcp port 4559. After that, the server will choose random ports to communicate with the windows clients. If yor LAN communications are unrestricted, you won´t have any problems. However, if they are restricted indeed through the use of a firewall solution, and you are the syadmin of that firewall, you might want to set the client to use PASV communications. The way Hylafax and the clients communicate is very much alike the FTP PASV protocol. Tell the firewall machine to install the ip_conntrack_ftp and ip_nat_ftp modules with options port=21,4559. This is done by modifying /etc/modules.conf as follows:

options ip_conntrack_ftp port port=21,4559

options ip_nat_ftp port=21,4559

Then reboot.

Instead, if you use shorewall as firewall/router, modify your rules accordingly, and modify /etc/shorewall/modules as follows:

loadmodule ip_conntrack_ftp ports=21,4559

loadmodule ip_nat_ftp ports=21,4559

Reboot.

You should now be able to use your new fax system.

If you have problems, drop me an email or visit Hylafax and WHFC for further info. They have very helpful FAQs and mailing lists.

-