beautypg.com

Restoring the, Zgate default static configuration – Zilog EZ80F91GA User Manual

Page 31

background image

UM024502-1012

Using the ZGATE Demo Sample Program

ZGATE Embedded Security Development Kit

User Manual

19

The following procedure provides a sequence for blacklisting specific IP addresses.

1. Run the ZGATE_Demo project. In your browser, navigate to the IP Address configu-

ration page. Note that Filtering Mode is set to Disabled and that the Add, Update, and
Cancel buttons are not present.

2. Click the

Startup Settings

link, and cut and paste the information in the Startup sec-

tion displayed in your browser to a new text file on the PC. Name this file

zg_rules.usr

, and place it into an appropriate folder on your PC.

3. Next, edit this text file so that the IP_SRC_ADDR_FILTER line is modified to:

C, 3, IP_SRC_ADDR_FILTER, BLACKLIST

Save the file.

4. Switch to a command prompt on the PC and open an FTP session to ZTP. (If TCP

Ports 20 and 21 are not enabled in ZGATE, it might be necessary to browse the TCP
Port configuration page and add ports 20 and 21).

5. Issue a

put zg_rules.usr

command in the FTP program to transfer the modified

configuration file back to ZGATE.

6.

In the browser, refresh the Startup Settings page and note that IP_SRC_ADDR_FILTER
has been changed to BLACKLIST Mode.

7. Because ZGATE only reads this file during initialization, it is necessary to reboot

ZGATE. ZGATE can be rebooted, for example, by entering

reboot

in the ZGATE

Demo console.

8. After the ZGATE demo restarts, browse the IP Address page and note that the filtering

mode is now BLACKLIST and that the Add, Update, and Cancel buttons are present.

9. At this point, it is necessary to determine the IP address of a machine on the network

to blacklist. On a second PC, browse the ZGATE web page to verify that it is initially
able to access ZTP. Open a command prompt on this second PC and issue the

ipcon-

fig

command. Record the resulting IP address.

10. Switch to the browser on the first machine and add the IP address you recorded in

Step 9

to the list of IP addresses to be blocked by ZGATE.

11. After entering the IP address of the second PC, click the

Update

button.

12. On the second PC, refresh the web page and note that the page fails to load because

this PC has now been blacklisted.

Restoring the ZGATE Default Static Configuration

At startup, ZGATE reads its initial configuration from a file in the Zilog File System
(ZFS) or from the rules defined in the

ZGATE_Conf.c

file that is linked to the ZTP appli-

cation.