StoneOS Cookbook V5.5R11
StoneOS Cookbook V5.5R11
StoneOS Cookbook
Version 5.5R11 V12
TechDocs | docs.hillstonenet.com
Copyright 2024 Hillstone Networks. All rights reserved.
Information in this document is subject to change without notice. The software described in this document is
furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in
accordance with the terms of those agreements. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted in any form or any means electronic or mechanical, including photocopying and
recording for any purpose other than the purchaser's personal use without the written permission of Hillstone
Networks.
Hillstone Networks
Contact Information:
US Headquarters:
Hillstone Networks
Phone: 1-408-508-6750
http://www.hillstonenet.com/about-us/contact/
This guide gives you configuration instructions of Hillstone Networks StoneOS user scenarios.
Hillstone Networks
TWNO: TW-CBK-UNI-5.5R11-EN-V12-7/15/2024
Contents
Contents
Overview
Target audience 2
StoneOS Versions 2
Reading Sequence 2
Clicking OK or Apply 3
Getting Started
Preparation 5
Preparation 9
Upgrade Steps 10
Configuration Steps 16
1
Allowing Internet to Visit a Private Server Using DNAT 21
Configuration Steps 22
Configuration Steps 27
StoneOS 31
Zabbix: 33
Scenario 38
Configuration Steps 39
Preparation 48
DNS Proxy 57
Scenario 57
Preparation 58
Configuration Steps 59
Q&A 62
Preparation 63
Configuration Steps 63
Device A 63
2
NETCONF Client 64
Binding the Log Processing Process and Database Storage Process to Core MAX 68
Configuration Roadmap 68
Configuration Steps 69
DHCP ZTP 71
Networking Scenario 71
Preparations 71
Procedure 72
Routing
Configuration Steps 75
Configuration Steps 84
Configuration Steps 93
Authentication
Configuration Steps 99
Preparation 107
3
Configuration Steps 108
Preparation 116
Preparation 127
Preparation 138
VPN
Connection between Two Private Networks Using IPSec VPN (IKEv1) 147
Device A 147
Device B 153
Connection between Two Private Networks Using IPSec VPN (IKEv2) 160
Device A 160
Device B 166
Device A 173
4
Device B 179
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 186
Device A 186
Device B 189
Allowing Remote Users to Access a Private Network Using SSL VPN 199
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 230
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 249
5
Configuring IPSec VPN 252
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 264
Connection between Two Private Networks Using GRE over IPSec VPN 277
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 298
Preparations 300
6
Windows User Remotely Accessing Internal Server Through ZTNA 314
Preparations 316
Preparations 337
High Availability
Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the Continuity
of Service 355
Verification 358
Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on HSVRP,
which Ensures Uniterrupted Business Traffic 360
Verification 366
7
M0D1 and D0M1 Working Normally 366
Q&A 379
Threat Prevention
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection 390
8
Preparation 414
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 416
Preparations 417
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on the VM 431
Preparations 432
9
IoT Asset Identification Configuration 434
VM Configuration 434
VM Configuration 447
Data Security
Preparation 456
IPv6
10
Configuring Networks of Branch A 468
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 474
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 483
Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel 494
11
Result of Scenario 1 510
Change Log
Cookbook V1 513
Cookbook V2 513
Cookbook V3 513
Cookbook V4 514
Cookbook V5 514
Cookbook V6 514
Cookbook V7 515
Cookbook V8 515
Cookbook V9 515
12
StoneOS Cookbook
Overview
StoneOS Cookbook provides configuration examples for you to user Hillstone network security products. This books covers basic get-
ting-started cases, firewall functions, and advanced user scenarios. All configuration uses graphic user interface (GUI), or also known as
web user interface (WebUI), not command line interface.
Each recipe consists of two parts: scenario settings and configuration steps. Topology and screenshot are used to assist you in under-
standing the key information of the case.
StoneOS Cookbook is very helpful in understanding operational logic, and improving efficiency.
Overview 1
StoneOS Cookbook
Before you read the book, there are a few tips you need to know.
Target audience
Cookbook is written with new users in mind. However, if you use this book, you still are required to know how to use WebUI, connect
cables and log in the system. Such information can be found in Getting Started Guide.
StoneOS Versions
With system updates, the user interface is subject to change, and WebUI layout may vary depending on hardware platforms. This cook-
book may not comply with every detail on WebUI, please check your web pages for difference when you use this book.
Reading Sequence
When you open the book, it is better to read it in the sequence below:
3. Go through step key points (marked as "Step1", "Step2") to understand configuration logic;
4. Read the left text and right screen shots to get the details.
5. Configure your device accordingly, but substitute with your own IP address or names.
The step details are explained by combing description text and screenshots. The text on the left gives configuration details, highlights
and notes; the sceenshot on the right is the exact screen capture of this step.
In this cookbook, the chapter "Getting Started" is the prerequisite for other chapters. Other chapters deem that the protected network
has already finished its basic networking settings mentioned in the Getting Started chapter. In other chapters, steps like NAT, default
routes and DNS are not included. So, when you reference to user scenarios in chapters other than Getting Started, you should ensure
that your protected network has already been basically established.
This book explains function configuration by writing scenarios (also called "cases" or "recipes"). Interface addresses, object names, and
topologies are the real laboratory settings. When you configure your own network, substitute the names and addresses with your real
names and addresses.
Clicking OK or Apply
Generally, when you finish filling or editing an option, you must click OK, Apply, or Confirm button to make the setting take effect.
This kind of operation is universal. This book will not write specifically about this operation otherwise else is needed.
Getting Started
o "Binding the Log Processing Process and Database Storage Process to Core MAX" on Page 68
Getting Started 4
StoneOS Cookbook
As an exit of the company's network, security device provides protections and services. Now, admin need upgrade firmware to optim-
ize system's performance and get new functions.
Preparation
o See the system software version by using WebUI or CLI(show version) to get a suitable upgrading instructions.
o See the release notes of the target version to get a platform upgrading instructions.
o Do not upgrade at peak times, because you need to reboot device to make new version effective.
o Upgrade from CLI if your device's storage is low, and remember to remove the former firmware version before you upgrade.
o Make sure you have backed up the configuration file before upgrading.
Contact us (Service Line:1-800-889-9860) first when you are in the following situations:
o Make sure whether license is out of date. If it expires, you only can upgrade system to the version whose release date is before the
license expired date. If it doesn't expire, upgrading can be continued. Contact us for the release date.
o Do not cross upgrade. For example, to upgrade the versions 4.0 to 5.0, Hillstone recommends you to first upgrade to version 4.5,
and then upgrade to 5.0. Contact us for cross version upgrade.
Step 1: Logging in via WebUI with admin accout and viewing current system information.
Step 3: Uploading upgrade file and rebooting system. Before uploading, make sure your upgrade file is suitable for your plat-
form.
Step 1: Logging in system via Telnet, and viewing the current version.
2. Click Open.
Step 2: Upgrading your device. We upgrade with USB port in this example. Please put your upgrade file in your U-Disk, and
then put it into the USB port of security device.
The topology gives a typical user scenario for HA. In the designed scenario, one (Device A)of the HA devices will be working under
the active mode, while the other (Device B) is under the passive mode. The two devices use heartbeat cables to maintain communication
between devices. Device A and Device B need to be upgraded from StoneOS 5.5R8 to StoneOS 5.5R9.
Preparation
3. Obtained the current configurations of the two devices by WebUI or CLI(show configuration) , and back up the cur-
rent configurations.
4. Disable the preempt mode if it is enabled. You can enable the preempt mode when the upgrading is completed. If track objects
are bound to the HA group, removing the binding. You can resume the binding when the upgrading is completed.
Note: To switch over traffic, you are recommended to upgrade the devices in HA mode through the CLI.
Upgrade Steps
1. Take the device B offline by removing the service cable from device B first and then removing the HA heartbeat cable from
device B.
Device B
save
The detailed steps for device upgrade, see "Upgrading Firmware to Higher Version" on Page 5.
4. After device B reboots successfully, check whether the version of device B and its HA configuration are correct and whether
the configuration is lost.
Device B
show configuration
5. View the priority values of Device A and Device B. Make sure the priority value of device A is less than that of device B. That
is to say, device A has a higher priority than device B.
Device A
Device B
Notes: If the priority value of device A is larger than that of device B, modify the latter to make sure device A has a higher priority.
Reconnect the HA heartbeat cable on device B. Wait for device B to complete HA negotiation with device A. In this case, device A
is the master device. Then, reconnect the service cable on device B.
Device A
2. Check whether the ARP table, session information, etc. are synchronized.
Device A
show arp
Notes: After executing the show logging alarm command on master device A. When the prompt "Admin batch syn-
chronization of HA group 0 has completed." appears, it suggests that configuration synchronization is completed
3. Switch the master and backup devices by manual. In this case, device B is switched to the master device.
Take the device A offline by removing the service cable from device B first and then removing the HA heartbeat cable from device
A.
Device A
save
The detailed steps for device upgrade, see "Upgrading Firmware to Higher Version" on Page 5.
4. After device A reboots successfully, check whether the version of device A and its HA configuration are correct and whether
the configuration is lost.
Device A
show configuration
5. View the priority values of Device A and Device B. Make sure the priority value of device A is larger than that of device B.
That is to say, device A has a lower priority than device B.
Device A
Device B
Reconnect the HA heartbeat cable on device A. Wait for device A to complete HA negotiation with device B. In this case, device B
is the master device. Then, reconnect the service cable on device A
Step 4: HA Synchronization
Device B
2. Check whether the ARP table, session information, etc. are synchronized.
Device B
show arp
Notes: After executing the show logging alarm command on master device A. When the prompt "Admin batch syn-
chronization of HA group 0 has completed." appears, it suggests that configuration synchronization is completed
Device B
The scenario sets up a requirement that the private network users are not allowed to access Internet during work time. As the topology
described, polices and schedules work together to allow internal users to access to server in another zone during work hour (9 a.m. to 17
p.m.). When it's not working time, the server cannot be accessed.
Configuration Steps
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o Zone: dmz
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 255.255.255.0
o Type: Daily
o Name: work
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: dmz
o Address: Any
o Other Information
o Action: Permit
o Name: rest
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: dmz
o Address: Any
o Other Information
o Action: Deny
o Destination: 0.0.0.0
o Subnet Mask: 0
o Gateway: 10.10.1.1
Step 5: Results
As shown in the topology, the FTP server hides its internal IP address using DNAT rule. DNAT rule will give the server an Internet IP
address for FTP users to access. In this way, the server can be accessed from Internet.
Configuration Steps
o Zone: dmz
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 24
o Zone: untrust
o Type: Static IP
o IP Address: 221.224.30.130
o Netmask: 20
o Name: untrust_dmz
o Source Information
o Zone: untrust
o Address: Any
o Destination
o Zone: dmz
o Address: Any
o Other Information
o Action: Permit
Select Policy > NAT > DNAT, and click New >
Advanced Configuration.
o Requirement:
o Translated to:
o Destination: 0.0.0.0
o Subnet Mask: 0
o Gateway: 221.224.30.1
Step 5: Results
As shown in the topology, via SNAT, internal PCs use the eth0/3 (221.224.30.130/20) to visit Internet.
Configuration Steps
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 24
o Zone: untrust
o Type: Static IP
o IP Address: 221.224.30.130
o Netmask: 20
o Name: trust_untrust
o Source Information
o Zone: trust
o Address: Any
o Destination
o Zone: untrust
o Address: Any
o Other Information
o Action: Permit
o Name: snat_IP
o Requirement:
o Translated to:
o Destination: 0.0.0.0
o Subnet Mask: 0
o Gateway: 221.224.30.1
Step 6: Results
The following shows a network environment. The device connects to Zabbix using SNMPv2 to manage the device.
StoneOS
o Type: IP Address
o Hostname: 10.1.1.1
o Community: hillstone
o Permission: RO
o Host: 10.1.1.1
o Community: hillstone
o Zone: trust
Zabbix:
groups list.
o Name: Hillstone_Interface
o SNMP OID:
.1.3.6.1.4.1.28557.2.6.1.3.1.20.36
o Host name:E1100
groups list.
Step7: Results
Scenario
As shown in the topology, one enterprise can configure Radius server authentication and enable authorization policy to dynamically man-
age the access authority of visitors. When the visitor logins the SSLVPN, the radius server issues authorization policy to the firewall
allowing the visitor to visit the network segment 10.160.64.0/21. When the visitor successfully logins, the administrator can use CoA
messages to modify the issued authorization policy, adding new network segment 10.160.32.0/21 that the visitor is allowed to visit.
When the visitor logs out, the firewall will automatically delete the responding authorization policy.
Configuration Steps
o Zone: trust
o Type: Static IP
o IP Address: 10.87.1.8
o Netmask: 255.255.255.0
o Name: Visitor
Step 3: Configure Radius Server, and Enable Authorization Policy and Accounting.
o Name: Visitor
o Port: 1812
o Secret: 12345678
o Port: 1813
o Password: 12345678
Step 3: Configure Radius Server, and Enable Authorization Policy and Accounting.
o Username: user1
o Password: 123456
o Port: 3799
o Netmast: 255.255.255.0
o DNS1: 10.160.64.60
o WINS1: 10.160.64.61
o Zone: VPN
o Zone: VPN
o Type: Static IP
o IP Address: 20.1.1.1
o Netmask: 24
4. Configure SSLVPN.
o Service Port:443
o Tunnel Interface:tunnel1
o Address Pool:pool1
o IP:10.160.64.0
o Netmask:255.255.248.0
Step 6: Results.
o Server: 10.160.64.51
o Port: 4433
o Username: user1
o Password: 123456
Step 7: Use CoA message to modify the access authority of the authorized user.
In this example, a Hillstone device (T-Series Intelligent Next Generation Firewall recommended) is a network tap. Its tap interface
eth0/1 directly connects to mirror interface of inline network gateway. Hillstone T-Series threat detection features to analyze mirrored
data packets in search for network threats.
We present 4 threat detecting functions in this example. All the functions require respective licenses installed before they take effect.
o Intrusion Prevention System (IPS): Requires Threat Prevention (TP) or IPS license installed.
o Application Identification: Requires APP DB license installed. This license is issued with platform license for free. No need to pur-
chase APP DB license individually.
Preparation
As shown in the topology above, you need use a RJ-45 cable to connect the mirror port eth0/4 and the tap interface eth0/1.
Configure port mirroring on gateway of core network. We take Hillstone gateway as example.
Enabling IPS:
Step 5: Enabling Advanced Threat Detection (ATD) and viewing ATD attacks
Enabling ATD:
Step 5: Enabling Advanced Threat Detection (ATD) and viewing ATD attacks
To know more about ATD, you may refer to another case in this cookbook Finding Malware Attacks via Advanced Threat Detec-
tion.
Enabling ABD:
To know more about ABD, you may refer to another case in cookbook "Protecting Internal Servers and Host to Defend Attack
via Abnormal Behavior Detection" on Page 390.
DNS Proxy
This example shows how to configure the DNS proxy function. By configuring flexible DNS proxy rules, users from different seg-
ments are assigned to different DNS servers for domain name resolution.
Scenario
A secondary ISP rents the bandwidth of telecom, netcom and other ISP to different users for Internet access. The telecom and netcom
ISP have their own DNS servers. So the secondary ISP want to assign users of different network segments to the DNS servers of cor-
responding ISP for domain name resolution through DNS proxy devices.
This example simulates the export scenario of the above secondary ISP through the following configuration. Use eth0/1 (IP:101.0.0.1)
of the device to connect to the telecom special line to access the Internet, and use eth0/2 (IP: 201.1.1.1) to connect to the netcom special
line to access the Internet. In the public network, the DNS server of telecom is DNS1:102.1.1.1, and that of netcom is DNS2:202.1.1.1.
Also, eth0/3, eth0/4 connect to the Intranet user groups. The administrator now has the following requirements:
1. The DNS request of user group 1 (network segment: 192.168.10.1 / 28) is uniformly proxy to dns1 for domain name resolution;
2. The DNS request of user group 2 (network segment: 172.168.10.1 / 24) is uniformly proxy to dns2 for domain name resolution;
3. The DNS request of intranet server (172.168.10.88) is not restricted and bypassed directly.
DNS Proxy 57
StoneOS Cookbook
Preparation
The basic interface and route configuration have been completed, and users can access the Internet normally.
58 DNS Proxy
StoneOS Cookbook
Configuration Steps
Step 1:Configure a DNS proxy rules to proxy DNS requests of user group 1 to DNS1 for domain name resolution;
o Domain: any
o Action: Proxy
o DNS Server:
o IP Address: 102.1.1.1
o Egress Interface:etherent0/1
DNS Proxy 59
StoneOS Cookbook
Step 2: Configure another DNS proxy rule to uniformly proxy DNS requests of user group 2 to DNS2 for domain name res-
olution.
o Domain: any
o Action: Proxy
o DNS Server:
o IP Address: 202.1.1.1
o Egress Interface:etherent0/2
60 DNS Proxy
StoneOS Cookbook
Step 3: Configure one more DNS proxy rule to release DNS requests from the Intranet server (172.168.10.88) directly.
o Domain: any
o Action: Bypass
DNS Proxy 61
StoneOS Cookbook
Step 5:Results
After configuration, capture packets on eth0 / 1 and eth0 / 2 interfaces. The results are as follows:
o The users of 192.168.10.1/28 network segment in user group 1 can still access the Internet normally, and their DNS requests
will be sent to the DNS1 server of Telecom for domain name resolution through the device.
o The uesrs of 172.168.10.1/24 network segment in user group 2 can still access the Internet normally, and DNS requests will be
sent to the DNS2 server of Netcom for domain name resolution.
o The DNS request of the internal server 172.168.10.88 will not be proxy through the device, but will be resolved according to
the DNS server set by itself.
Q&A
o Q:What is the order and manner of matching multiple DNS proxy rules?
A:The device will query for DNS proxy rules by turns from up to down. In each rule, only if all matching conditions are met can
the matching be successful.
o Q:When multiple DNS servers are configured in a DNS proxy rule, what is the priority of preferred and bound out interface
properties?
A:When you configure multiple DNS servers, the DNS server with preferred property will be selected for domain name res-
olution. If no preferred server is specified, the system will query whether there are DNS servers that have specified the egress inter-
face.
62 DNS Proxy
StoneOS Cookbook
The topology is shown as below. Device A connects to the NETCONF client. It is required to add an SNAT rule to device A using
NETCONF.
Preparation
1. The NETCONF client software has been correctly installed on the client PC, and the client environment has been configured.
This case takes the client software netopeer2-cli as an example.
2. Device A is connected to the NETCONF client, and messages can be sent between them.
Configuration Steps
Device A
hostname(config-if-eth0/0)# exit
hostname(config)#
Step 2: Configuring the access of the administrator as NETCONF (Take the administrator hillstone as an example).
hostname(config-admin)# exit
hostname(config)#
hostname(config)#
Step 4: Enabling the NETCONF agent and the NETCONF candidate functions.
hostname(config)#
NETCONF Client
Running the client software netopeer2-cli in Linux and connecting to the device:
[root@linux1~]# netopeer2-cli
[email protected] password:
o --login: specifies the login user name which must be the same as the device administrator name.
After the above command is executed, a prompt for password will appear. Enter the password of the
administrator hillstone and press Enter.
Executing the above command to get the Yang model of the device.
Step 3: Editing the XML file which will be used to add an SNAT rule to the device.
Editing the XML file according to the Yang model obtained in step 2 and saving it as snat.xml. The con-
tents of the XML file are as follows:
-<vrouter>
<vr_name>trust-vr</vr_name>
-<snat_rule>
<rule_id>1</rule_id>
<group_id>0</group_id>
<from>192.168.2.2</from>
<from_is_ip>1</from_is_ip>
<to>Any</to>
<to_is_ip>0</to_is_ip>
<service>Any</service>
<trans_to>192.168.1.10</trans_to>
<trans_to_is_ip>1</trans_to_is_ip>
<flag>1</flag>
<log>0</log>
<enable>0</enable>
<trans_type>1</trans_type>
</snat_rule>
</vrouter>
</vr>
o --target: "running" means that the distributed configuration will immediately change the running con-
figuration of the device, which will have an impact on the current business. If you select the parameter
"candidate", the distributed configuration will remain in the configuration repository and will not have
any impact on the current business. If you want to use the candidate configuration to replace the run-
ning configuration of the device, you can first execute the "validate-- source candidate" command to
check whether the candidate configuration is valid, and then execute the "commit" command.
o --config: specifies the path and file name of the xml file. If you do not specify this parameter, the sys-
tem automatically opens an empty XML file after the command is executed, and you can edit the con-
tent in this empty document.
After configuring the above steps, you can see that the SNAT rule has been added to the device using the Show command.
ip vrouter "trust-vr"
snatrule id 1 from ip 192.168.2.2 to address-book "Any" service "Any" trans-to ip 192.168.1.10 mode
static disable
exit
hostname(config)#
Binding the Log Processing Process and Database Storage Process to Core
MAX
This example introduces how to bind the log processing process and database storage process to Core MAX. Core MAX is the CPU
core with the largest number. For example, if the system has 12 CPU cores in total, which are numbered as Core0 to Core11, Core11 is
the Core MAX. The example including the following two scenarios:
o Scenario 1: A Hillstone security device is deployed on an enterprise network. Operation and maintenance personnel periodically
check the session logs and NAT logs stored in the database. The system's log processing process (LOGD) and database storage pro-
cess (MYSQLD) work on Core0 of the CPU. When session logs and NAT logs are exported to the local disk, Core0 can be over-
loaded with a large amount of high speed log data storage operations, potentially affecting the normal operation of other functional
modules.
o Scenario 2: A Hillstone security device is deployed on an enterprise network. Operation and maintenance personnel need to peri-
odically check traffic and session monitoring statistics. The device supports the storage of statistics on device traffic and sessions
over the last 180 days to the device disk. The system's database storage process (MYSQLD) work on Core0 of the CPU. Core0 can
be overloaded with a large amount of high speed traffic and session data storage operations, potentially affecting the normal oper-
ation of other functional modules.
Based on the above scenarios, if the performance consumption of Core0 is too high or you need to increase the speed at which logs are
sent to the log processing process, you can move log processing process and database storage process from Core0 to Core MAX, and
then configure the speed at which logs are sent to the log processing process.
Configuration Roadmap
1. Use the command flow-core-num number to specify the number of CPU cores occupied by the system data. number is
recommended to be max_core_number-1. max_core_number is the number of total CPU cores of the system.
2. Bind the log processing process and database storage process to Core MAX.
3. Restart the device to make the configurations in Step 1 and Step 2 take effect.
4. For scenario 1, you can increase the the speed at which logs are sent to the log processing process.
Before binding the log processing process and database storage process to Core MAX, prepare the following first:
1. The NETCONF client software has been correctly installed on the client PC, and the client environment has been configured.
This case takes the client software netopeer2-cli as an example.
2. Device A is connected to the NETCONF client, and messages can be sent between them.
o Scenario 1: The session logs and NAT logs have been stored in the device disk with the command.
o Scenario 2: The device has enabled the Long-term Monitor function for traffic and sessions.
o The function of binding the log processing process and database storage process to Core MAX is only supported by SG-6000-
A2700 and later models. SG-6000-A3000 with a hard disk is used as an example to describe the configuration.
Configuration Steps
Step 1: Specifying the number of CPU cores occupied by the system data.
hostname(config)# flow-core-num 3
hostname(config)# exit
Step 2: Binding the log processing process and database storage process to Core MAX, and restarting the for the above con-
figuration to take effect.
hostname(config)# exit
hostname# reboot
Step 3: For scenario 1, adjusting the speed at which logs are sent to log processing process. The default sending speed of SG-6000-
A3000 is 2000 logs per second.
After configuring the above steps, you can see that the CPU utilization of Core 0 is decreasing and that of Core MAX is increasing by
using the command show cpu detail.
DHCP ZTP
This example introduces the DHCP zero touch provisioning (ZTP) process. As the DHCP client, the Hillstone security device auto-
matically obtains a specified configuration file via DHCP and uses it as the startup configuration of the device, achieving ZTP of the
device, thus enhancing deployment efficiency.
Networking Scenario
An enterprise purchases a batch of Hillstone A-series security devices and needs to deploy them in various regions. However, the O&M
personnel cannot go to each location personally to make the new device come online. Therefore, they require devices that support ZTP.
In addition, due to security protection requirements, the use of USB ports to achieve USB ZTP is not allowed. In this case, the plan is to
use the Hillstone security device as the DHCP client to achieve DHCP ZTP.
Preparations
Before you configure the DHCP service for ZTP setup, prepare the following first:
DHCP ZTP 71
StoneOS Cookbook
o The DHCP client, DHCP server, TFTP server have been networked based on the actual scenario.
o The DHCP server has been configured with the address of the TFTP server where the XML file is located and with the path to the
XML file, corresponding to the Option 66 and Option 67 fields in the DHCP message respectively.
o DHCP ZTP is supported only by A-series devices and certain K-series devices from the factory or with empty configuration (only
system default configuration, no custom configuration). The ethernet0/3 interface of the device automatically obtains an address
via the DHCP protocol by factory default. Please use the ethernet0/3 interface for DHCP ZTP.
o The servers where the XML file and the configuration file are located need to be TFTP servers, and they can be the same TFTP
server.
o The configuration file on the TFTP server needs to be named after the device SN number with a .cfg suffix.
Procedure
Step 1: The StoneOS system determines whether the device is from the factory or is with empty configuration.
After the device from the factory or with empty configuration is powered on and started, it will automatically enter the DHCP ZTP pro-
cedure.
The device sends a request message to the DHCP server, and the DHCP server returns a response message to the device. The device
obtains the DHCP client address, default gateway and other information by parsing the response message.
Step 3: Parse the response message and download the XML file.
The device parses the response message from the DHCP server to obtain the address of the TFTP server where the XML file is located
and the path to download the XML file, and then downloads the XML file from the corresponding TFTP server.
Step 4: Parse the XML file and download the configuration file.
The device parses the downloaded XML file, obtains the address of the TFTP server where the configuration file is located and the path
to download the configuration file, and then downloads the configuration file named with the device SN number, such as
"5931844225000750.cfg", from the corresponding TFTP server.
72 DHCP ZTP
StoneOS Cookbook
After the configuration file is downloaded, the system will use it as the startup configuration file when the device starts, and the con-
figuration file will be loaded when the device restarts automatically, and the initiation can be completed after the restart is finished. If
you log into the device successfully, the initiation is successful.
[Optional] Step 6: Compare whether the configuration files in the device and on the TFTP server are consistent.
Due to the skipping of loading for incorrectly formatted configurations during the configuration file loading process, the initialization
may be successful but some services fail to start. You can run the save command to save the current running configuration to the star-
tup configuration file. Then, export the startup file from the device and compare it with the configuration file on the TFTP server to
verify consistency. Any inconsistencies can be manually adjusted on the device by adding or modifying configurations, which is intended
for subsequent initialization tasks on new devices.
DHCP ZTP 73
StoneOS Cookbook
Routing
Routing 74
StoneOS Cookbook
In the topology below, the multicast source sends data to the multicast group, and the multicast address is 225.0.0.1. The receivers PC1
and PC2 send IGMPv2 Report to join the multicast group, and the PIM domain adopts the PIM-SM mode. Assume that Device A is
the candidate RP and candidate BSR, the interface loopback1 is the interface for electing the RP, and the interface eth0/1 is the mul-
ticast data inbound interface. By configuring the PIM-SM function on each device in the PIM domain, multicast data can be forwarded
to the recipient PC in a normal multicast manner.
Configuration Steps
Step 1: Configure the IP address and unicast routing protocol of each device interface (OSPF is used in this example).
Device A:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device B:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device C:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device A:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device B:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device C:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device A:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device B:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device C:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device A:
hostname(config-if-loo1))# exit
hostname(config-vrouter))# exit
hostname(config)#
Device A:
=========================================================-
=====================
=========================================================-
=====================
=========================================================-
=====================
=========================================================-
=====================
=========================================================-
=====================
BSR Priority: 0
=========================================================-
=====================
In the topology below, the multicast source sends data to the multicast group, and the multicast address is 232.0.0.1. Receivers PC1 and
PC2 send IGMPv3 Report to join the multicast group. The PIM domain adopts the PIM-SSM mode. The relationship between the host
and the devices in the PIM domain is maintained through IGMPv3, so that the members of the multicast group can quickly join, directly
at the multicast source SPT (Shortest Path Tree) is established with the recipient PC. Assume that the interface eth0/1 of Device A is
used as the inbound interface for multicast data. By configuring the PIM-SSM function on each device in the PIM domain, multicast
data can be multicast forwarded to the recipient PC normally.
Configuration Steps
Step 1: Configure the IP address and unicast routing protocol of each device interface (OSPF is used in this example).
Device A:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device B:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device C:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/1)# exit
Device A:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device B:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device C:
hostname(config-vrouter)# ip multicast-routing
hostname(config-vrouter)# exit
hostname(config)#
Device A:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device B:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device C:
hostname(config-vrouter))# exit
hostname(config)#interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config)#interface ethernet0/2
Device A:
=========================================================-
=====================
=========================================================-
=====================
In the initial network as topology below, the multicast source sends data to the multicast group, and the multicast address is 232.0.0.1.
Receivers PC1 and PC2 send IGMPv3 Report to join the multicast group. The PIM domain adopts the PIM-SSM mode. The rela-
tionship between the host and the devices in the PIM domain is maintained through IGMPv3, so that the members of the multicast
group can quickly join, directly at the multicast source SPT (Shortest Path Tree) is established with the recipient PC. Assume that the
interface eth0/1 of Device A is used as the inbound interface for multicast data. By configuring the PIM-SSM function on each device
in the PIM domain, multicast data can be multicast forwarded to the recipient PC normally. For details, see Realizing Multicast For-
warding Through PIM-SSM Multicast Protocol .
In this example, Device A , Device B and Device C in the PIM domain are deployed in HA AP mode. After deployment, Device A ,
Device B and Device C are elected as as the master devices, and Device Aa , Device Bb and Device Cc are elected as backup devices.
Meanwhile, the multicast route generated in the master device Device A(Device B or Device C) will be quickly synchronized to the
backup device with a temporary status of Y; When the master device Device A (Device B or Device C) fails or cannot forward traffic
normally, the backup device Device Aa (Device Bb or Device Cc) will switch as the master device. At this time, the multicast route in Y
state will be based on to forward multicast traffic without affecting the original normal communication. AfterDevice Aa receives the
IGMPv3 report messages, The status in the multicast routing table will be updated to the normal status V.
Configuration Steps
Step 1: Configure the PIM-SSM multicast protocol according to the example Realizing Multicast Forwarding Through PIM-SSM
Multicast Protocol .
Step 2: Configure the Device A and Device Aa as HA AP mode and HA negotiate successfully.
Device A
hostname(config-trackip)# exit
hostname(config)# ha group 0
hostname(config-ha-group)# priority 50
hostname(config-ha-group)# exit
hostname(config)# ha cluster 1
Device Aa
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)#
hostname(config)# ha cluster 1
Step 3: Configure management IP addresses for the two devices and monitor objects on the standby Device after HA negotiation
between Device A and Device Aa is successful .
Device A:
Device Aa:
hostname(config-if-eth0/1)# exit
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)#
Step 4:Results
Device Aa
ip vrouter "mgt-vr"
exit
ip vrouter "trust-vr"
ip multicast-routing
router-id 1.1.1.1
exit
router pim
pim-sm enable
pim-ssm default
exit
exit
2. The stutas of multicast routing table is V. On the back device, the multicast routing table is synchronized and its status is Y.
Device A:
================================================================-
==============
================================================================-
==============
Device Aa:
================================================================-
==============
================================================================-
==============
3.Restart Device A (or change eth0 / 1 and eth0 / 2 of Device A to shutdown). At this time, the backup device Device Aa will quickly
switch to the master device, and the multicast route in Y state can forward multicast traffic without affecting the original com-
munication; After Device Aa receives the IGMPv3 report message, the status in the multicast routing table will be updated to V, and
the multicast traffic will continue to be forwarded later. The status is shown as follows:
Device Aa:
================================================================-
==============
================================================================-
==============
Step 5: You can deploy device B and device C to the HA AP mode as required according to the above steps.
Authentication
Authentication is a method of verifying visitor's identity. When a visitor is confirmed as a valid user, he is allowed to use a certain net-
work. The visitor can be a PC, a mobile phone or a tablet.
Authentication 98
StoneOS Cookbook
The topology describes the scenarios of the case. In this scenario, only user 1 passes the authentication, and then accesses the Internet;
while other users fail to pass the authentication, and they are not allowed to access the Internet.
Configuration Steps
o Name: user1
o Password: 123456
o Name: addr
o Type: IPv4
o Zone: trust
o IP Configuration
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o WebAuth
o Zone: untrust
o IP Configuration
o Type: Static IP
o IP Address: 221.224.30.130
o Netmask: 20
o Protocol: HTTP
o Port: 8181
o Authentication Mode:
o Type: Password
o Name: DNS
o Service: DNS
o Action: Permit
o Name: Web-auth
o WebAuth: local
o Name: user
o Action: Permit
o Content: CA Certificate
o Action: Export
The following shows a network environment. An enterprise sets up a Hillstone security device as the export gateway to connect internal
network with the Internet. Only the staffs in R&D department join in the AD domain (scep.pki.com), while the staffs in marketing
department are excluded. The security device enables Web authentication. All the staffs of the enterprise are allowed to access the Inter-
net only after they pass the authentication. After the AD Polling being configured, there will be login logs when staff in R&D depart-
ment login though the AD server (Log in the PC which is added into the AD domain through domain user name and password). The
device can check the logs through AD Polling, as well as obtain authentication users information on the AD server. With this inform-
ation, staff of R&D department can access the Internet directly without Web authentication.
Preparation
o The AD server has been set up according to the user network environment.
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should open the RPC service and
remote management. To enable the RPC service, you need to enter the Control Panel > Administrative Tools > Services and open
the Remote Procedure Call and Remote Procedure Call Locator; to enable the remote management, you need to run the command
prompt window (cmd) as administrator and enter the command netsh firewall set service RemoteAdmin
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should permit WMI function to pass
through Windows firewall. Select Control Panel >System and Security> Windows Firewall >Allow an APP through Windows
Firewall, in the Allowed apps and features list, click the corresponding check box of Domain for Windows Management Instru-
mentation (WMI) function.
o The security device should be configured with related policy to protect the AD server, which may result in the port used by WMI
service (port 135 and random port) being restricted by policy. Therefore, it’s necessary to configure another policy ( the source IP
is the IP address of ethernet0/3) allows all interface traffic to pass through.
o The rule has been configured on the security device that all the staff of the enterprise should pass the Web authentication before
they access the Internet. For the detailed configuration method, please see "Allowing the Internet Access via User Authentication"
on Page 99.
Configuration Steps
Step 1: Creating a new domain user on the AD server and configuring the user as the Domain Admins group.
Access the PC with AD server, select Start > Administrative Tools > Active Directory Users and Computers, and enter the Act-
ive Directory Users and Computers page.
Step 1: Creating a new domain user on the AD server and configuring the user as the Domain Admins group.
o Password: Hillstone123456
Step 1: Creating a new domain user on the AD server and configuring the user as the Domain Admins group.
Step 2: Adding PCs of R&D staff into the AD domain (taking one PC as example).
Step 2: Adding PCs of R&D staff into the AD domain (taking one PC as example).
o Domain: scep.pki.com
In the Windows security dialog box, enter Domain name\User name and Password. The user name should be the one in the
Domain Admins group.
o Password: Hillstone123456
After the PC being added in the AD domain (scep.pki.com) successfully, restart the computer to make it take effect.
o Base-dn: dc=scep,dc=pki,dc=com
o Login-dn: cn=test,c-
cn=users,dc=scep,dc=pki,dc=com
o sAMAccountName: test
o Password: Hillstone123456
o Name: ad-polling
o Host: 10.180.201.8
o Account: scep\test
o Password: Hillstone123456
After all the above configurations being finished, staff of R&D department (such as the user test added in AD domain in this
example) can access the Internet without passing Web authentication. However, the staff of marketing department still needs to
pass Web authentication before visiting the Internet.
The following shows a network environment. An enterprise sets up a Hillstone security device as the export gateway to connect internal
network with the Internet. All the staff in R&D department and marketing department join in the AD domain (scep.pki.com). After the
AD Polling being configured, there will be login logs when staffs login though the AD server (Log in the PC which is added into the
AD domain through domain user name and password). System can check the logs through AD Polling, as well as obtain authentication
users information (user name and IP) on the AD server. With the user-based security policy, only the R&D manager can access the
Internet, while other staffs of the R&D department cannot access the Internet, and the staff of the marketing department can access
the Web service based on HTTP or HTTPS.
Preparation
o The AD server has been set up according to the user network environment.
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should open the RPC service and
remote management. To enable the RPC service, you need to enter the Control Panel > Administrative Tools > Services and open
the Remote Procedure Call and Remote Procedure Call Locator; to enable the remote management, you need to run the command
prompt window (cmd) as administrator and enter the command netsh firewall set service RemoteAdmin
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should permit WMI function to pass
through Windows firewall. Select Control Panel >System and Security > Windows Firewall >Allow an APP through Windows
Firewall, in the Allowed apps and features list, click the corresponding check box of Domain for Windows Management Instru-
mentation (WMI) function.
o The security device should be configured with related policy to protect the AD server, which may result in the port used by WMI
service (port 135 and random port) being restricted by policy. Therefore, it’s necessary to configure another policy ( the source IP
is the IP address of ethernet0/3) allows all interface traffic to pass through.
o The rule has been configured on the security device that all the staff of the enterprise should pass the Web authentication before
they access the Internet. For the detailed configuration method, please see "Allowing the Internet Access via User Authentication"
on Page 99.
Configuration Steps
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
Access the PC with AD server, select Start > Administrative Tools > Active Directory Users and Computers, and enter the Act-
ive Directory Users and Computers page.
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
o Password: Hillstone123456
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
Step 2: Add PCs of R&D staff into the AD domain (taking the PC of R&D manager as example).
Step 2: Add PCs of R&D staff into the AD domain (taking the PC of R&D manager as example).
o Domain: scep.pki.com
In the Windows security dialog box, enter Domain name\User name and Password. The user name should be the one in the
Domain Admins group.
o Password: Hillstone123456
After the PC being added in the AD domain (scep.pki.com) successfully, restart the computer to make it take effect.
o Base-dn: dc=scep,dc=pki,dc=com
o Login-dn: cn=test,c-
cn=users,dc=scep,dc=pki,dc=com
o sAMAccountName: test
o Password: Hillstone123456
o Name: ad-polling
o Host: 10.180.201.8
o Account: scep\test
o Password: Hillstone123456
o Name: manager
o Source
o Zone: trust
o Address: any
o Destination
o Zone: untrust
o Address: any
o Other Information
o Action: Permit
o Name: market
o Source
o Zone: trust
o Address: any
o Destination
o Zone: untrust
o Address: any
o Other Information
o Action: Permit
After all the above configurations, only the R&D manager can access the Internet, while other staffs of the R&D department can-
not access the Internet, and the staff of the marketing department can access the Web service based on HTTP or HTTPS.
The following shows a network environment. An enterprise sets up a Hillstone security device as the export gateway to connect internal
network with the Internet. All the staff in the R&D department and marketing department join in the AD domain (scep.pki.com). After
the AD Agent being configured, there will be login information when staffs login though the AD server (Log in the PC which is added
into the AD domain through domain user name and password). The AD Security Agent will send the authentication users information (
user name and IP) to system. With the user-based security policy, only the R&D manager can access the Internet, while other staffs of
the R&D department cannot access the Internet, and the staff of the marketing department can access the Web service based on HTTP
or HTTPS.
Preparation
o The AD server has been set up according to the user network environment.
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should open the RPC service and
remote management. To enable the RPC service, you need to enter the Control Panel > Administrative Tools > Services and open
the Remote Procedure Call and Remote Procedure Call Locator; to enable the remote management, you need to run the command
prompt window (cmd) as administrator and enter the command netsh firewall set service RemoteAdmin
o To enable WMI to probe the PC where the AD server is located and the terminal PCs, the PC should permit WMI function to pass
through Windows firewall. Select Control Panel >System and Security > Windows Firewall >Allow an APP through Windows
Firewall, in the Allowed apps and features list, click the corresponding check box of Domain for Windows Management Instru-
mentation (WMI) function.
o The security device should be configured with related policy to protect the AD server, which may result in the port used by WMI
service (port 135 and random port) being restricted by policy. Therefore, it’s necessary to configure another policy ( the source IP
is the IP address of ethernet0/3) allows all interface traffic to pass through.
o The rule has been configured on the security device that all the staff of the enterprise should pass the Web authentication before
they access the Internet. For the detailed configuration method, please see "Allowing the Internet Access via User Authentication"
on Page 99.
Configuration Steps
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
Access the PC with AD server, select Start > Administrative Tools > Active Directory Users and Computers, and enter the Act-
ive Directory Users and Computers page.
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
o Password: Hillstone123456
Step 1: Create a new domain user on the AD server and configuring the user as the Domain Admins group.
Step 2: Add PCs of R&D staff into the AD domain (taking the PC of R&D manager as example).
Step 2: Add PCs of R&D staff into the AD domain (taking the PC of R&D manager as example).
o Domain: scep.pki.com
In the Windows security dialog box, enter Domain name\User name and Password. The user name should be the one in the
Domain Admins group.
o Password: Hillstone123456
After the PC being added in the AD domain (scep.pki.com) successfully, restart the computer to make it take effect.
1. Click http://swup-
date.hillstonenet.com:1337/sslvpn/download?os=windows-
adagent to download an AD Security Agent installation
program, and copy it to the AD server.
o Password: Hillstone123456
Click Commit to commit the above configurations and start the AD Agent service.
o Base-dn: dc=scep,dc=pki,dc=com
o Login-dn: cn=test,c-
cn=users,dc=scep,dc=pki,dc=com
o sAMAccountName: test
o Password: Hillstone123456
o Name: manager
o Source
o Zone: trust
o Address: any
o Destination
o Zone: untrust
o Address: any
o Other Information
o Action: Permit
o Name: market
o Source
o Zone: trust
o Address: any
o Destination
o Zone: untrust
o Address: any
o Other Information
o Action: Permit
After all the above configurations being finished, only the R&D manager can access the Internet, while other staffs of the R&D
department cannot access the Internet, and the staff of the marketing department can access the Web service based on HTTP or
HTTPS.
The following shows a network environment. An enterprise sets up a Hillstone security device as the export gateway to connect internal
network with the Internet. Internal users connect to a Windows server through thin clients. After the TS Agent is configured, when
users log in the Windows server using remote desktop services, the Hillstone Terminal Service Agent will allocate port ranges to users
and send the port ranges and users information to the system. At the same time, the system will create the mappings of traffic IPs, port
ranges and users. With the user-based security policy, only user 1 can access the Internet, while user 2 cannot access the Internet, and
user 3 can access the Web service based on HTTP or HTTPS.
Preparation
o The Windows server has been set up according to the user network environment. Windows Server 2008 R2, Windows Server
2016, and Windows Server 2019 are currently supported. Windows Server 2008 R2 Service Pack 1 and KB3033929 must be
installed if Windows Server 2008 R2 is used.
o The SNAT rule has been configured on the security device, and all the internal users can access the Internet. For the detailed con-
figuration method, please see "Allowing Private Network to Access Internet Using SNAT" on Page 26.
Configuration Steps
Step 1: Installing and configuring Hillstone Terminal Service Agent in Windows server.
2. Double-click HSTSAgent.exe to open it and follow the installation wizard to install it.
3. Double-click the Hillstone Terminal Service Agent shortcut, and the Hillstone Terminal Service Agent dia-
log pops up.
Step 1: Installing and configuring Hillstone Terminal Service Agent in Windows server.
WebUI
o Name: tsagent1
o HOST: 10.1.1.1
o Port: 5019
CLI
host-name(config-ts-agent)# enable
host-name(config-ts-agent)# exit
WebUI
o Name: DNS
o Source
o Zone: any
o Address: any
o Destination
o Zone: any
o Address: any
o Service: DNS
o Action: Permit
o Name: User1
o Source
o Zone: trust
o Address: any
o User: user1
o Destination
o Zone: untrust
o Address: any
o Action: Permit
o Name: User3
o Source
o Zone: trust
o Address: any
o User: user3
o Destination
o Zone: untrust
o Address: any
o Action: Permit
CLI
host-name(config)# rule name DNS from any to any service DNS permit
Rule id 2 is created.
host-name(config)# rule name User1 user local user1 from any to any from-
zone trust to-zone untrust permit
Rule id 3 is created.
host-name(config)# rule name User3 user local user3 from any to any from-
zone trust to-zone untrust service HTTP permit
Rule id 4 is created.
host-name(config)# rule id 4
host-name(config-policy-rule)# exit
After all the above configurations are finished, only user 1 can access the Internet, while user 2 cannot access the Internet, and user
3 can access the Web service based on HTTP or HTTPS.
VPN
o IPSec VPN
o "Connection between Two Private Networks Using IPSec VPN (IKEv1)" on Page 147
o "Connection between Two Private Networks Using IPSec VPN (IKEv2)" on Page 160
o "Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link" on Page 186
o SSL VPN
o "Allowing Remote Users to Access a Private Network Using SSL VPN" on Page 199
o "Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN" on Page 230
o "Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN" on Page 249
o "Connection between Two Private Networks Using GRE over IPSec VPN" on Page 277
o VXLAN
VPN 146
StoneOS Cookbook
* Note: This topology uses laboratory environment. In this recipe, 10.10.1.0/24 represents public network.
Configuration Steps
Device A
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
Connection between Two Private Networks Using IPSec VPN (IKEv1) 147
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 255.255.255.0
148 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Name: trust_untrust
o Source Information
o Zone: trust
o Address: Any
o Destination
o Zone: untrust
o Address: Any
o Other Information
o Action: Permit
Connection between Two Private Networks Using IPSec VPN (IKEv1) 149
StoneOS Cookbook
o Name: untrust_trust
o Source Information
o Zone: untrust
o Address: Any
o Destination
o Zone: trust
o Address: Any
o Other Information
o Action: Permit
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
150 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Authentication: ESP
o Hash: SHA
o Encryption: 3DES
o Name: Headquarter_to_Branch
o Interface: ethernet0/2
o Mode: Main
o Type: Static IP
o Proposal 1: Headquarter_to_Branch_P1
Connection between Two Private Networks Using IPSec VPN (IKEv1) 151
StoneOS Cookbook
o Mode: tunnel
o P2 Proposal: Headquarter_to_Branch_P2
o Basic
o Name: 1
o Zone: untrust
o Tunnel Binding
152 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Destination: 192.168.2.0
o Subnet Mask: 24
o Interface: tunnel1
Device B
o Zone: trust
o Type: Static IP
o IP Address: 192.168.2.1
o Netmask: 255.255.255.0
Connection between Two Private Networks Using IPSec VPN (IKEv1) 153
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.2
o Netmask: 255.255.255.0
154 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Name: trust_untrust
o Source Information
o Zone: trust
o Address: Any
o Destination
o Zone: untrust
o Address: Any
o Other Information
o Action: Permit
Connection between Two Private Networks Using IPSec VPN (IKEv1) 155
StoneOS Cookbook
o Name: untrust_trust
o Source Information
o Zone: untrust
o Address: Any
o Destination
o Zone: trust
o Address: Any
o Other Information
o Action: Permit
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
156 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Authentication: ESP
o Hash: SHA
o Encryption: 3DES
o Name: Branch_to_Headquarter
o Interface: ethernet0/2
o Mode: Main
o Type: Static IP
o Proposal 1:Branch_to_Headquarter_P1
Connection between Two Private Networks Using IPSec VPN (IKEv1) 157
StoneOS Cookbook
o Mode: tunnel
o P2 Proposal: Branch_to_Headquarter_P2
o Basic
o Name: 1
o Zone: untrust
o Tunnel Binding
158 Connection between Two Private Networks Using IPSec VPN (IKEv1)
StoneOS Cookbook
o Destination: 192.168.1.0
o Subnet Mask: 24
o Interface: tunnel1
Step 6: Results
Connection between Two Private Networks Using IPSec VPN (IKEv1) 159
StoneOS Cookbook
* Note: This topology uses laboratory environment. In this recipe, 10.10.1.0/24 represents public network.
Configuration Steps
Device A
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
Connection between Two Private Networks Using IPSec VPN (IKEv2) 160
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 255.255.255.0
161 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Content: PKCS#12-DER
o Password: hillstone
o Action: Import
Connection between Two Private Networks Using IPSec VPN (IKEv2) 162
StoneOS Cookbook
o Name: Headquarter_to_Branch
o Type: Static IP
o Interface: ethernet0/2
o Authentication: ECDSA-Signature
o Hash: SHA-256
o Encryption: 3DES
o DH Group: Group2
o Name: tunnel
163 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Protocol: ESP
o Hash: SHA
o Encryption: 3DES
o Service: Any
o Interface Name: 1
o Zone: VPNHub
o Tunnel Binding
o Name: tunnel
Connection between Two Private Networks Using IPSec VPN (IKEv2) 164
StoneOS Cookbook
o Name: trust_vpn
o Action: Permit
o Name: vpn_trust
o Action: Permit
165 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Destination: 172.16.1.0
o Subnet Mask: 24
o Interface: tunnel1
Device B
o Zone: trust
o Type: Static IP
o IP Address: 172.16.1.1
o Netmask: 255.255.255.0
Connection between Two Private Networks Using IPSec VPN (IKEv2) 166
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.2
o Netmask: 255.255.255.0
167 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Content: PKCS#12-DER
o Password: hillstone
o Action: Import
Connection between Two Private Networks Using IPSec VPN (IKEv2) 168
StoneOS Cookbook
o Name: Branch_to_Headquarter
o Type: Static IP
o Interface: ethernet0/2
o Authentication: ECDSA-Signature
o Hash: SHA-256
o Encryption: 3DES
o DH Group: Group2
o Name: tunnel
169 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Protocol: ESP
o Hash: SHA
o Encryption: 3DES
o Service: Any
o Interface Name: 3
o Zone: untrust
o Tunnel Binding
o Name: tunnel
Connection between Two Private Networks Using IPSec VPN (IKEv2) 170
StoneOS Cookbook
o Name: trust_vpn
o Action: Permit
o Name: vpn_trust
o Action: Permit
171 Connection between Two Private Networks Using IPSec VPN (IKEv2)
StoneOS Cookbook
o Destination: 192.168.1.0
o Subnet Mask: 24
o Interface: tunnel13
Go to Network > VPN > IPSec VPN, and click IPSec VPN Monitor on the top right corner, under the <ISAKMP SA> tab tab,
you will see the status of the tunnel.
选择“网络 > VPN > IPSec VPN > IPSec VPN监控 > IPSec SA”,可以看到IPsec VPN第二阶段已经成功建立。Go
to Network > VPN > IPSec VPN, and click IPSec VPN Monitor on the top right corner, under the <IPSec SA> tab, you will see
the status of the tunnel.
Connection between Two Private Networks Using IPSec VPN (IKEv2) 172
StoneOS Cookbook
As shown in the figure below, an IPsec VPN security tunnel based on certificate authentication is established between Device A and
Device B. PC1 is the host of Device A, and PC2 is the host of Device B. It is required to protect the data flow between the subnet
(192.168.1.0/24) represented by PC1 and the subnet (10.1.1.0/24) represented by PC2. RSA Signature is used for authentication, ESP
protocol is used for security protocol, SHA is adopted for Hash algorithm, 3DES is adopted for encryption algorithm, so as to ensure
the integrity and security of communication data.
Configuration Steps
Device A
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o Zone: trust
o Type: Static IP
o IP Address:1.1.1.1
o Netmask: 255.255.255.0
Step 2: Configuring the trust domain and importing the authentication certificate
Select System > PKI > Trust Domain, and click New.
"PKCS#12-DER".
Select Network > VPN > IPSec VPN, and click New.
o Proposal Name: P1
o Authentication: RSA-Signature
o Hash: SHA
o Encryption: 3DES
o DH group: Group2
Select Network > VPN > IPSec VPN, and click New.
On the IPSec VPN Configuration page, click the button
o Proposal Name: P2
o Protocol: ESP
o Hash: SHA
o Encryption: 3DES
3.Configuring peer
Select Network > VPN > IPSec VPN, and click New.
o Name: peer1
o Interface: ethernet0/4
o Mode: Main
o Type: Static IP
o Proposal1: P1
Select Network > VPN > IPSec VPN, and click New.
o Peer Name
o Tunnel
o Name: tunnel
o Mode: Tunnel
o P2 Proposal: P2
o Basic
o Interface Name: 1
o Zone: trust
o Tunnel Binding
o Destination: 10.1.1.0
o Netmask: 24
o Next-hop: Interface
o Interface: tunnel1
Select Policy > Security Policy > Policy, and click New.
o Name: policy
o Service: Any
o Action: Permit
Device B
o Zone: trust
o Type: Static IP
o IP Address: 10.1.1.100
o Netmask: 255.255.255.0
o Zone: trust
o Type: Static IP
o IP Address:1.1.1.2
o Netmask: 255.255.255.0
Step 2: Configuring the trust domain and importing the authentication certificate
Select System > PKI > Trust Domain, and click New.
"PKCS#12-DER".
Select Network > VPN > IPSec VPN, and click New.
o Proposal Name: P1
o Authentication: RSA-Signature
o Hash: SHA
o Encryption: 3DES
o DH group: Group2
Select Network > VPN > IPSec VPN, and click New.
o Proposal Name: P2
o Protocol: ESP
o Hash: SHA
o Encryption: 3DES
3.Configuring Peer
Select Network > VPN > IPSec VPN, and click New.
On the IPSec VPN Configuration page, click the button
o Name: peer1
o Interface: ethernet0/4
o Mode: Main
o Type: Static IP
o Proposal1: P1
Select Network > VPN > IPSec VPN, and click New.
o Peer Name
o Tunnel
o Name: tunnel
o Mode: Tunnel
o P2 Proposal: P2
o Basic
o Interface Name: 1
o Zone: trust
o Tunnel Binding
o Destination: 192.168.1.0
o Netmask: 24
o Next-hop: Interface
o Interface: tunnel1
Select Policy > Security Policy > Policy, and click New.
o Name: policy
o Service: Any
o Action: Permit
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
This example tells how to configure IPSec VPN smart link to realize dynamic switch between IPSec links.
As shown in the figure below, IPSec VPN tunnel is to connect the Device A in a branch office and the Device B in the headquarter. If
the packet loss rate or latency of the tunnel that is established based on Link1 exceeds the specified threshold, the system would switch
to Link2 to establish a new IPSec VPN tunnel. ESP protocol is used for security protocol, SHA-256 is adopted for Hash algorithm,
AES-256 is adopted for encryption algorithm, so as to ensure the integrity and security of communication data.
Configuration Steps
Device A
hostname(config-if-eth0/1)# exit
hostname(config-if-xe3/0)# exit
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 186
StoneOS Cookbook
hostname(config-user)# exit
hostname(config-aaa-server)# exit
hostname(config)# exit
userkey: OG64Mk1CPfRLKou3yCwOehMLfQw=
187 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
1.Configuring P1 proposal.
hostname(config-isakmp-proposal)# group 2
hostname(config-isakmp-proposal)# exit
2.Configuring P2 proposal.
hostname(config-ipsec-proposal)# exit
hostname(config-isakmp-peer)# isakmp-proposal p1
hostname(config-isakmp-peer)# nat-traversal
hostname(config-isakmp-peer)# generate-route
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 188
StoneOS Cookbook
hostname(config-isakmp-peer)# dpd
hostname(config-isakmp-peer)# exit
hostname(config-tunnel-ipsec-auto)# ipsec-proposal p2
hostname(config-tunnel-ipsec-auto)# exit
hostname(config-if-tun1)# exit
Device B
189 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-xe0/2.1)# exit
hostname(config-if-xe0/2.2)# exit
hostname(config-ipsec-smart-link-profile)# exit
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 190
StoneOS Cookbook
1.Configuring P1 proposal.
hostname(config-isakmp-proposal)# group 2
hostname(config-isakmp-proposal)# exit
2.Configuring P2 proposal.
hostname(config-ipsec-proposal)# exit
hostname(config-isakmp-peer)# isakmp-proposal p1
hostname(config-isakmp-peer)# nat-traversal
hostname(config-isakmp-peer)# generate-route
hostname(config-isakmp-peer)# exit
191 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
hostname(config-tunnel-ipsec-auto)# ipsec-proposal p2
hostname(config-tunnel-ipsec-auto)# auto-connect
hostname(config-tunnel-ipsec-auto)# exit
hostname(config-if-tun1)# exit
hostname(config-vrouter)# exit
1.With the command show isakmp sa, you can see that the first phase of IPsec VPN has been successfully established.
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 192
StoneOS Cookbook
Total: 1
L-time - Lifetime
============================================================================-
====
----------------------------------------------------------------------------
----
============================================================================-
====
2.With the command show ipsec sa, you can see that the second phase of IPsec VPN has been successfully established.
Total: 1
============================================================================-
====
----------------------------------------------------------------------------
----
============================================================================-
====
193 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
Step 9: When the packet loss rate or latency of the tunnel that is established based on Link1(191.1.101.1->1.1.1.1) exceeds the specified
threshold, verify that the system can successfully switch to Link2(191.1.102.1->1.1.1.1) to establish a new IPSec VPN tunnel.
1.With the command show ipsec smart-link-profile smart_profile1, you can see that the Link1 is currently
used to establish IPSec tunnel.
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 194
StoneOS Cookbook
Total: 1
============================================================================-
====
Name: smart_profile1
Status: enable
Loss-rate(%): 30
Delay(ms): 500
Track-source: 191.1.101.1
Track-destination: 1.1.1.1
Track-interval(s): 3
Track-count: 10
Switch-cycles: 5
Switch-back-time(s): 600
Switched-count: 0
Switched-cycles: 0
Link-list:
============================================================================-
====
195 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
2.When the packet loss rate or latency of the tunnel that is established based on Link1 exceeds the specified threshold, verify that the sys-
tem can successfully switch to Link2 to establish a new IPSec VPN tunnel. With the command show ipsec smart-link-
profile smart_profile1,you can see that the Link2 has been automatically switched to establish an IPSec tunnel.
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 196
StoneOS Cookbook
Total: 1
============================================================================-
====
Name: smart_profile1
Status: enable
Loss-rate(%): 30
Delay(ms): 500
Track-source: 191.1.102.1
Track-destination: 1.1.1.1
Track-interval(s): 3
Track-count: 10
Switch-cycles: 5
Switch-back-time(s): 600
Switched-count: 1
Switched-cycles: 0
Link-list:
197 Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link
StoneOS Cookbook
============================================================================-
===
Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link 198
StoneOS Cookbook
Networking Scenario
The topology describes remote users A and B on the Internet trying to visit the internal server within a corporate. Using SSL VPN tun-
nel, the connection between remote users and private server is encrypted and safe. Besides, enabling the Two-Step Verification function
based on the SMS Modem method to enhance the security of user's login; Remote User A belongs to group1 and Remote User B
belongs to role1. Users in group 1 are allowed to access the Bug system and users whose role is role1 are allowed to access the OA sys-
tem; transmitting data over TCP protocol to strengthen communication stability.
Allowing Remote Users to Access a Private Network Using SSL VPN 199
StoneOS Cookbook
Configuration Steps
o Name: test1
o Password: 123456
Select Object > User > Local User. Under Local Server
"local", click New > User Group.
o Name: group1
o User: test1
200 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o Name: mapping-role1
Allowing Remote Users to Access a Private Network Using SSL VPN 201
StoneOS Cookbook
o Protocol Type:SGIP
o Service Provider:hillstone
o Virtual Router:trust-vr
o Host:IP;43.240.X.X
o Port:8801
o Company Code:27484X
o Netmask: 255.255.255.0
o DNS1: 10.160.65.60
202 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o Zone: VPN
o Virtual Router:trust-vr
o Zone: VPN
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
Allowing Remote Users to Access a Private Network Using SSL VPN 203
StoneOS Cookbook
204 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o IP: 10.160.65.0
o Netmask: 255.255.255.0
o IP: 172.16.12.0
o Netmask: 255.255.255.0
o Type: Role
Allowing Remote Users to Access a Private Network Using SSL VPN 205
StoneOS Cookbook
o Name: OA System
o Type: Role
o Advanced Parameters
o Port(TCP):10000
206 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o Type:SMS Authentication
o Sender Name:FWvisitAPP
o Name: address1-src
o Type: IPv4
Allowing Remote Users to Access a Private Network Using SSL VPN 207
StoneOS Cookbook
o Name: bug-address
o Type: IPv4
o Name: oa-address
o Type: IPv4
208 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o Name: policy1
o User: group1
o Service: Any
o Action: Permit
o Name: policy2
o User: role1
Allowing Remote Users to Access a Private Network Using SSL VPN 209
StoneOS Cookbook
o Service: Any
o Action: Permit
o Server: 10.196.4.136
o Port: 4433
210 Allowing Remote Users to Access a Private Network Using SSL VPN
StoneOS Cookbook
o Username: test1
o Password: 123456
Allowing Remote Users to Access a Private Network Using SSL VPN 211
StoneOS Cookbook
This example shows how to configure site-to-site VPN to establish a VPN tunnel (IPSec VPN tunnel) between Microsoft Azure and
Hillstone device.
The topology is shown as below, the Hillstone device is the gateway for the enterprise. It requires an IPsec VPN tunnel between the
company and Microsoft Azure through the Hillstone device. The authentication algorithm uses SHA and the encryption algorithm uses
3DES, thus the local service can be connected with hosted cloud services.
* Note: This topology uses laboratory environment. In this recipe, 124.193.87.66 represents Hillstone device public IP, 192.168.0.0/16 represents the internal subnet of enterprise,
13.94.46.90 represents public IP of Microsoft Azure, 10.11.0.0/16 the internal subnet of Microsoft Azure.
4. Configuring route
3. Click +Add.
o Name: VNet
o Location: East US
3. Click Create.
o Name: VNetGateway
3. Click Create.
o Name: Hillstone
o IP address: 124.193.87.66
o Location: East US
Step 5: Create the VPN connection (This step is performed after completing the "Configure Hillstone Device")
3. Click Add.
o Name: VNet1toSite2
Note:
o About VPN devices and IPsec/IKE parameters for Site-to-Site VPN Gateway connections, refer to the Microsoft Azure doc-
umentation:
https://docs.microsoft.com/en-gb/azure/vpn-gateway/vpn-gateway-about-vpn-devices.
o About "Create a Site-to-Site connection in the Azure portal", refer to the Microsoft Azure documentation:
https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal.
hostname(config-ikev2-proposal)# group 2
hostname(config-ikev2-proposal)# exit
hostname(config-ikev2-ipsec-proposal)#hash sha
hostname(config-ikev2-ipsec-proposal)#encryption aes
hostname(config-ikev2-ipsec-proposal)#lifetime 3600
hostname(config-ikev2-ipsec-proposal)#exit
hostname(config-ikev2-profile)# exit
hostname(config-ikev2-peer)# exit
hostname(config)#
hostname(config-ikev2-tunnel)# auto-connect
hostname(config-ikev2-tunnel)# exit
hostname(config)#
Step 3 : Binding the tunnel interface to the IPsec VPN IKEv2 tunnel
hostname(config-if-tun1)# exit
hostname(config)#
hostname(config-vrouter)# exit
In the topology below, a remote user located in the Internet uses an iOS/Android device to access the intranet server Server1. The
authentication method requires username and password, and the connection is based on SSL VPN. Please first see step 1 to 5 in "Allow-
ing Remote Users to Access a Private Network Using SSL VPN" on Page 199 to create a SSL VPN instance.
o Connection: connection1
o Server: 153.34.29.1
o Port: 4433
o Account: user1
o Password: 123456
https://play.google.com/store/apps/details?id=com.hillstone.vpn
Visit Google Play to download and install Hill-
stone Secure Connect VPN.
o Server: 153.34.29.1
o Port: 4433
o Account: user1
o Password: 123456
Click Login.
The topology is shown as below. A remote user, located at home or a hotel, accesses the Internet through a router with NAT enabled.
This remote user uses L2TP over IPSec VPN to visit the server (PC1) in the corporate internal network. And this server is protected by
the device A.
*Due to lab environment, use 10.10.1.0./24 to represent the public network segment.
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 230
StoneOS Cookbook
o Zone: dmz
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 255.255.255.0
231 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Zone: trust
o IP Address: 192.168.3.1
o Netmask: 255.255.255.0
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 232
StoneOS Cookbook
o Name: trust_to_dmz
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: dmz
o Address: Any
o Other
o Action: Permit
233 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
o DH Group: Group2
o Lifetime: 86400
o Protocol: ESP
o HASH: SHA
o Encryption: 3DES
o Compression: None
o Lifetime: 28800
o Lifesize: Enable
o Lifesize: 250000
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 234
StoneOS Cookbook
o Name: toclient
o Interface: ethernet0/2
o Mode: Main
o Proposal1: p1forl2tp
235 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Peer
o Tunnel
o Name: toclienttunnel
o Mode: transport
o P2 proposal: p2forl2tp
o Accept-all-proxy-ID: Enable
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 236
StoneOS Cookbook
Select Object > User > Local User > New >
User.
o Name: user1
o Password: hillstone
237 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Click Add
The steps of setting up a VPN connection differ in different PC operating systems. Take Windows 7, Windows XP/2003 and Mac OS
for example.
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 238
StoneOS Cookbook
Set up a connection:
8. Click Finish.
239 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 240
StoneOS Cookbook
4. Click Connect.
241 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Set up a connection:
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 242
StoneOS Cookbook
243 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
3. Click Connect.
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 244
StoneOS Cookbook
Set up a connection:
7. Click Create.
245 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 246
StoneOS Cookbook
247 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
By default, the L2TP VPN is required by Windows to use IPSec. For the above L2TP over IPSec VPN, you do not need to modify the
system's registry.
If the system has disabled IPSec, take the following steps to make the system use L2TP over IPSec:
Enable IPSec
3. Click OK
4. Navigate to HKEY_Local_Machine\Sys-
tem\CurentControl Set\Ser-
vices\RasMan\Parameters.
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN 248
StoneOS Cookbook
The topology is shown as below. A remote user, located at home or a hotel, accesses the Internet via mobile 3G/4G or Wi-Fi. This
remote user (iOS/Android) uses L2TP over IPSec VPN to visit the server (PC1) in the corporate internal network. And this server is
protected by the device A.
*Due to lab environment, use 10.10.1.0./24 to represent the public network segment.
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 249
StoneOS Cookbook
o Zone: dmz
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o Zone: untrust
o Type: Static IP
o IP Address: 10.10.1.1
o Netmask: 255.255.255.0
250 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Zone: trust
o IP Address: 192.168.3.1
o Netmask: 255.255.255.0
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 251
StoneOS Cookbook
o Name: trust_to_dmz
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: dmz
o Address: Any
o Other
o Action: Permit
252 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
o DH Group: Group2
o Lifetime: 86400
o Protocol: ESP
o HASH: SHA
o Compression: None
o Lifetime: 28800
o Lifesize: Enable
o Lifesize: 250000
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 253
StoneOS Cookbook
o Name: toclient
o Interface: ethernet0/2
o Mode: Main
o Proposal1: p1forl2tp
254 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Peer
o Tunnel
o Name: toclienttunnel
o Mode: transport
o P2 proposal: p2forl2tp
o Accept-all-proxy-ID: Enable
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 255
StoneOS Cookbook
Select Object > User > Local User > New >
User.
o Name: user1
o Password: hillstone
256 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
o Click Add
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 257
StoneOS Cookbook
Steps of setting up a VPN connection in iOS 10. (Before configuring your iPhone, make sure that it can access the Internet nor-
mally.)
258 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Steps of setting up a VPN connection in iOS 10. (Before configuring your iPhone, make sure that it can access the Internet nor-
mally.)
o Server: 10.10.1.1
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 259
StoneOS Cookbook
Steps of setting up a VPN connection in iOS 10. (Before configuring your iPhone, make sure that it can access the Internet nor-
mally.)
260 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Steps of setting up a VPN connection in Android. (Before configuring your iPhone, make sure that it can access the Internet
normally.)
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 261
StoneOS Cookbook
Steps of setting up a VPN connection in Android. (Before configuring your iPhone, make sure that it can access the Internet
normally.)
262 Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN
StoneOS Cookbook
Steps of setting up a VPN connection in Android. (Before configuring your iPhone, make sure that it can access the Internet
normally.)
Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN 263
StoneOS Cookbook
The topology is shown below. A remote user (PC) , located at a branch office of the corporate , uses SSL VPN to visit the branch fire-
wall . The branch firewall functions as an L2TP client to establish a tunnel connection with the headquarters firewall. Then, the traffic
from the remote user(PC) is routed to the L2TP tunnel , and the remote user (PC) in the branch office can communicate with the server
in the corporate internal network.
* This example is used in a laboratory environment. Please configure the IP addresses of each interface according to the actual con-
nections.
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 264
StoneOS Cookbook
o Zone: trust
o Type: Static IP
o IP Address: 10.182.55.49
o Netmask: 255.255.255.0
o Zone: untrust
o Type: Static IP
o IP Address: 100.1.1.2
o Netmask: 255.255.255.0
265 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
o Zone: VPNHub
o Zone: VPNHub
o IP Address: 60.1.1.1
o Netmask: 255.255.255.0
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 266
StoneOS Cookbook
o Name: Any_to_Any
o Source
o Zone: Any
o Address: Any
o Destination
o Zone: Any
o Address: Any
o Service : Any
o Action: Permit
267 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
o Source Address
o IP/Netmask:60.1.1.0/24
o Destination Address
o IP Address:172.16.2.2
o Destination:172.16.2.0
o Netmask:255.255.255.0
o Next-hop:Interface
o Interface:tunnel1
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 268
StoneOS Cookbook
Select Object > User > Local User > New >
User.
o Name: user1
o Password: hillstone
o Mask: 255.255.255.0
269 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
o IP: 172.16.2.0
o Netmask: 255.255.255.0
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 270
StoneOS Cookbook
o LNS IP:100.1.1.1
o Keepalive:60 seconds
o User Name:l2tp_user1
o Password:hillstone
o PPP Authentication:CHAP
o Auto connect:Enabled
271 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 100.1.1.1
o Netmask: 255.255.255.0
o Zone: trust
o Type: Static IP
o IP Address: 172.16.2.1
o Netmask: 255.255.255.0
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 272
StoneOS Cookbook
o Zone: VPNHub
o IP Address: 70.1.1.1
o Netmask: 255.255.255.0
273 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
o Name: Any_to_Any
o Source
o Zone: Any
o Address: Any
o Destination
o Zone: Any
o Address: Any
o Service: Any
o Action: Permit
Select Object > User > Local User > New >
User.
o Name: l2tp_user1
o Password: hillstone
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 274
StoneOS Cookbook
After completing the above configuration, users in the branch office can dial-up to connect to the intranet server.
275 Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN
StoneOS Cookbook
Step 2: Log in
o Server: 10.182.55.49
o Port: 4433
o Username: user1
o Password: hillstone
Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN 276
StoneOS Cookbook
Connection between Two Private Networks Using GRE over IPSec VPN
This example introduces how to create GRE over IPSec VPN to protect the communication between the private network of the
headquarters and the private network of the branch.
The topology is shown as below. Device A acts as the gateway of the headquarters and device B acts as the gateway of the branch. To
protect the communication between two private networks, use GRE over IPSec VPN.
*Due to lab environment, use 10.89.16.0/22 to represent the public network segment.
Connection between Two Private Networks Using GRE over IPSec VPN 277
StoneOS Cookbook
o Zone: trust
o Type: Static IP
o IP Address: 192.168.1.1
o Netmask: 255.255.255.0
o Zone: untrust
o Type: Static IP
o IP Address: 10.89.17.226
o Netmask: 255.255.252.0
278 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
o Zone: trust
o IP Address: 172.2.2.1
o Netmask: 255.255.255.0
o Zone: trust
o Type: Static IP
o IP Address: 192.168.2.1
o Netmask: 255.255.255.0
Connection between Two Private Networks Using GRE over IPSec VPN 279
StoneOS Cookbook
o Zone: untrust
o Type: Static IP
o IP Address: 10.89.18.131
o Netmask: 255.255.252.0
o Zone: trust
o IP Address: 172.2.2.2
o Netmask: 255.255.255.0
280 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
o DH Group: Group2
o Lifetime: 86400
o Protocol: ESP
o HASH: SHA
o Encryption: 3DES
o Compression: None
o Lifetime: 28800
Connection between Two Private Networks Using GRE over IPSec VPN 281
StoneOS Cookbook
o Name: center2branch1_ipsec
o Interface: ethernet0/1
o Mode: Main
o Type: Static IP
o Proposal1: p1forgre
282 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
o Peer
o Tunnel
o Name: center2branch1_ipsec_tunnel
o Mode: tunnel
o P2 proposal: p2forgre
Connection between Two Private Networks Using GRE over IPSec VPN 283
StoneOS Cookbook
o Authentication: Pre-share
o Hash: SHA
o Encryption: 3DES
o DH Group: Group2
o Lifetime: 86400
o Protocol: ESP
o HASH: SHA
o Encryption: 3DES
o Compression: None
o Lifetime: 28800
284 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
o Name: tocenter_ipsec
o Interface: ethernet0/1
o Mode: Main
o Type: Static IP
o Proposal1: p1forgre
Connection between Two Private Networks Using GRE over IPSec VPN 285
StoneOS Cookbook
o Peer
o Tunnel
o Name: tocenter_ipsec_tunnel
o Mode: tunnel
o P2 proposal: p2forgre
GRE VPN configurations are not supported by WebUI. You need to use CLI to complete the following GRE VPN configurations.
286 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
Connection between Two Private Networks Using GRE over IPSec VPN 287
StoneOS Cookbook
288 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
Configure routes.
o Destination: 192.168.2.0
o Interface: tunnel1
Connection between Two Private Networks Using GRE over IPSec VPN 289
StoneOS Cookbook
o Name: trust_to_trust
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: trust
o Address: Any
o Other
o Action: Permit
290 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
Configure routes.
o Destination: 192.168.1.0
o Interface: tunnel1
Connection between Two Private Networks Using GRE over IPSec VPN 291
StoneOS Cookbook
o Name: trust_to_trust
o Source
o Zone: trust
o Address: Any
o Destination
o Zone: trust
o Address: Any
o Other
o Action: Permit
292 Connection between Two Private Networks Using GRE over IPSec VPN
StoneOS Cookbook
In the topology below, PC1 and PC2 communicate through the VXLAN tunnel (VNI100).
Note: In the same tunnel, different VNIs cannot communicate with each other.
Configuration Steps
VTEP1 Configuratio
hostname(config-if-eth0/1)# exit
hostname(config-tunnel-vxlan)# exit
hostname(config)#
Step 3: Configure the tunnel interface and bind the Layer 2 security zone.
hostname(config-if-tun1)# exit
hostname(config)#
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
VTEP2 Configuration
hostname(config-if-eth0/1)# exit
hostname(config-tunnel-vxlan)# exit
hostname(config)#
Step 3: Configure the tunnel interface and bind the Layer 2 security zone.
hostname(config-if-tun1)# exit
hostname(config)#
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
PC1 and PC2 can communicate with each other through the VXLAN tunnel successfully.
Compared with the traditional VPN access mode, which allows an authorized user to access any resources on the internal network,
ZTNA (Zero Trust Network Access) starts with a default deny posture of zero trust on any entities, whether outside or inside the enter-
prise network perimeter. Hillstone ZTNA solutions adopts a dynamic authorization method with user identity being the focus and per-
sistently evaluates the creditability based on user identity and terminal device environment to achieve granular management of user,
terminal device and application and realize precise and secure service access control.
o Creditable identity: Identity evaluation is not restricted to account and password authentication but incorporates more identity
factors to provide enterprises with fine-grained user access control for profound access security.
o Creditable terminal device: Verified terminal state does not mean permanent access authorization. ZTNA persistently evaluates the
terminal environment and dynamically adjust the authorization scope to enure that the connected terminal is always under security
control.
o Creditable access: The old security concept that internal network is secure is broken. Any implicit creditability is eliminated. Access
to resources will be granted only when the user and the access device satisfy specific requirements so as to effectively mitigate
internal network security risks.
o "Windows User Accessing Internal Server by Using Internal Network Access via ZTNA" on Page 298
o "Windows User Remotely Accessing Internal Server Through ZTNA" on Page 314
o " Android User Remotely Accessing Internal Server Through ZTNA" on Page 335
Networking Scenario
The R&D department and finance department of an enterprise are located in different network segments. The R&D department needs
to use the intranet application resources including the bug system and OA system; The finance department needs to use the intranet
application resources including the finance system and OA system. These three systems are located in different network segments
within the enterprise. To improve the internal network security, the enterprise hopes that the employees of these two departments use
endpoints that comply with the network security regulations of the company so that they can access the corresponding system resources
as expected. Therefore, the enterprise deploys ZTNA internal network access and formulates the following access control policies
based on user identity and security requirements for access endpoints:
1. R&D employees are allowed to access the Bug management system and OA system.
3. The access device used for intranet access must meet these requirements: McAfee is run. If McAfee is not run, the employee is
allowed only to access the OA system.
4. A user that does not meet any one of the previous requirements will be denied from accessing any resources.
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 298
StoneOS Cookbook
Configuration Roadmap
1. Create user group "rd-group" for R&D employees and add R&D employee accounts to it.
2. Create user group "fin-group" for Finance employees and add Finance employee accounts to it.
3. Configure ZTNA server parameters for establishing secure connections from the client to the device and to the application
resources:
a. ZTNA server name: name of the ZTNA service that users will access
b. Egress interface and service port: address and port number of the ZTNA service
c. Allow download client from browser: allow users to download ZTNA client by accessing the ZTNA service address in the
browser
d. Forced Timeout: configure the user's online duration after successfully connecting to ZTNA. When the user's online dur-
ation reaches the configured time, the system forces the user to go offline.
e. Multiple login: allow the same user account to log in on multiple clients at the same time
4. Create application resources "Bug System", "Finance System" and "OA System", which correspond with the Bug management
system, Finance system and OA system respectively, and set their URL addresses. After a user logs in on the client, the user can
view the names and URL addresses of the application resources that are granted and currently not granted access. Application
resources that you have permission to access are displayed in blue on the ZTNA Portal page, and application resources that you
do not have permission to access are displayed in gray.
299 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
5. Configure endpoint tags. For users whose device status fully complies with the network security regulations of the company, set
two endpoint tags tag1 and tag2, i.e., tag1 requires the device to be a Windows 10 operating system and to select the cor-
responding running process of McAfee; tag2 requires the device to be a Windows 10 operating system.
6. Configure and enable ZTNA policies. When a user's group and tag match the ZTNA policy with action Permit, the user is gran-
ted access to specific application resources.
7. Configure the default action as being Deny, so that a user that do not match any ZTNA policy will be denied from accessing any
application resources.
Preparations
Please follow the steps below to configure the ZTNA security domain "zone" in advance and bind it to the Egress interface "eth-
ernet0/3". For more information, refer to StoneOS WebUI User Guide.
2. Click New, configure the security domain "zone" with "Service Type" as "ZTNA", and bind the security domain to the Egress
interface "ethernet0/3".
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 300
StoneOS Cookbook
Configuration Steps
Select ZTNA > User > Local User. Click New > User to create user "rduser01" and set the password, add it to user group "rd-
group"
Then, follow the same step to create user "finuser01" and add it to user group "fin-group".
Select ZTNA > Gateway, and Click New > Intranet Access, In the Name/Access User tab:
o Type: IPv4
o Assigned Users: Click New, and select "local" for the AAA Server dropdown list
Note: In the Assigned Users section, you can configure at most 10 AAA servers. When multiple servers are configured, you need
to configure the Domain parameter.
301 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Note: The Egress interface is bound to a security domain with a service type of ZTNA.
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 302
StoneOS Cookbook
In the Parameters tab, enable the Allow Download Client from Browser and Multiple login functions and set the Multiple login
times option to 0. And set the Forced Timeout time to 10080.
303 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Select ZTNA > Application Resource Book > Application Resource and click New. In the Application Resource Configuration
tab, click New to create application resource "Bug System".
o Name: Bug System (Name of the Bug management system displayed on ZTNA portal page)
o Address: 10.160.65.1/32
o Protocol: TCP
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 304
StoneOS Cookbook
o Name: Finance System (Name of the finance system displayed on ZTNA portal page)
o Address: 10.160.66.1/32
o Protocol: TCP
o Address: 10.160.67.1/32
o Protocol: TCP
305 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Select ZTNA > Endpoint > Information. In the Windows > Running Process tab, click New to add the following running pro-
cess.
o Alias: McAfee
o Running Process: mcafee.exe (enter the name of the process corresponding to McAfee)
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 306
StoneOS Cookbook
Select ZTNA > Endpoint > Tag and click New. In the Tag Configuration tab:
o Name: tag1
o Endpoint Info Type: Select Running Process. Continue to select exist and then McAfee.
307 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
o Name: tag2
o Name: z-policy1
o User: rd-group
o Action: Permit
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 308
StoneOS Cookbook
o Name: z-policy2
o User: fin-group
o Action: Permit
o Name: z-policy3
o User: rd-group、fin-group
o Action: Permit
309 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Select ZTNA > Policy and check whether these ZTNA policies are enabled. If not, select "z-policy1", "z-policy2", and "z-policy3"
, click ┇ and then select Enable.
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 310
StoneOS Cookbook
Step 8: Results
Verification Method:
1. Download Secure Connect Client. On PC1 and PC2, access https://192.168.7.1:8890 to download Secure Connect Win-
dows client. The IP address and port number are the ones configured in the Access Interface tab.
2. Log in the client on PC1 and PC2 to check whether the access privilege for each application is correct in the ZTNA portal
page.
3. Click an application resource with access privilege to check whether the user will be directed to the resource page.
Note: The operating systems of PC1 and PC2 are both Windows 10, and PC1 is running McAfee, while PC2 is not running
McAfee.
Verification Steps:
311 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Step 8: Results
o Server: 192.168.7.1
o Port: 8890
o Username: rduser01
Windows User Accessing Internal Server by Using Internal Network Access via ZTNA 312
StoneOS Cookbook
Step 8: Results
o Server: 192.168.7.1
o Port: 8890
o Username: finuser01
313 Windows User Accessing Internal Server by Using Internal Network Access via ZTNA
StoneOS Cookbook
Networking Scenario
An enterprise has R&D and Finance departments. The R&D department need to access enterprise application resources including the
Bug management system and OA system on the enterprise network. The Finance department needs to access enterprise application
resources including the Finance system and OA system on the enterprise network. Now, the enterprise hopes that employees in these
two departments can access these systems when they are on a business trip. Meantime, the employes are expected to access the system
using terminal devices that meet the enterprise's network security requirements. Therefore, the enterprise deploys ZTNA and for-
mulates the following control policies based on user identity and security requirements on access terminal devices:
o R&D employees are allowed to access the Bug management system and OA system.
o The access device used for remote access must meet these requirements: OS is Windows 10; McAfee is run. If McAfee is not run,
the employee is allowed only to access the OA system.
o A user that does not meet any one of the previous requirements will be denied from accessing any resources.
Configuration Roadmap
1. Create user group "rd-group" for R&D employees and add R&D employee accounts to it.
2. Create user group "fin-group" for Finance employees and add Finance employee accounts to it
3. Configure ZTNA server parameters for establishing secure connections from the client to the device and to the application
resources:
a. ZTNA server name: name of the ZTNA service that users will access
b. Egress interface and service port: address and port number of the ZTNA service
c. Address pool: used for allocating private addresses to connect the internal network
d. Tunnel interface and tunnel route: used to establish the dedicated tunnel between the user and the application resources
e. Allow download client from browser: allow users to download ZTNA client by accessing the ZTNA service address in the
browser
f. Multiple login: allow the same user account to log in on multiple clients at the same time
g. Two-step verification: configure the user to pass SMS code verification after logging in with user account and password
4. Create application resources "Bug System", "Finance System" and "OA System", which correspond with the Bug management
system, Finance system and OA system respectively, and set their URL addresses. After a user logs in on the client, the user can
view the names and URL addresses of the application resources that are granted and currently not granted access. Application
resources that you have permission to access are displayed in blue on the ZTNA Portal page, and application resources that you
do not have permission to access are displayed in gray. In addition, configure application resource "Inter-DNS" for the DNS
server on the enterprise network to provide domain name resolution for user traffic.
5. Configure endpoint tags. For users whose device status fully complies with the network security regulations of the company, set
two endpoint tags tag1 and tag2, i.e., tag1 requires the device to be a Windows 10 operating system and to select the cor-
responding running process of McAfee; tag2 requires the device to be a Windows 10 operating system.
6. Configure and enable ZTNA policies. When a user's group and tag match the ZTNA policy with action Permit, the user is gran-
ted access to specific application resources. In addition, configure a ZTNA policy to allow user traffic flowing to the internal
DNS server "Inter-DNS" for domain name resolution and place the policy at the beginning of all ZTNA policies.
7. Configure the default action as being Deny, so that a user that do not match any ZTNA policy will be denied from accessing any
application resources.
Preparations
Configure the address pool "pool-1", tunnel interface "tunnel23", and SMS gateway "hillstone" in advance. For more information, refer
to StoneOS WebUI User Guide.
Note: The IP address of the tunnel interface and the address pool "pool-1" needs to fall into the same CIDR block, and cannot conflict
with other internal endpoint that is in use.
o Select Object > Access Address Pool. On the Access Address Pool page, configure the address pool "pool-1".
Note: When you configure ZTNA, if you need to access application resources of internal networks by using domain, you need to
configure the DNS parameter.
o Select Network > Interface. On the Interface page, click New, select Tunnel Interface from the drop-down list, and then con-
figure the tunnel interface "tunnel23".
o Select System > SMS Parameters > SMS Gateway. On the SMS Gateway page, configure the SMS gateway "hillstone".
Configuration Steps
Select ZTNA > User > Local User. Click New > User to create user "rduser01", add it to user group "rd-group" and set the pass-
word and phone number for two-step verification.
Then, follow the same step to create user "finuser01" and add it to user group "fin-group".
Select ZTNA > Gateway, and Click New > Remote Access. In the Name/Access User tab:
o Type: IPv4
o Assigned Users: Click New, and select "local" for the AAA Server dropdown list
Note: In the Assigned Users section, you can configure at most 10 AAA servers. When multiple servers are configured, you need
to configure the Domain parameter.
Note: You need to configure the tunnel interface "tunnel23" and address pool "pool-1" in advance. The IP address of the tunnel
interface and the address pool need to fall into the same CIDR block.
o IP: 10.160.65.0
o Netmask: 255.255.255.0
o Metric: 35
Note: When you specify the tunnel route, the IP address of the tunnel route and the IP address of the internal network server need
to fall into the same CIDR block.
In the Parameters tab, enable the Allow Download Client from Browser and Multiple login functions and set the Multiple login
times option to 0.
Select ZTNA > Application Resource Book > Application Resource and click New. In the Application Resource Configuration
tab, click New to create application resource "Bug System".
o Name: Bug System (Name of the Bug management system displayed on ZTNA portal page)
o Address: 10.160.65.1/32
o Protocol: TCP
o Name: Finance System (Name of the finance system displayed on ZTNA portal page)
o Address: 10.160.65.2/32
o Protocol: TCP
o Address: 10.160.65.3/32
o Protocol: TCP
Repeat the previous operation to create application resource "Inter-DNS" for domain name resolution.
o Name: Inter-DNS
o Hyperlink: empty
o Address: 10.160.65.5/32
o Protocol: UDP
o Port: 53 - 53
Select ZTNA > Endpoint > Information. In the Windows > Running Process tab, click New to add the following running pro-
cess.
o Alias: McAfee
o Running Process: mcafee.exe (enter the name of the process corresponding to McAfee)
Select ZTNA > Endpoint > Tag and click New. In the Tag Configuration tab:
o Name: tag1
o Endpoint Info Type: Select Running Process. Continue to select exist and then McAfee.
o Name: tag2
o Name: z-policy1
o User: rd-group
o Action: Permit
o Name: z-policy2
o User: fin-group
o Action: Permit
o Name: z-policy3
o Action: Permit
o Name: dns-policy
o Action: Permit
Select ZTNA > Policy and check whether these ZTNA policies are enabled. If not, select "z-policy1", "z-policy2", "z-policy3" and
"dns-policy", click ┇ and then select Enable.
Step 8: Results
Verification Method:
1. Download Secure Connect Client. On PC1 and PC2, access https://10.182.159.103:8890 to download Secure Connect Win-
dows client. The IP address and port number are the ones configured in the Interface tab.
2. Log in the client on PC1 and PC2 to check whether the access privilege for each application is correct in the ZTNA portal
page.
3. Click an application resource with access privilege to check whether the user will be directed to the resource page.
Note: The operating systems of PC1 and PC2 are both Windows 10, and PC1 is running McAfee, while PC2 is not running
McAfee.
Verification Steps:
Step 8: Results
o Server: 10.182.159.103
o Port: 8890
o Username: rduser01
Step 8: Results
o Server: 10.182.159.103
o Port: 8890
o Username: finuser01
Networking Scenario
A bank needs the staff to handle services for customers on the go by accessing the bank service system via hand-held terminals. To
ensure access security, the bank wants to deploy ZTNA and requires that the staff use the Android device with customized device
model number designated by the bank, to access ZTNA and the system version of the device be updated to Android 13.
o The bank staff can log in the ZTNA gateway with the specified account and password when using the designated Android device,
and can switch to the bank service system via the ZTNA Portal page after login.
o The bank staff can log in the ZTNA gateway with the specified account and password when using other Android devices or using
the designated device whose system version is not Android 13, but cannot access the bank service system. When clicking the bank
service system displayed on the ZTNA Portal, the staff will see a tip indicating "Please use designated device and update system ver-
sion to Android 13!".
o Except the specified account, other account cannot log in the ZTNA gateway.
In addition, the bank hopes that the ZTNA service port be closed by default so as to make it and the bank service system invisible on the
network and not be scanned. For users needing to access the ZTNA service, the service port will be particularly open to the user only
after the user has passed the verification of the ZTNA service by sending single packet authorization (SPA) packets to knock the
ZTNA service port.
Configuration Roadmap
1. Create a local user "user01" for the bank work to log in the ZTNA gateway.
2. Configure ZTNA server parameters for establishing secure connects from the client to the device and to the application
resources.
a. ZTNA service: name of the ZTNA service that users will access
b. Egress interface and service port: address and port number of the ZTNA service
c. Address pool: used for allocating private addresses to connecting the internal network
d. Tunnel interface and tunnel route: used to establish the dedicated tunnel between the user and the application resources
3. Configure Single Packet Authorization (SPA) to hide the ZTNA service IP and port number. The ZTNA service port will be
open to the user who accesses through the Hillstone Secure Connect client and passes SPA.
4. Configure the bank service system as application resource "Bank System" and specify a hyperlink for it so that the user can switch
to the bank service system via the ZTNA Portal after login.
5. Configure the designated Android device's model number A-bank-2256 as a custom endpoint item "m-device".
6. Create endpoint tag "m-device-tag" for the designated Android device whose device model number is "m-device" and system
version is Android 13 and configure the tip "Please use designated device and update system version to Android 13!", which will
be displayed when the user is not granted access to the bank service system because the endpoint tag is not matched.
7. Configure and enable ZTNA policy "m-policy", allowing the bank staff to access the bank service system via the designated
Android device.
8. Configure the default action as being Deny, so that a user that do not match "m-policy" will be denied from accessing the bank
service system.
Preparations
Configure the address pool "pool-ad", and tunnel interface "tunnel2". For more information, refer to StoneOS WebUI User Guide.
Note: The IP address of the tunnel interface and the address pool "pool-ad" needs to fall into the same CIDR block, and cannot conflict
with other internal endpoint that is in use.
o Select Object > Access Address Pool. On the Access Address Pool page, configure the address pool "pool-ad".
Note: When you configure ZTNA, if you need to access application resources of internal networks by using domain, you need to
configure the DNS parameter.
o Select Network > Interface. On the Interface page, click New, select Tunnel Interface from the drop-down list, and then con-
figure the tunnel interface "tunnel2".
Configuration Steps
o Type: IPv4
o IP: 10.182.190.0
o Netmask: 255.255.255.0
o Metric: 35
o Port: 60001
o IP: 10.8.6.19
o Port: 20081
o Type: Domain
o Domain: bankserv.com
o Protocol: HTTPS
o Alias: m-device
o Name: m-device-tag
o Name: m-policy
o User: user01
o Action: Permit
Locate the QR code for Android client and use the designated
Android device to scan the code.
Download the installation file and install the Hillstone Secure Connect
client.
Open the client and click Add Connection on the upper right. In the
displayed dialog box, fill the following information and then click Add
Connection at the lower part:
o Server: 10.8.6.19
o Port: 20081
o User: user01
o SPA: on
o Port: 60001
After login, the ZTNA Portal Page is displayed. Click Bank System,
the user is switched to the bank service system.
High Availability
High Availability is a redundancy backup methhod. It uses two identical devices to ensure that when one fails to work, the other will
immediately takes over to provide network consistency.
o "Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the Continuity of Service " on
Page 355
o "Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on HSVRP, which Ensures Uniter-
rupted Business Traffic" on Page 360
The topology gives a typical user scenario for HA. In the designed scenario, one (Device A)of the HA devices will be working under
the active mode, while the other (Device B) is under passive mode. The active device will synchronize its data and status to the passive
device. When the active one fails, the passive device will immediately switch to be active, without interrupting the network.
Configuration Steps
Device A
o Name: track1
o Threshold: 255
o HA sync: Disable
Device B
o Name: track1
o Threshold: 255
o HA sync: Disable
o Zone: untrust
o HA sync: Enable
o Type: Static IP
o IP Address: 100.1.1.4
o Netmask: 29
o Zone: trust
o HA sync: Enable
o Type: Static IP
o IP Address: 192.168.1.4
o Netmask: 29
o Name: policy
o Service: Any
o Action: Permit
Device A
o IP Address: 10.10.1.1/24
o HA cluster ID: 1
o Node ID: 0
o HA Group Configuration:
Enter 10 for "Priority"
and select track1 for
"Track Object".
Device B
o IP Address: 10.10.1.2/24
o HA cluster ID: 1
o Node ID: 1
o HA Group Configuration:
Enter 100 for "Priority"
and select track1 for
"Track Object".
Device A
o Management IP
o IP Address: 192.168.1.253
Device B
o Management IP
o IP Address: 192.168.1.254
Step 5: Results
Device A
o HA State: Master
Device B
o HA State: Backup
Device A
Device B
o HA State: Master
As shown in the figure below, without affecting the original network architecture, the two Hillstone firewalls Device A and Device B
are connected transparently to the upstream and downstream devices.
The eth0/3 and eth0/4 interfaces of Device A are used to connected to the upstream and downstream routers. The eth0/3:1 and eth-
0/4:1 interfaces of Device B are used to connected to the upstream and downstream routers. Also, Device A and Device B use the
eth0/1 and eth0/2 interfaces as HA link interfaces.
Normally, both Device A and Device B forward the traffic from PC to the Server. When one of them fails, the other one takes over all
the traffic.
Configuration Steps
Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the 355
Continuity of Service
StoneOS Cookbook
Device A
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)# ha group 1
hostname(config-ha-group)# exit
hostname(config)#
Device B
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)# ha group 1
hostname(config-ha-group)# exit
hostname(config)#
356 Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the
Continuity of Service
StoneOS Cookbook
Device A
hostname(M0D1)(config-if-eth0/4)# exit
hostname(M0D1)(config-if-eth0/3)# exit
hostname(M0D1)(config-if-eth0/4:1)# exit
hostname(M0D1)(config-if-eth0/3:1)# exit
hostname(M0D1)(config)#
Device A
hostname(M0D1)(config-trackip)# exit
hostname(M0D1)(config)# ha group 0
hostname(M0D1)(config-ha-group)# exit
hostname(M0D1)(config)#
Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the 357
Continuity of Service
StoneOS Cookbook
Device B
hostname(D0M1)(config-trackip)# exit
hostname(D0M1)(config)# ha group 1
hostname(D0M1)(config-ha-group)# exit
hostname(D0M1)(config)#
hostname(M0D1)(config)# policy-global
hostname(M0D1)(config-policy)# rule id 1
Rule id 1 is created
hostname(M0D1)(config-policy-rule)# exit
hostname(M0D1)(config)#
Verification
When Device A and Device B work normally, both of them forward traffic from PC to Server(IP:30.1.2.10/24).
As shown below, you can use trace 30.1.2.10 command to view the path information of the traffic on PC.
358 Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the
Continuity of Service
StoneOS Cookbook
When Device B fails and Device A works normally, Device A takes over all the traffic from PC to server.
In this case, the status of Device A is still . The status of Device B changes from to . You can use ping
Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the 359
Continuity of Service
StoneOS Cookbook
As shown in the figure below, the two Hillstone devices M0D1 and D0M1 are deployed in the Peer A/A mode. The connection of the
interfaces on the two firewalls is as follows:
o M0D1:
o The xethernet1/10 is used as the HA control link interface and xethernet2/10 is used as the HA data link interface.
o The xethernet1/14 is directly connected to the upstream switch and its IP address is 20.1.1.11/24. The xethernet2/15 is dir-
ectly connected to the downstream switch and its IP address is 30.1.1.11/16.
o D0M1:
o The xethernet1/10 is used as the HA control link interface and xethernet2/10 is used as the HA data link interface.
o The xethernet1/14:1 is directly connected to the upstream switch and its IP address is 20.1.1.12/24. The xethernet2/15:1 is dir-
ectly connected to the downstream switch and its IP address is 30.1.1.12/16.
Four HSVRP groups are configured: hsvrp 1, hsvrp 2, hsvrp 3 and hsvrp 4. Their virtual IP address are different from each other.
Take hsvrp 1 and hsvrp 2 as example, the xethernet1/14 interface is used as the primary interface of hsvrp 1 and the xethernet1/14:1
interface is used as the secondary interface of hsvrp 1. The xethernet1/14:1 interface is used as the primary interface of hsvrp 2 and the
xethernet1/14 interface is used as the secondary interface of hsvrp 2.
If D0M1 fails, the virtual IP address of hsvrp 1 will still take effect on the xethernet1/14 interface. And the virtual IP address of hsvrp
2 will take effect on the xethernet1/14 interface too.
The virtual IP address of hsvrp 1 is configured as the gateway of the host PC1. The virtual IP address of hsvrp 2 is configured as the
gateway of the host PC2. The virtual IP address of hsvrp 4 is configured as the gateway of the server.
Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on 360
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
o If M0D1 and D0M1 work normally, M0D1 forwards the traffic from PC1 to Server and D0M1 forwards the traffic from PC2 to
Server.
o If D0M1 fails and the gateways of PC2 and Server are not changed, M0D1 will forward all the traffic from PC1 and PC2. This
ensures that network communication is not interrupted.
Configuration Steps
M0D1 Device
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)# ha group 1
hostname(config-ha-group)# exit
hostname(config)# exit
361 Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
D0M1 Device
hostname(config)# ha group 0
hostname(config-ha-group)# exit
hostname(config)# ha group 1
hostname(config-ha-group)# exit
hostname(config)# exit
Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on 362
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
M0D1 Device
hostname(M0D1)(config)# hsvrp id 1
hostname(M0D1)(config-hsvrp)# exit
hostname(M0D1)(config)# hsvrp id 2
hostname(M0D1)(config-hsvrp)# exit
hostname(M0D1)(config)# hsvrp id 3
hostname(M0D1)(config-hsvrp)# exit
hostname(M0D1)(config)# hsvrp id 4
hostname(M0D1)(config-hsvrp)# exit
Step 3: Configuring interfaces and referencing the HSVRP group for the interfaces.
hostname(M0D1)(config-if-xe1/14)# exit
363 Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
hostname(M0D1)(config-if-xe1/14:1)# exit
hostname(M0D1)(config-if-xe2/15)# exit
hostname(M0D1)(config-if-xe2/15:1)# exit
Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on 364
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
M0D1 Device
===================================================
ID: 1
Status: active(xethernet1/14)
===================================================
ID: 2
Status: inactive
===================================================
ID: 3
Status: active(xethernet2/15)
===================================================
365 Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
ID: 4
Status: inactive
===================================================
hostname(M0D1)(config)# policy-global
hostname(M0D1)(config-policy)# rule id 1
Rule id 1 is created
hostname(M0D1)(config-policy-rule)# exit
hostname(M0D1)(config)#
Verification
When M0D1 and D0M1 work normally, M0D1 forwards the traffic from PC1 to Server and D0M1 forwards the traffic from PC2 to
Server.
As shown below, on the M0D1 device, in any configuration mode, you can use show flow0-interface xethernet1/14 command to
view the information of corresponding sessions.
Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on 366
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
o The value "flag 104000" represents that this session is processed by M0D1 so it tests that M0D1 forwards the traffic from PC1 to
Server.
o The value "flag 204000" represents that this session is processed by the peer device D0M1 so it tests that D0M1 forwards the
traffic from PC2 to Server.
When D0M1 fails and the gateways of PC2 and Server are not changed, PC1 and PC2 can still connect to Server successfully. M0D1
forwards all the traffic from PC1 and PC2.
As shown below, on the M0D1 device, in any configuration mode, you can use show flow0-interface xethernet1/14 command to
view the information of corresponding sessions.
o The value "flag 104000" represents that this session is processed by M0D1. That is to say, M0D1 forwards all the traffic from PC1
and PC2.
367 Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on
HSVRP, which Ensures Uniterrupted Business Traffic
StoneOS Cookbook
QoS adopts the concept "pipe" to indicate traffic control method. A pipe is a bandwidth limit. The system divides bandwidth by creating
pipe of different sizes.
o "Outbound Link Load Balance with Customizable SLA Metrics" on Page 381
QoS Control
This examples shows how to control Internet bandwidth allocation to different users and applications. The key feature that applies in
this situation is 2-Stage QoS flow control.
As shown in the topology below, a company of 155 MB Internet bandwidth has a 2-Stage QoS requirement:
o In 1st Stage QoS: Within the 155 Mbps bandwidth, 40 Mbps will be allocated to Department A, 40 Mbps to Department B, and the
remaining 75 Mbps will be shared by all employees.
o In 2nd Stage QoS: The total P2P flow is limited to 10 Mbps, in which downloading is limited to 2 Mbps, streaming video is limited
to 8 Mbps, and within the video bandwidth, Youku streaming is limited to 6 Mbps.
Configuration Steps
o Name: DeptA
o Name: DeptB
o Source Information
o Interface: ethernet0/2
o Forward
o Backward
Step 4: Creating root pipe "p2p" under Level-2 control to limit P2P total to 10 Mbps
o Source Information
o Interface: ethernet0/2
o Other
o Forward
o Backward:
As shown in the following figure, this lab environment simulates the deployment of equipment at the second-level ISP exit scene.The
second-level ISP rent Tele-com, China Netcom and other operators of the bandwidth to the user to achieve Internet access. The figure
use 101.0.0.1 to connect to the Internet by Tele-com and 201.1.1.1 to connect to Netcom.
Configuration Steps
o Destination:0.0.0.0
o Subnet Mask:0
o Next Hop:interface
o Interface:ethernet0/1
o Gateway:101.1.1.1
o Destination:0.0.0.0
o Subnet Mask:0
o Next Hop:interface
o Interface:ethernet0/2
o Gateway:201.1.1.1
o Bandwidth
o Up Bandwidth:50000000bps
o Down Bandwidth:50000000bps
o Profile:HP_LLB
o Rule Name:HP_LLB_rule
o Vitual Router:trust-vr
o Destination Address:0.0.0.0/0
After completing the above steps, use the test tool to construct traffic through ethernet0/1 and ethernet0/2, respectively, and then
observe the traffic on each link.By changing the size of outgoing traffic,you can find that the traffic on two links can be adjusted
equitably. The system routing mechanism is as follows:
o When the bandwidth of each link does not exceed 30M (50M*60%), the system calculates the link overhead based on the link
delay, jitter and packet loss rate. The link with the lower link overhead eventually allocates more traffic, while the other link has
less traffic,but the two links are basically balanced.
o When the link bandwidth exceeds 30M, the system adds the bandwidth utilization factor to the calculation, that is, the system cal-
culates the link overhead based on the delay, jitter, packet loss rate and bandwidth utilization. The link with lower link overhead
eventually allocates more traffic, while the other link has less traffic, but the two links are basically balanced.
Q&A
o Q: What factors in the network affect the link load balancing routing of the system?
A: The delay, jitter, packet loss rate and bandwidth utilization of each link are the impact factors. System can intelligently oute and
dynamically adjust the traffic load of each link by monitoring the delay, jitter, packet loss rate and bandwidth utilization of each link
in real-time.
o High Performance - In this mode, system adjusts link to keep the link balance as fast as possible
o High Compatibility - In this mode, When the link load changes, system does not switch the link frequently, but ensures that the
service is as far as possible on the previous link. This mode is suitable for services that are sensitive to link switching, such as
banking services, only when the previous link is overloaded.
As shown in the following figure, a company has three egress lines, A, B, and C, each connected to the Internet through different ISP
dedicated lines:
o Line A: Connected to a certain ISP dedicated line via eth0/1 (IP: 101.0.0.1);
o Line B: Connected to another ISP dedicated line via eth0/2 (IP: 201.1.1.1);
o Line C: Connected to a third ISP dedicated line via eth0/3 (IP: 5.10.140.0).
The company has multiple research and development centers across the country, and efficient communication is required between
them. Tencent Meeting is the company's primary communication tool. The requirement is to configure the system so that employees
prefer lines with lower packet loss rates when using Tencent Meeting, thus ensuring smooth voice and video calls.
*This example is configured and verified by using 5.5R11 in a test environment. Please configure the IP address for each interface
based on the actual condition.
Configuration Instructions
Configuration Roadmap
1. Configure equal-cost routes to enable load balancing and forwarding of traffic across all egress interfaces.
2. Configure policy-based routes to direct Tencent Meeting application traffic to the three egress lines.
3. Configure outbound line load balance rule based on SLA packet loss threshold values to exclude lines that do not meet the
required packet loss rate, set the LLB packet loss priority factor to prefer lines with lower packet loss rates, and combine the
policy-based routes with the outbound line load balance rule to achieve control and load balancing of Tencent Meeting traffic.
o Destination: 0.0.0.0
o Subnet Mask: 0
o Interface: ethernet0/1
o Gateway: 101.0.0.2
o Destination: 0.0.0.0
o Subnet Mask: 0
o Interface: ethernet0/2
o Gateway: 201.1.1.2
o Destination: 0.0.0.0
o Subnet Mask: 0
o Interface: ethernet0/3
o Gateway: 5.10.140.1
o Type: Zone
o Source
o Address: any
o Destination
o Address: any
o Other
o Application: TencentMeeting
o Next-hop
o Name: LLB_meeting
o Name: SLA_loss
o Loss Threshold: 1
o Name:LLB_loss
Step 4: Results
After completing the above steps, when employees are using Tencent Meeting, by observing the Tencent Meeting traffic on each
link, it is found that the system can basically prioritize lines with lower packet loss rates. For example, if only Line A and Line B meet
the SLA criteria, while Line C does not, and Line A has a lower packet loss rate than Line B, by executing the command "show
session application TencentMeeting" to check the Tencent Meeting application sessions, it can be observed that
the interface ethernet0/1 of Line A has the highest Tencent Meeting sessions, the interface ethernet0/2 of Line B has a lower Ten-
cent Meeting sessions, and the interface ethernet0/3 of Line C has no Tencent Meeting sessions.
hostname(config-vrouter)# exit
hostname(config)#
hostname(config)# pbr-policy pbr_meeting (Create a PBR policy and enter the PBR policy configuration
mode)
hostname(config-pbr)# exit
hostname(config)#
hostname(config)# sla-profile SLA_loss (Create an SLA profile and enter the SLA profile configuration
mode)
hostname(config-sla-profile)# detect-mode passive type ipv4 (Set the detection mode to passive
detection mode)
hostname(config-sla-profile)# exit
hostname(config)#
hostname(config)# llb profile LLB_loss (Create an LLB profile and enter the LLB profile configuration
mode)
hostname(config-llb-profile)# exit
hostname(config)#
hostname(config)#
Step6: Results
After completing the above steps, when employees are using Tencent Meeting, by observing the Tencent Meeting traffic on each link, it
is found that the system can basically prioritize lines with lower packet loss rates. For example, if only Line A and Line B meet the SLA
criteria, while Line C does not, and Line A has a lower packet loss rate than Line B, by executing the command "show session
application TencentMeeting" to check the Tencent Meeting application sessions, it can be observed that the interface eth-
ernet0/1 of Line A has the highest Tencent Meeting sessions, the interface ethernet0/2 of Line B has a lower Tencent Meeting sessions,
and the interface ethernet0/3 of Line C has no Tencent Meeting sessions.
Threat Prevention
Threat prevention, that device can detect and block network threats occur. By configuring the threat protection function, Device can
defense network attacks, and reduce losses caused by internal network.
o "Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection" on Page 390
o "Protecting Intranet to Defend Attacks via Intrusion Prevention System" on Page 398
o "Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker" on Page 416
o "Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on the VM" on Page 431
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior
Detection
This example introduces how to use Abnormal Behavior Detection to find attacks about servers as early as possible, and integrate with
Mitigation to protect servers better.
As shown in the topology, the device is deployed in the data center exit. After enable and configure the Abnormal Behavior Detection,
when a Web server is infected by SYN flood frequently, a mail server is infected by port scan attacks periodically, Trojan implanted to
the intranet host, Trojan fake domain name by DGA algorithm technology, and connect external network control server, the admin-
istrator can find these attacks and protect the internal hosts and servers.
* To use Abnormal Behavior Detection, apply and install the StoneShield license.
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection 390
StoneOS Cookbook
Configuration Steps
Step 2: Configuring the critical asset object (Web Server and Mail Server)
391 Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection
StoneOS Cookbook
Step 2: Configuring the critical asset object (Web Server and Mail Server)
o Type: Server
o IP: 172.20.0.10
o Type: Server
o IP: 172.18.1.20
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection 392
StoneOS Cookbook
393 Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection
StoneOS Cookbook
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection 394
StoneOS Cookbook
395 Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection
StoneOS Cookbook
Step 4: Integrating with Mitigation, and configuring the mitigation rules for attacks.
o Severity: Low
o Duration: 60
Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection 396
StoneOS Cookbook
Step 4: Integrating with Mitigation, and configuring the mitigation rules for attacks.
o Severity: Low
o Role: Attacker
o Total Number: 20
o Drop Percent: 50
o Duration: 60
397 Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection
StoneOS Cookbook
As shown in the following topology, the device is deployed in the Intranet exit. After enabling and configuring the Intrusion Prevention
System, the device will protect Intranet against internet attacks.
Configuration Steps
Source:
o Zone:untrust
o Address:any
Destination:
o Zone:dmz
o Address:any
Others:
o Service:any
o Action:Permit
Source:
o Zone:trust
o Address:any
Destination:
o Zone:dmz
o Address:any
Others:
o Service:any
o Action:Permit
o Profile:predef_default
directorylist.jsp?n=X'or%20telephonenumber%20like%20''.
The device will display the attack information and block the
attack.
ditions.
conditions.
Forensic Analysis
This feature may not be available on all platforms. Please check your system's actual page to see if your device delivers this feature.
This example shows how to in-depth view the threat of the whole network and analyze the threat evidence.
Forensic Analysis provides evidence chain of network threats to collect, multi-perspective analysis and the depth of integration.
o Evidence Collection: Through the configuration of Forensic Analysis function (packet capture), detect the attack generated at the
same time evidence collection.
o Evidence Presentation: Display the threat details, logs, evidence pacp via iCenter, to achieve the threat of visualization.
Configuration Steps
At present, the system only supports the Forensic Analysis function of three threat detection engines (Advanced Threat Detection, Intru-
sion Prevention System, Anti Virus)
Anti Virus
As follows, taking advanced threat detection (ATD) as an example to demonstrate the process of Forensic Analysis
When ATD attacks occurred, the system will generate a relevant threat log and capture evidence, sent to the system database.
According to the source IP, Advanced threat detection engine capture relational pacp at the same time, it is the HTTP traffic data
(including TCP interaction) in 5 minutes or 64K size package, and used to assist in the analysis.
4. Downloading evidence.
o CloudView: CloudView is a SaaS product. It is deployed on the public cloud to provide users with online on-demand services. Hill-
stone devices register with the cloud service platform and upload device information, traffic data, threat events, system logs and so
on to the cloud service platform, and the visual display is provided by CloudView . Users can monitor the device status, gain reports
and threat analysis through the Web or mobile phone APP. For more information about CloudView, refer to the CloudView FAQs.
o Cloud Sandbox: It is a technology adopted by the Sandbox function. After a suspicious file being uploaded to the Hillstone cloud ser-
vice platform, the cloud sandbox will collect behaviors of the file, analyze the collected data, verify the legality of the file, send the
analysis result to system and deal with the malicious file according to the actions set by system.
o CloudVista (Threat Intelligence Center): Threat Intelligence function can upload some elements in the logs generated by each mod-
ule to the cloud service platform, such as IP address, domain, etc. The cloud service platform will check whether the elements have
threat intelligence through the threat center. You can view threat intelligence information related to elements through the threat
intelligence center.
This example shows how to Obtain threat intelligence services through the Hillstone Cloud Service Platform.
The topology is shown as below. Device connects to theHillstone Cloud Service Platform, upload some elements in the logs generated
by each module to the cloud service platform and obtain the threat intelligence .
Preparation
2. Register a Cloud Service account. Enter the address "https://user.hillstonenet.com/login" in the web browser of the PC to
register.
Configuration Steps
o Address: cloud.hillstonenet.com.cn
o User: hillstone
o Password: password@123
Note: When using the default password to connect to the cloud platform, you can also get the corresponding cloud service,
but you cannot view the data uploaded by the device from the cloud platform.
After configuring the above steps, You can view the entries with threat intelligence on the ICenter page. In the threat list, hover your
cursor over a object, and there is a button to its right. The button appears on the right. Click this button and select View threat intel-
ligence.
Note: The built-in method of local asset identification used in this example supports only A-series firewalls. We recom-
mend that you use A2600 and higher models.
Networking Requirements
As shown in the following figure, a firewall (NGFW: 10.182.191.36) is deployed at the internal network border of the enterprise. The
address of Docker within the firewall is set to 172.25.0.1/24. In addition, the security operation platform (Hillstone iSource
10.182.79.27) is deployed.
The internal IoT of the enterprise contains various types of IoT devices, categorized based on areas as follows:
To identify detailed information about IoT asset devices by using the built-in method of local asset identification, and to meet the fol-
lowing requirements with the IoT security monitor function of the firewall together:
o Identify&monitor IoT device: Perform asset identification and monitor management on IoT devices in the deployment envir-
onment.
o Manage IoT device traffic: Manage the network permissions of identified tablets. Specifically, disable their network traffic by using
policy rules.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 416
StoneOS Cookbook
o Analyze IoT data: Combined with iSource and cloud platform in the deployment environment, upload IoT data to iSource for uni-
fied analysis statistics, control, and asset management.
*This example is configured and verified by using 5.5R10F4 in a test environment. Please configure the IP address for each interface
based on the actual condition.
Preparations
Before you start, make sure that the following prerequisites are met:
o DHCP traffic from IoT devices in the network passes through the firewall or is mirrored to the firewall.
o The system version of the firewall supports the IoT monitor function. You can run the show version command to view the
system version. Please use StoneOS 5.5R10F4 or later F version.
o The IoT license is installed on the firewall device and you have logged in to the device again.
o iSource is deployed.
Configuration Steps
417 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
6. Configure the identification list by specifying the address list of IoT devices.
7. Configure the terminal type——enable/disable the function of automatically synchronizing terminals to repository.
8. Configure the zone to enable IoT Monitor function and bind an identification list.
1. Configure the region based on the IoT device CIDR block of the IT department, administration department, and HR depart-
ment.
2. View IoT monitor, including the manufacturer, type, online device, and various detailed statistics of all identified IoT devices.
1. Configure the device object——specify the category dimension for IoT devices to map identified IoT devices to device objects.
2. Configure the policy rule——configure the policy rule based on device object.
o Upload IoT data to iSource——After you upload IoT data to iSource, iSource can implement further threat event response and
handling such as asset management and blocking/policy deployment.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 418
StoneOS Cookbook
o Name: IoTDocker
o Memory: 550
Click OK.
419 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
4. Click OK.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 420
StoneOS Cookbook
Click OK.
o Type: IP
o IP Type: IPv4
Click OK.
421 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
Step 7: Configure the terminal type. For example, automatically add the identified IPC to repository
Select Object > IoT Policy > Terminal Type. Then, turn
on the switch in the Add to Repository Automatically
column corresponding to IPC in the list.
Step 8: Configure a zone to enable the IoT Monitor function of the zone. Select the zone used by IoT device traffic passing
through the firewall based on the actual networking environment (In this example, the layer-3 zone "trust" is used)
Select Network > Zone. In the list, select "trust" and click
Edit.
Click OK.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 422
StoneOS Cookbook
o Name: IT department
o Type: IP/Netmask
o Member: 192.168.2.0/24
Click OK.
o Name: HR department
o Type: IP/Netmask
o Member: 192.168.3.0/24
Click OK.
423 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
o Type: IP/Netmask
o Member: 192.168.4.0/24
Click OK.
Select Monitor > IoT Monitor > Details to view details about all identified IoT devices in the deployment environment.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 424
StoneOS Cookbook
Select Monitor > IoT Monitor > Summary to view the top 10 device manufacturers and device type distribution.
Click OK.
425 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
Step 2: Configure the policy rule to manage permissions on Internet access for tablets
o Name: Policy-iot
Click OK.
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 426
StoneOS Cookbook
Click OK.
hostname(config-docker)# cpu 0
427 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
hostname# import docker-image-file IoTDocker from ftp server 10.200.6.10 user testuser password
123456 local-iot-identify-docker-1.0.231206.gz
hostname (config)# docker-config network 172.25.0.1/24 (This IP address is used for internal and
external Docker communication. You can configure any IP address, which cannot conflict with other
interfaces.)
hostname# (config)# iot-monitor docker-detect local-docker port 36000 (The port number needs to be
consistent with the host port number configured in Step 1)
hostname(config-IoT-monitor-identify-list)# exit
Step 7: Configure a zone to enable the IoT Monitor function of the zone. Select the zone used by IoT device traffic passing
through the firewall based on the actual networking environment (In this example, the layer-3 zone "trust" is used)
hostname(config)#zone trust
hostname(config-zone-trust)# exit
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 428
StoneOS Cookbook
hostname(config)# iot-monitor district id 1 name admin (Configure the region of administration depart-
ment)
Total: 5
hostname(config-device)# exit
429 Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker
StoneOS Cookbook
Step 2: Configure the policy rule to manage permissions on Internet access for tablets
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
hostname(config-isource)# enable
hostname(config-isource)# exit
Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker 430
StoneOS Cookbook
Networking Requirements
As shown in the following figure, a firewall (NGFW:10.182.191.36) is deployed at the internal network border of the enterprise, and
the asset identification system is deployed on the VMware ESXi server (10.182.197.172). In addition, the security operation platform
(Hillstone iSource 10.182.79.27) is deployed.
The internal IoT of the enterprise contains various types of IoT devices, categorized based on areas as follows:
To identify detailed information about IoT device assets by using the asset identification system deployed on the VM, and to meet the
following requirements with the IoT monitor function of the firewall together:
o Identify&monitor IoT device: Perform asset identification and monitor management on IoT devices in the deployment envir-
onment.
o Manage IoT device traffic: Manage the network permissions of identified tablets. Specifically, disable their network traffic by using
policy rules.
o Analyze IoT data: Combined with iSource and cloud platform in the deployment environment, upload IoT data to iSource and
cloud platform for unified analysis statistics, control, and asset management.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 431
the VM
StoneOS Cookbook
*This example is configured and verified by using 5.5R10F4 in a test environment. Please configure the IP address for each interface
based on the actual condition.
Preparations
Before you start, make sure that the following prerequisites are met:
Networking environment:
o DHCP traffic from IoT devices in the network passes through the firewall or is mirrored to the firewall.
o iSource is deployed.
Firewall device:
o The system version of the firewall supports the IoT monitor function. You can run the show version command to view the
system version. Please use StoneOS 5.5R10F4 or later F version.
o The IoT license is installed on the firewall device and you have logged in to the device again.
o The VM environment is deployed based on system requirements: the version of VMware ESXi is 7.0 and later; the VM has at least
4 vCPUs, 4 GB of memory, and 20 GB of disk space and is installed with a NIC.
432 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
o The installation file in ZIP format (including ovf, vmdk, iso, and mf files) is obtained from Hillstone Networks technical support.
After the package is decompressed, save ovf and vmdk files to your PC.
Configuration Steps
o VM configuration:
o Firewall configuration:
2. Configure the identification list by specifying the address list of IoT devices.
3. Configure the terminal type——enable/disable the function of automatically synchronizing terminals to repository.
4. Configure the zone to enable IoT Monitor function and bind an identification list.
1. Configure the region based on the IoT device CIDR block of the IT department, administration department, and HR depart-
ment.
2. View IoT monitor, including the manufacturer, type, online device, and various detailed statistics of all identified IoT devices.
1. Configure the device object——specify the category dimension for IoT devices to map identified IoT devices to device objects.
2. Configure the policy rule——configure the policy rule based on device object.
o Upload IoT data to iSource——After you upload IoT data to iSource, iSource can implement further threat event response and
handling such as asset management and blocking/policy deployment.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 433
the VM
StoneOS Cookbook
VM Configuration
Step 2: Create a VM
434 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Step 2: Create a VM
Click Next.
o VM name: iot-identify-vm
Click Next.
4. Select storage.
Click Next.
Note: The hard disk needs to be larger than 20 GB
in size.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 435
the VM
StoneOS Cookbook
Step 2: Create a VM
Click Next.
After the system files are uploaded to the disk, the virtual
machine is created.
Note: The deployment process may take a long time. Do not refresh the page before the deployment is completed.
436 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
2. In the left-side Navigator, click Virtual Machines. On the page that appears, select the VM iot-identify-vm created in the
steps above.
3. Select Console > Open browser console or click the console thumbnail to open the console.
4. Enter the default username and password (hillstone/hillstone) to log in to the VM.
After the VM is deployed, you need to modify the NIC configuration by specifying the configuration file within /etc/netplan based
on the current environment.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 437
the VM
StoneOS Cookbook
3. Move the pointer over the position where you want to modify the configuration and press i to enter the edit mode. You can
modify the address to 10.182.197.172.
Note: The IP address needs to be accessible by the firewall and the browser of the PC on which the asset identification system
is installed, and this IP address is used as the IP address of the VM of IoT local asset identification.
4. After you modify the address, press ESC and then :wq to exit the configuration file and save the configuration information.
438 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 439
the VM
StoneOS Cookbook
Firewall Configuration
Log in to the firewall and select Object > IoT Policy >
Configuration.
Click OK.
440 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
o Type: IP
o IP Type: IPv4
Click OK.
Step 3: Configure the terminal type. For example, automatically add the identified IPC to repository
Select Object > IoT Policy > Terminal Type. Then, turn
on the switch in the Add to Repository Automatically
column corresponding to IPC in the list.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 441
the VM
StoneOS Cookbook
Step 4: Configure a zone to enable the IoT Monitor function of the zone. Select the zone used by IoT device traffic passing
through the firewall based on the actual networking environment (In this example, the layer-3 zone "trust" is used)
Select Network > Zone. In the list, select "trust" and click
Edit.
Click OK.
442 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
o Name: IT department
o Type: IP/Netmask
o Member: 192.168.2.0/24
Click OK.
o Name: HR department
o Type: IP/Netmask
o Member: 192.168.3.0/24
Click OK.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 443
the VM
StoneOS Cookbook
o Type: IP/Netmask
o Member: 192.168.4.0/24
Click OK.
Select Monitor > IoT Monitor > Details to view details about all identified IoT devices in the deployment environment.
444 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Select Monitor > IoT Monitor > Summary to view the top 10 device manufacturers and device type distribution.
Click OK.
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 445
the VM
StoneOS Cookbook
Step 2: Configure the policy rule to manage permissions on Internet access for tablets
o Name: Policy-iot
Click OK.
446 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Click OK.
VM Configuration
Firewall Configuration
hostname# (config)# iot-monitor docker-detect external-docker ip 10.182.197.172 port 45622 (In this
example, the default port number is used. If customization is required, the port number needs to be con-
sistent with the "Docker Port" configured in "Related Configuration" in step 5 of the virtual machine con-
figuration.)
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 447
the VM
StoneOS Cookbook
hostname(config-IoT-monitor-identify-list)# exit
Step 3: Configure a zone to enable the IoT Monitor function of the zone. Select the zone used by IoT device traffic passing
through the firewall based on the actual networking environment (In this example, the layer-3 zone "trust" is used)
hostname(config)#zone trust
hostname(config-zone-trust)# exit
hostname(config)# iot-monitor district id 1 name admin (Configure the region of administration depart-
ment)
448 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Total: 5
hostname(config-device)# exit
Step 2: Configure the policy rule to manage permissions on Internet access for tablets
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on 449
the VM
StoneOS Cookbook
hostname(config-isource)# enable
hostname(config-isource)# exit
450 Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on
the VM
StoneOS Cookbook
Data Security
The data security allows you to flexibly configure control rules to comprehensively control and audit (by behavior logs ) on user net-
work behavior.
o "Decrypting HTTPS Traffic and Identifying the Encrypted Application" on Page 452
o "URL Filtering for HTTPS Traffic without the CA Certificate" on Page 456
As shown in the below scenario, an internal user accesses a HTTPS website and the traffic is encrypted by SSL protocol. With the SSL
proxy and application identification functions enabled, the device can decrypt the HTTPS traffic and identify the encrypted application.
Configuration Steps
o Name: profile1
o Warning: Enable
o Content: CA Certificate
o Action: Export
Step 4: Upgrading to the professional application signature database and enabling the application identification function
Step 4: Upgrading to the professional application signature database and enabling the application identification function
As shown in the following topology, Hillstone device works as the gateway of an enterprise. The ethernet0/0 connects the Internet and
belongs to the untrust zone. The ethernet0/1 connects to the Intranet and belongs to the trust zone.
With the configured URL filtering rule, staff of the enterprise (the network segment: 10.100.0.0/16) are prohibited from accessing
shopping websites and the entertainment websites https:// www.bcd.com during working hours (09:00 to 18:00, Monday to Friday).
The access and search attempts will be logged.
Preparation
Before configuring the URL filtering function, prepare the following first:
Configuration Steps
o Name: workday
o Type: Days.
Step 2: Configure the user-defined URL category named bcd that contains https://www.bcd.com
Step 2: Configure the user-defined URL category named bcd that contains https://www.bcd.com
o Category: bcd
Step 3: Configure the URL filtering rule named URLcontrol, and enable the SSL Inspection
o Name: URLcontrol
o Name: policy1
Step 5: Result
IPv6
StoneOS is dual-stack firmware that supports both IPv4 and IPv6. It also supports tunneling technique (the latest version supports
manual IPv6 tunnel) for IPv6 communication.
o "Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG" on Page 474
o "Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG" on Page 483
o "Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel" on Page 494
o "Allowing Communication Between IPv6 networks by Configuring a 6RD Tunnel" on Page 497
IPv6 462
StoneOS Cookbook
o The IPv6 network of headquarters can connect with the IPv4 Internet and be accessed by the Internet users.
o The networks of headquarters can connect with the IPv6 network of branch A via 6in4 tunnel.
o The networks of headquarters can connect with the IPv4 network of branch B.
The headquarters, branch A and branch B is deployed with a Hillstone device separately and the topology is as follows:
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# dns-proxy
hostname(config-if-eth0/2)# exit
hostname(config-if-tun1)# exit
Step 2: Configure the route and NAT rules, including headquarters accessing the Internet, headquarters communicating with
branch B, and public IP accessing IPv6 server of headquarters.
hostname(config-vrouter)# snatrule id 1 from 2005::/96 to 2003::/96 service any eif ethernet0/1 trans-
to eif-ip mode dynamicport
hostname(config-vrouter)# snatrule id 2 from 2005::2/96 to 2004::2 service any eif ethernet0/1 trans-
to eif-ip mode dynamicport
hostname(config-vrouter)# snatrule id 3 from any to 200.0.0.2 service any eif ethernet0/2 trans-to
2005::1 mode dynamicport
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 2
Rule id 2 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 3
Rule id 3 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 4
Rule id 4 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 5
Rule id 5 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 6
Rule id 6 is created
hostname(config-policy-rule)# exit
hostname(config-ip6in4-manual)# exit
Note: The ipv6 dns64-proxy command is not supported for some versions.
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
hostname(config-if-tun1)# exit
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 31
Rule id 31 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 32
Rule id 32 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 33
Rule id 33 is created
hostname(config-policy-rule)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 34
Rule id 34 is created
hostname(config-policy-rule)# exit
hostname(config-ip6in4-manual)# exit
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/4)# exit
hostname(config-vrouter)# snatrule id 1 from any to any service any eif ethernet0/4 trans-to eif-ip
mode dynamicport
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 35
Rule id 35 is created
hostname(config-policy-rule)# exit
o Scenario 1: IPv6-only network. In the topology below, an enterprise sets up a Hillstone security device as the export gateway to
connect internal network with the Internet. Both internal and external network IP addresses are deployed with IPv6 addresses.
With the ALG function configured, the internal FTP client can access the FTP server in the extranet.
o Scenario 2: IPv4 network to IPv6 network. In the topology below, an enterprise sets up a Hillstone security device as the export
gateway to connect internal network with the Internet. The internal network is deployed with IPv4 addresses and the external net-
work is deployed with IPv6 addresses. With the ALG function configured, the internal FTP client can access the FTP server in the
extranet.
o Scenario 3: IPv6 network to IPv4 network. In the topology below, an enterprise sets up a Hillstone security device as the export
gateway to connect internal network with the Internet. The internal network is deployed with IPv6 addresses and the external net-
work is deployed with IPv4 addresses. With the ALG function configured, the internal FTP client can access the FTP server in the
extranet.
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 474
StoneOS Cookbook
Before starting the configuration, you need to ensure that the configuration of the FTP server and the FTP client has been completed.
This example only describes the relevant configuration on the device.
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
475 Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
session: id 44, proto 6, flag 0, flag1 20000, flag2 0, flag3 0, created 39340, life 1787, policy 1,app 4(FTP)
flag 0x1, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40308b10): [2003::2]:64348->[2001::2]:21
flow1(31(ethernet0/1)/308b10): [2001::2]:21->[2003::2]:64348
session: id 2, proto 6, flag 8000000, flag1 20000, flag2 0, flag3 0, created 39408, life 1800, policy 1,app
70(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(31(ethernet0/1)/208810): [2001::2]:20->[2003::2]:64363
flow1(32(ethernet0/2)/40208810): [2003::2]:64363->[2001::2]:20
session: id 61, proto 6, flag 10000, flag1 20000, flag2 0, flag3 0, created 39683, life 1775, policy 1,app 4
(FTP) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40308b10): [2003::2]:64362->[2001::2]:21
flow1(31(ethernet0/1)/308b10): [2001::2]:21->[2003::2]:64362
session: id 22, proto 6, flag 8000000, flag1 20000, flag2 0, flag3 0, created 39684, life 1776, policy 1,app
70(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40208810): [2003::2]:64398->[2001::2]:56008
flow1(31(ethernet0/1)/208810): [2001::2]:56008->[2003::2]:64398
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 476
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
477 Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
hostname(config)# nat
hostname(config-nat)# snatrule id 1 from any to 192.168.2.10 service any trans-to 2001::10 mode
dynamicport
rule ID=1
rule ID=1
hostname(config-nat)# exit
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 478
StoneOS Cookbook
session: id 64, proto 6, flag e, flag1 20007, flag2 0, flag3 0, created 133143, life 1797, policy 2,app 4(FTP)
flag 0x1, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40300b10): 192.168.2.2:58259->192.168.2.10:21
flow1(31(ethernet0/1)/308b10): [2001::2]:21->[2001::10]:1025
session: id 14, proto 6, flag 8000016, flag1 2000b, flag2 0, flag3 0, created 133147, life 297, policy 2,app
70(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(31(ethernet0/1)/208810): [2001::2]:20->[2001::10]:58261
flow1(32(ethernet0/2)/40200810): 192.168.2.2:58261->192.168.2.10:20
session: id 20, proto 6, flag e, flag1 20007, flag2 0, flag3 0, created 133393, life 1797, policy 2,app 4(FTP)
flag 0x1, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40300b10): 192.168.2.2:58272->192.168.2.10:21
flow1(31(ethernet0/1)/308b10): [2001::2]:21->[2001::10]:1030
session: id 2, proto 6, flag 800000e, flag1 20007, flag2 0, flag3 0, created 133397, life 1797, policy 2,app
70(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40200810): 192.168.2.2:58273->192.168.2.10:61665
flow1(31(ethernet0/1)/208810): [2001::2]:61665->[2001::10]:61665
479 Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 480
StoneOS Cookbook
hostname(config)# nat
hostname(config-nat)# snatrule id 1 from ipv6-any to 2003::10 service any trans-to 192.168.1.10 mode
dynamicport
rule ID=1
rule ID=1
hostname(config-nat)# exit
481 Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
session: id 6, proto 6, flag e, flag1 2000b, flag2 0, flag3 0, created 40792, life 1799, policy 1,app 4(FTP)
flag 0x1, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40308b10): [2003::2]:64537->[2003::10]:21
flow1(31(ethernet0/1)/300b10): 192.168.1.2:21->192.168.1.10:1034
session: id 5, proto 6, flag 8000016, flag1 20007, flag2 0, flag3 0, created 40798, life 1799, policy 1,app
70(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(31(ethernet0/1)/200810): 192.168.1.2:20->192.168.1.10:64538
flow1(32(ethernet0/2)/40208810): [2003::2]:64538->[2003::10]:20
session: id 21, proto 6, flag e, flag1 2000b, flag2 0, flag3 0, created 40093, life 1799, policy 1,app 4(FTP)
flag 0x1, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40308b10): [2003::2]:64435->[2003::10]:21
flow1(31(ethernet0/1)/300b10): 192.168.1.2:21->192.168.1.10:1026
session: id 14, proto 6, flag 800000e, flag1 2000b, flag2 0, flag3 0, created 40099, life 300, policy 1,app 70
(FTP-DATA) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/2)/40208810): [2003::2]:64436->[2003::10]:56075
flow1(31(ethernet0/1)/200810): 192.168.1.2:56075->192.168.1.10:56075
Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 482
StoneOS Cookbook
o Scenario 1: IPv6-only network. In the topology below, an enterprise sets up a Hillstone security device as the export gateway to
connect internal network with the Internet. Both internal and external network IP addresses are deployed with IPv6 addresses.
With the ALG function configured, the internal SIP UC1 and the external SIP UC3 can successfully establish communication with
each other.
o Scenario 2: IPv4 network to IPv6 network. In the topology below, an enterprise sets up a Hillstone security device as the export
gateway to connect internal network with the Internet. The internal network is deployed with IPv4 addresses and the external net-
work is deployed with IPv6 addresses. With the ALG function configured, the internal SIP UC1 and the external SIP UC3 can suc-
cessfully establish communication with each other.
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 483
StoneOS Cookbook
o Scenario 3: IPv6 network to IPv4 network. In the topology below, an enterprise sets up a Hillstone security device as the export
gateway to connect internal network with the Internet. The internal network is deployed with IPv6 addresses and the external net-
work is deployed with IPv4 addresses. With the ALG function configured, the internal SIP UC1 and the external SIP UC3 can suc-
cessfully establish communication with each other.
484 Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
Before starting the configuration, you need to ensure that the configuration of the SIP Server and the SIP user agent (SIP UC) has been
completed. This example only describes the relevant configuration on the device.
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 485
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
486 Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
View the information of media pinhole. Total pinhole count is 5, including 1 register pinhole and 4 media
pinhole.
[Pinhole0]========================================
Seq 10
Flag: Enabled,
[Ingress info]---------------------------------------------------
[Egress info]----------------------------------------------------
[Life info]------------------------------------------------------
After_hit 600
Before_hit 120
Timer 217
[Other info]-----------------------------------------------------
Auth_user_id 0
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 487
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
488 Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
hostname(config)# nat
hostname(config-nat)# snatrule id 1 from any to 192.168.1.10 service any trans-to 2003::10 mode
dynamicport
rule ID=1
rule ID=1
hostname(config-nat)# exit
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 489
StoneOS Cookbook
View the information of media pinhole. Total pinhole count is 5, including 1 register pinhole and 4 media
pinhole.
[Pinhole
1]========================================================-
====
Seq 15
Flag: Enabled,
[Ingress info]---------------------------------------------------
[Egress info]----------------------------------------------------
[Life info]------------------------------------------------------
After_hit 600
Before_hit 120
Timer 38
[Other info]-----------------------------------------------------
Auth_user_id 0
490 Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Rule id 1 is created
hostname(config-policy)# rule id 1
hostname(config-policy-rule)# exit
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 491
StoneOS Cookbook
hostname(config)# nat
hostname(config-nat)# snatrule id 1 from ipv6-any to 2001::10 service any trans-to 192.168.2.10 mode
dynamicport
rule ID=1
rule ID=1
hostname(config-nat)# exit
492 Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG
StoneOS Cookbook
View the information of media pinhole. Total pinhole count is 5, including 1 register pinhole and 4 media
pinhole.
[Pin-
hole1]====================================================
Seq 36
Flag: Enabled,
[Ingress info]---------------------------------------------------
[Egress info]----------------------------------------------------
[Life info]------------------------------------------------------
After_hit 600
Before_hit 120
Timer 107
[Other info]-----------------------------------------------------
Auth_user_id 0
Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG 493
StoneOS Cookbook
In the topology below, PC supports dual protocol stacks. Hillstone device is connected to the corresponding IPv6 network and IPv4 net-
work. It is required to configure the ISATAP tunnel so that the dual-stack host PC in the IPv4 network can access the server in the
intranet IPv6 network.
Configuration Steps
hostname(config-if-eth0/1)# exit
hostname(config-if-eth0/2)# exit
Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel 494
StoneOS Cookbook
hostname(config-ip6in4-isatap)# exit
hostname(config)#
Configure the tunnel interface and bind the tunnel interface to the ISATAP tunnel.
hostname(config-if-tun1)# exit
hostname(config)#
495 Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel
StoneOS Cookbook
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
The dual-stack host (10.1.2.2) can access the IPv6 Server (3001::8) through FTP successfully.
Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel 496
StoneOS Cookbook
* This example is used in a laboratory environment. Please configure the IP addresses of each interface according to the actual con-
nections.
The figure above shows the network topology. This example includes the following two scenarios:
o Scenario 1: 6RD Domain -6RD Domain.The headquarters deploys a Hillstone security device Device and branch A deploys a Hill-
stone security device Device A. Device and Device A support both IPv4 and IPv6 and they are CE devices. Both Device and
Device A are connected to the IPv6 network on one end and the IPv4 network on the other end. Assume that the ISP provides an
IPv6 prefix of 1001:AABB::/32. To allow hosts in two different 6RD domains to communicate, you need to configure a 6RD tun-
nel between Device and Device A.
o Scenario 2: 6RD Domain -IPv6 Network.The headquarters deploys a Hillstone security device Device and branch B deploys a Hill-
stone security device Device B. Both Device and Device B are connected to the IPv6 network on one end and the IPv4 network on
the other end. Device in headquarters is a 6RD CE device and connects to the 6RD domain, which is an IPv6 network. Device B in
branch B is a 6RD BR device and connects to a regular IPv6 network outside the 6RD domain. To allow hosts in the 6RD domain
and IPv6 network to communicate, you need to configure a 6RD tunnel between Device and Device B.
Configuration Tips
For the 6RD Domain -6RD Domain in Scenario 1, the addresses of devices and PC1 at the headquarters and branch A need to meet
the following requirements:
o The IPv6 prefix of the interface ethernet0/1 on the headquarters device (Device) needs to be consistent with the 6RD delegated
prefix calculated by device. (In this example, the 6RD delegated prefix is 1001: AABB: A05::/48)
o The IP address of PC1 and the interface ethernet0/1 of the headquarters device (Device) need to belong to the same IPv6 network
segment. The IP address of PC2 and the interface ethernet0/1 of the branch A device (Device A) need to belong to the same IPv6
network segment.
o The headquarters device (Device) and branch A device (Device A) need to have the same IPv4 prefix for ethernet0/1, and this pre-
fix length needs to be the same as that of the IPv4 prefix configured on the 6RD tunnel (In this example, the IPv4 prefix length is
ipv4-mask-len 16 ).
Step 1: Configure the IPv4 address and zone of the interface ethernet 0/0 of the headquarters device (Device).
hostname(config-if-eth0/0)# exit
hostname(config-ip6in4-6rd)# exit
Note: After you specify the 6RD prefix and IPv4 prefix length, the 6RD CE automatically calculates the 6RD delegated
prefix. To view the 6RD delegated prefix via command show ip6in4 6rd-tunnel [tunnel-name].
hostname(config-if-tun1)# exit
Name: test
Index: 11
Interface: ethernet0/0
IPv6-prefix: 1001:AABB::/32
IPv4-mask-length: 16
Border-relay-address: 0.0.0.0
Sub-tunnel Limit: 10
Step 5: Configure the IPv6 address and zone of the interface ethernet 0/1 of the headquarters device (Device).
hostname(config)#1interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
Set the address to 1001:AABB:A05::2/48 for PC1 based on the 6RD delegated prefix,. This address is in the same network segment as
that of ethernet0/1 of Device.
Note:The method for configuring IPv6 addresses and default route varies based on the operating system of your PC.
Configure Device A
Step 1: Configure the IPv4 address and zone of the interface ethernet 0/0 of the Device A
hostname(config-if-eth0/0)# exit
hostname(config-ip6in4-6rd)# exit
Note: After you specify the 6RD prefix and IPv4 prefix length, the 6RD CE automatically calculates the 6RD delegated
prefix. To view the 6RD delegated prefix via command show ip6in4 6rd-tunnel [tunnel-name].
hostname(config-if-tun1)# exit
Name: test
Index: 11
Interface: ethernet0/0
IPv6-prefix: 1001:AABB::/32
IPv4-mask-length: 16
Border-relay-address: 0.0.0.0
Sub-tunnel Limit: 10
Step 5: Configure the IPv6 address and zone of the interface ethernet 0/1 of the Device A.
hostname(config)#1interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
Set the address to 1001:AABB:A05::2/48 for PC2 based on the 6RD delegated prefix. This address is in the same network segment as
that of ethernet0/1 of Device A.
Note:The method for configuring IPv6 addresses and default route varies based on the operating system of your PC.
Step 1: Configure the IPv4 address and zone of the interface ethernet 0/0 of the headquarters device (Device).
hostname(config-if-eth0/0)# exit
hostname(config-ip6in4-6rd)# exit
Note: After you specify the 6RD prefix and IPv4 prefix length, the 6RD CE automatically calculates the 6RD delegated
prefix. To view the 6RD delegated prefix via command show ip6in4 6rd-tunnel [tunnel-name].
hostname(config-if-tun1)# exit
Name: test
Index: 11
Interface: ethernet0/0
IPv6-prefix: 1001:AABB::/32
IPv4-mask-length: 16
Border-relay-address: 220.119.10.8
Sub-tunnel Limit: 10
Step 5: Configure the IPv6 address and zone of the interface ethernet 0/1 of the headquarters device (Device)
hostname(config)#1interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
Set the address to 1001:AABB:A05::2/48 for PC1 based on the 6RD delegated prefix. This address is in the same network segment as
that of ethernet0/1 of Device.
Note:The method for configuring IPv6 addresses and default route varies based on the operating system of your PC.
Configure Device B
Step 1: Configure the IPv4 address and zone of the interface ethernet 0/0 of the Device B.
hostname(config-if-eth0/0)# exit
hostname(config-ip6in4-6rd)# exit
Note: After you specify the 6RD prefix and IPv4 prefix length, the 6RD CE automatically calculates the 6RD delegated
prefix. To view the 6RD delegated prefix via command show ip6in4 6rd-tunnel [tunnel-name].
hostname(config-if-tun1)# exit
Name: test
Index: 11
Interface: ethernet0/0
IPv6-prefix: 1001:AABB::/32
IPv4-mask-length: 16
Border-relay-address: 0.0.0.0
Sub-tunnel Limit: 10
Step 5: Configure the IPv6 address and zone of the interface ethernet 0/1 of the Device B.
hostname(config)#1interface ethernet0/1
hostname(config-if-eth0/1)# exit
hostname(config-vrouter)# exit
hostname(config)# policy-global
hostname(config-policy)# rule id 1
Rule id 1 is created
hostname(config-policy-rule)# exit
hostname(config)#
Set the address to 2333:aabb::2/64 for PC3 , this address is in the same network segment as that of ethernet0/1 of Device B.
Note:The method for configuring IPv6 addresses and default route varies based on the operating system of your PC.
Result of Scenario 1
Step 1: Use the Ping command on Device to view the tunnel established between headquarters and branch A and their con-
nectivity.
1 64 0.109
2 64 0.131
3 64 0.115
4 64 0.128
5 64 0.110
statistics:
session: id 3407871, proto 41, flag 20, flag1 0, flag2 0, flag3 0, created 272719, life 64000, policy type 0,
policy default, app 0(Other) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/0)/200951): 220.119.10.9:0->220.119.10.5:0
Result of Scenario 2
Step 1: Use the Ping command on Device to view the tunnel established between headquarters and branch B and their con-
nectivity.
1 64 0.115
2 64 0.120
3 64 0.113
4 64 0.112
5 64 0.126
statistics:
session: id 3407871, proto 41, flag 20, flag1 0, flag2 0, flag3 0, created 272719, life 64000, policy type 0,
policy default, app 0(Other) flag 0x0, auth_user_id 0, reverse_auth_user_id 0
flow0(32(ethernet0/0)/200951): 220.119.10.8:0->220.119.10.5:0
Change Log
Cookbook V1
1. " Using Security Policy to Allow Access to Another Zone" on Page 15 (Security Policy)
4. "Allowing the Internet Access via User Authentication" on Page 99 (User Authentication, WebAuth)
5. "Connection between Two Private Networks Using IPSec VPN (IKEv1)" on Page 147 (IPSec VPN)
6. "Allowing Remote Users to Access a Private Network Using SSL VPN" on Page 199 (SSL VPN, SCVPN)
7. " Ensuring Uninterrupted Connection Using HA" on Page 347 (High Availability, HA)
8. " QoS Control" on Page 369 (Quality of Service, QoS, Traffic Management)
Cookbook V2
1. "Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection" on Page 390 (Abnormal Behavior
Detection, ABD)
2. Finding Malware Attacks via Advanced Threat Detection (Advanced Threat Detection, ATD)
Cookbook V3
1. "Decrypting HTTPS Traffic and Identifying the Encrypted Application" on Page 452 (SSL Proxy, Decryption, Encrytion)
2. "Using an iOS/Android Device to Remotely Access Intranet Services" on Page 223 (iOS, Android, Mobile, iPad, remote device,
SSL VPN)
4. "Deploying Tap Mode to Monitor Network Traffic " on Page 48(Tap Mode)
Cookbook V4
2. "Allowing Remote Users ( PC ) to Access a Private Network Using L2TP over IPSec VPN" on Page 230 (L2TP VPN)
3. "Connection between Two Private Networks Using GRE over IPSec VPN" on Page 277 (GRE, IPSec VPN)
Cookbook V5
1. "Protecting Intranet to Defend Attacks via Intrusion Prevention System" on Page 398( IPS )
1. "Protecting Internal Servers and Host to Defend Attack via Abnormal Behavior Detection" on Page 390( ABD )
Cookbook V6
1. "Allowing Remote Users (iOS/Android) to Access a Private Network Using L2TP over IPSec VPN" on Page 249 (L2TP VPN)
Cookbook V7
5. "URL Filtering for HTTPS Traffic without the CA Certificate" on Page 456
Cookbook V8
1. "Connection between Two Private Networks Using IPSec VPN (IKEv2)" on Page 160 (IPSec VPN)
3. "Configuring the Device to Communicate with Zabbix Using SNMP" on Page 31 (SNMP)
Cookbook V8.1
1. "Connecting to Microsoft Azure Using Site-to-Site VPN" on Page 212 (IPSec VPN)
Cookbook V9
2. "Dynamically Manage Access Authority Via Radius Dynamic Authorization" on Page 38 (Authorization)
3. "Realizing Multicast Forwarding Through PIM-SM Multicast Protocol" on Page 75 (Routing, PIM)
4. "Realizing Multicast Forwarding Through PIM-SSM Multicast Protocol" on Page 84 (Routing, PIM)
8. "Realizing FTP Service in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG" on Page 474(IPv6)
9. "Realizing SIP Communication in IPv6-only or IPv4/IPv6 Hybrid Networks Using ALG" on Page 483 (IPv6)
10. "Realizing Dual-stack Host in IPv4 Network Accessing IPv6 Network Via ISATAP Tunnel" on Page 494 (IPv6)
Cookbook V10
1. "Deploying HA Scenario for Multicast Forwarding Through PIM-SM" on Page 91 (Routing, PIM)
3. "Allowing Remote Users ( PC ) to Access a Private Network Using L2TP and SSL VPN" on Page 264(SSL VPN L2TP VPN)
4. "Threat Intelligence Via Hillstone Cloud Service Platform" on Page 413(Hillstone Cloud Service Platform)
1. "Allowing Remote Users to Access a Private Network Using SSL VPN" on Page 199 (Add the scene of using the Two-Step Veri-
fication function and communicating through TCP.)
Cookbook V11
1. "Binding the Log Processing Process and Database Storage Process to Core MAX" on Page 68 (Core MAX)
2. "Making Two Firewalls Working in Hot Standby Mode by Deploying them in HA Peer to Ensure the Continuity of Service " on
Page 355(HA)
3. "Using Two Devices as Gateways to Forward Business Traffic and Back Up Each Other Based on HSVRP, which Ensures
Uniterrupted Business Traffic" on Page 360(HA)
4. "Establishment of IPSec VPN Based on Certificate Authentication " on Page 173 (IPSec VPN)
5. "Realizing Dynamic Switch between IPSec Links Using IPSec VPN Smart Link" on Page 186 (IPSec VPN)
6. "Allowing Communication Between IPv6 networks by Configuring a 6RD Tunnel" on Page 497 (IPv6)
7. "Windows User Remotely Accessing Internal Server Through ZTNA" on Page 314 (ZTNA)
8. " Android User Remotely Accessing Internal Server Through ZTNA" on Page 335 (ZTNA)
Cookbook V12
2. "Windows User Accessing Internal Server by Using Internal Network Access via ZTNA" on Page 298 (ZTNA)
3. "Outbound Link Load Balance with Customizable SLA Metrics" on Page 381 (SLA, Quality of Service)
4. "Identifying IoT Assets to Enable Security Control of IoT by Using Built-in Docker" on Page 416 (IOT, Threat Prevention)
5. "Identifying IoT Assets to Enable Security Control by Deploying the Asset Identifying System on the VM" on Page 431 (IOT,
Threat Prevention)
1. "Allowing Remote Users to Access a Private Network Using SSL VPN" on Page 199 (SSL VPN)
2. "Windows User Remotely Accessing Internal Server Through ZTNA" on Page 314 (ZTNA)
3. " Android User Remotely Accessing Internal Server Through ZTNA" on Page 335 (ZTNA)
4. "Connection between Two Private Networks Using IPSec VPN (IKEv2)" on Page 160