Tips On Mozilla, ipchains, and Keeping Track of Your Config Files

I've heard a lot about the Mozilla browser and would like to use it instead of Netscape Communicator. How do I move all of my e-mail, addresses, and bookmarks?


I’ve heard a lot about the Mozilla browser and would like to use it instead of Netscape Communicator. How do I move all of my e-mail, addresses, and bookmarks?

First, download Mozilla from ftp://ftp.mozilla.com/ and install it. When you start up the application, it will ask you to create a profile for the user that you are currently logged in as. Complete the process of creating a new profile and make sure everything was installed and works correctly. You’re now ready to copy the data. The two main directories in the user’s home directory that Netscape uses are:

~/.netscape: This directory contains the user’s Address Book, Custom Dictionary, default bookmarks file, cookies, history, and other configuration files.

~/nsmail: This is the user’s main mail directory with all of the mailboxes that have been set up by the user.

Mozilla makes use of the following configuration directory: ~/.mozilla/userprofilename/. This is the equivalent to the ~/.netscape directory. It contains many of the user-configuration files that are listed under the .netscape directory, as well as the data from the nsmail directory.

Now that you know where everything should go, you are ready to copy the data. To migrate your address book, you’ll need to export it into a file from Netscape, then import the file into the Mozilla address book.

1. Start the Netscape browser.

2. Go to the “Communicator” menu bar and left-click on it, then left-click again on the “Address Book” menu option. This should bring up the “Netscape Address Book” interface.

Tech Support Comexport 2
Figure One: Exporting addresses from Netscape.

3. From the “File” menu option, select “Export.” (Figure One).

4. This will bring up a dialog box for the filename to be saved as, and the directory where it will live. To make things easier, make sure to save it to your home directory and to give the file the name that you would like to see in your Mozilla address book. For my own addresses, I named the file “Addresses.”

5. Close the Netscape browser and open Mozilla.

6. Click on the Address Book option in the “Tasks” menu.

Tech Support Mozilla 4
Figure Two: The Mozilla browser.

7. From the “File” menu, select “import.” This will also bring up a dialog box for the filename and the file’s location. Once the file is found, double-click on it, and it will import your addresses automatically.

Importing your e-mail from Netscape is easy; just use the copy command:

cp -pav ~/nsmail/*~/.mozilla/ userprofilename/

This command will show you all the files you are copying. The other switches help keep all of the attributes of the files with all of the same permissions.

Once you’ve copied these files, restart the browser and open the mail application by clicking on “Tasks” on the menubar and clicking on the mail option in the drop-down menu. You should see the files you copied over.

Transferring the bookmarks is easy. The bookmarks file is located in ~/.netscape, so to copy it over, use:

cp ~/.netscape/bookmarks.htm ~/.mozilla/username/

You have successfully transferred your address book, e-mail, and bookmarks to Mozilla.


I just purchased a Pentium 90 to act as a PPP-server and firewall. What graphical tools can I use so I don’t have to manually write the rules for ipchains?

Tech Support gfcc 1
Figure Three: gfcc‘s rule-edit window.

The first tool that comes to mind is gfcc, a GTK-based GUI tool that will help you create scripts via ipchains to implement masquerading, PPP masquerading, routable rules, and standalone rules. It also can modify your hosts files from the drop-down menu. The real beauty of this tool is its ability to import an already existing firewall script. Installing this package is fairly simple, and the instructions are very straightforward. Check out http://icarus.autostock.co.kr/ for more info.

Another tool is a KDE application called kfirewall. I found that it is not as flexible as gfcc, but that it is also less complex. kfirewall helps you create simple rules for your basic firewall configuration. It gives you the option to close a port from the rest of your network or the Internet. In the help menu, it describes the ports that are exploited the most. It also allows you to toggle masquerading from the drop-down menu. You cannot, via kfirewall, specify a specific protocol or redirection, configure a transparent proxy, or manually save the chains command for a firewall script. You must also reset the tool once the machine is turned off.

Tech Support KFirewall 3
Figure Four: kFirewall is not as flexible as gfcc.

Then there’s gfirewall, a GNOME application that will help create and manage ipchains from a file or from scratch. It doesn’t come with any lengthy information except a button that actually quotes the IP-CHAINS-HOW-TO.

In order to use these tools, make sure that your kernel is compiled with the appropriate options:

Network Firewalls: If you want to protect your local network from the Internet, you’ll need to enable this in order to create a packet-filtering firewall. It can block traffic on the basis of type of packet, origin, and destination. This option also is needed if you intend to create a proxy firewall, which does not need direct kernel support but which is usually used with filtering.

IP: Firewalling (CONFIG_IP_FIREWALL): This is also needed to create a packet-filtering firewall for local TCP/IP-based networks.

IP: Transparent Proxy Support
This will enable your Linux firewall to redirect network traffic transparently from a local network to a remote network destination. It makes local machines believe they are talking to the outside world when they are connected only to the local proxy server. ipchains is used to implement this type of firewall support.

If you are not familiar with recompiling the kernel, read the HOWTO at http://sunsite.utk.edu/LDP/HOWTO/Kernel-HOWTO.html. Also read the Linux Magazine story on setting up ipchains (http://www.linux-mag.com/1999-05/bestdefense_01.html).

App Tips

* LinZip: People who are moving from Windows to Linux often have problems extracting compressed files like tar, tar.gz, tgz, lzh, arj, and gz files. Some of the switches for each of those formats are a little tricky if you are a beginner. This application is a full-featured compression utility that is similar to WinZip on the Windows platform. It is free for personal use. http://www.linzip.com

* fuser is an old Unix utility that you can use to identify processes using files or sockets. I had a lot of uses for it when probing the system to identify exactly what a certain script was doing after execution. I have found it on most of the RPM-based systems, but you can get it from the psmisc-18-3 RPM package on the installation CD-ROM, or from http://www.rpmfind.net.

* rpmfind: This utility can be very helpful when you are connected to the Internet but unsure if you have the currently installed RPM package that you need. With a few simple commands, I was able to search the rpmfind database by name, then install the upgraded version that would bring me up to date on what I needed. http://www.rpmfind.net

Gaylen Brown is a senior consultant at Linuxcare, Inc. He can be reached at tech@linux-mag.com.

Comments are closed.