8.7. Compiling and Installing firewall policies

Note: This section offers a quick description of the process to compile and install a policy. Chapter 9 contains more detailed instructions on installing a compiled policy onto your firewall device.

Once you have a policy created, you need to compile it into a script that can run on your target device. You then need to install it on that device.

Let's walk through compiling and installing a simple iptables firewall onto a Linux machine. Here is the access policy of the firewall:

Figure 8-60. A policy to compile and install

To compile it, select the firewall icon, then select Rules/Compile.

Figure 8-61. Select Rules/Compile

Select your firewall in the dialog. If your object file has more than one firewall, you will see an entry for each firewall. To compile several of them at once, just check the checkboxes.

Figure 8-62. Select your firewall

Click Next.

A dialog appears that tracks the status of the compile. If everything goes well, the output will look something like this:

Figure 8-63. Compile status messages

If you get an error, see Section 12.3.

To see the created script, look in the same directory as your .fwb file. The file will be called <firewallName>.fw. (If you changed your default directory in the Preferences, then the generated script will be there instead.)

Note: This rest of this section offers a quick description of the process of installing a policy. Chapter 9 contains more detailed instructions, including how to set up SSH on a variety of platforms.

Create directory /etc/fw/ on your firewall.

Now let's install the script using Firewall Builder's "install" functionality. Select Rules/Install.

Figure 8-64. Select Rules/Install

The following dialog appears:

Figure 8-65. Select Install

Make sure the Install checkbox is checked, then click Next. The following dialog appears:

Figure 8-66. Firewall SSH and install parameters

Enter the root username and password for the device, and specify the IP address of the management interface of the device. The first time you test your firewall, it's best to leave the Test run checkbox checked. If something goes wrong, you have only to reboot your device to get back the old configuration. If, however, you want your policy to be permanent on the device, uncheck this box.

Then click OK.

If everything goes well, the following dialog appears and reports success. (If not, it will report failure. The log will tell you what went wrong. If the error is unclear, see Section 12.3.)

Figure 8-67. Installation status

Log into the firewall to see the policy in place. For iptables, run sudo iptables -L.

 

Copyright © 2000-2008 NetCitadel, LLC. All rights reserved.
 Using free CSS Templates.