03 Access Control Practices
03 Access Control Practices
Reshape.Security
Embrace Cyber Resilience
v Security Policy
v Route Technology
v NAT Technology
v Security Zone
v Interface Configuration
Security Zone,or named as Zone,A security zone is a collection of one or more interface or network
segments, it is the main feature of firewall different from router.
• Firewall uses Security Zone to divide network,The security check is triggered only when the
message flows between the security zones.
• You can apply proper policy rules to zones to make the devices control the traffic transmission
among zones. It is independent from physical interfaces, which makes security rules more flexible.
You can also customize security zones. Actually predefined security zones and user-defined
security zones make no difference in functions, and you can use them as needed.
vswitchif L2 Zone
V-Switch V-Switch
V-Router
• Static IP
• DHCP
• PPPoE
• The policy can identify which flow between security zones or segments will be
permitted and which will be denied based on the policy rules.
• Action:
– Permit
– Deny
– Security Connection
– WebAuth
– Tunnel, From tunnel
15 | See. Understand. Act. © 2022 Hillstone Networks | All rights reserved.
Configure Policy Rule (CLI)
• To enter the policy configuration mode, in global configuration mode, use the following command:
• policy-global:
• After entering the policy configuration mode, to create a policy rule, use the following command:
• rule [id id] [top | before id | after id] [role {UNKNOWN | role-name} | user aaa-server-name user-
name | user-group aaa-server-name user-group-name] from src-addr to dst-addr service service-
name {permit | deny | tunnel tunnel-name | fromtunnel tunnel-name | webauth | portal-server}
•id id - Specifies the ID of the policy rule. If not specified, the system will automatically assign an ID to the
policy rule.
• top | before id | after id - Specifies the location of the policy rule.
• By default, the newly-created policy rule is located at the end of all the rules.
• from src-addr - Specifies the source address of the policy rule.
• to dst-addr - Specifies the destination address of the policy rule.
• service service-name - Specifies the service name of the policy rule.
• permit | deny | tunnel tunnel-name| fromtunnel tunnel-name | webauth aaa-server | portal-server
.3
• To move a policy rule, in the policy rule configuration mode, use the following
command:
Ø move id {top | bottom | before id | after id}
• Object includes:
Ø Address Book
Ø Host Book
Ø Service Book
Ø APP Book
Ø Schedule
Ø *Track Object
2xx.0.0.0/24 office
.200
Internet01 E0/4
E0/2 .10
Internet .2
.1
100.1.1.0/28 E0/3
.1 Office_User
Internet02 E0/1 192.168.40.0/24
10.50.50.0/24
.2
IDC .1
10.60.60.0/24
IDC_Server
34 | See. Understand. Act. 10.60.60.10 © 2022 Hillstone Networks | All rights reserved.
Task 3: Traffic Access Between Zones
• Intercommunication between the office area and the data center area needs to be established based on
security, data isolation, and access control to ensure the confidentiality, integrity, and availability of data.
At the same time, it is necessary to consider compliance with national and industry security requirements
to ensure the effective protection of the information system security.
Ø By dividing the network into security zones, subsequent management and maintenance can be facilitated.
Ø Security zone for the office area: Office
Ø Security zone for the data center: IDC
Ø ICMP traffic from the Office zone to the IDC zone is prohibited.
Ø The Office zone is allowed to access FTP and HTTP services from IDC_Server in the IDC zone, and the access traffic should
be logged.
• The policy matching priority is as follows: Mini-policy > Security policy > Default action.
• It is not possible to adjust the priority of mini-policies and security policies.
• Mini-policies do not have a sequential relationship, and it is not possible to move mini-policies.
• Before deploying new mini-policies, a relevance check will be performed to ensure that the mini-policies are
completely unrelated to each other.
192.168.10.0/24 192.168.20.0/24
• Advantages:
• No need to modify the existing network architecture.
• Faster and more stable deployment.
49 | See. Understand. Act. 192.168.10.10/24 © 2022 Hillstone Networks | All rights reserved.
Tap Mode
Internet
• For certain device functionalities such as
IPS, AV, statistical sets, and network
behavior control, they can operate in either
inline mode or tap mode. When the device
operates in tap mode, it only performs
statistics, scanning, or logging on the traffic LAN interface:192.168.10.254/24
without forwarding it.
• Characteristics of Bypass Mode:
• Interfaces are bound to tap security zones. mirror
• Only performs statistics, scanning, or logging on
the traffic.
zone TAP
• Advantages:
• No network changes required.
• Network traffic will not be affected by device
failures.
50 | See. Understand. Act. 192.168.10.10/24 © 2022 Hillstone Networks | All rights reserved.
Mix Mode
Internet
• Mix Mode: E0/4
• If a user's network requires both firewall untrust
configuration for Layer 2 interfaces
(transparent mode) and Layer 3 interfaces
(routing mode), the firewall operates in mix
mode. E0/1 vSwitchif1 E0/2
l2-trust trust l2-dmz
192.168.10.254/24
192.168.10.0/24 192.168.10.0/24
Gw:192.168.10.254 Gw:192.168.10.254
• To add a destination route, in the VRouter configuration mode, use the following command:
• ip route {A.B.C.D/M | A.B.C.D A.B.C.D} {A.B.C.D | interface-name } [distance-value] [weight
weight-value]
– A.B.C.D/M | A.B.C.D A.B.C.D - Specifies the destination address.
– A.B.C.D | interface-name - Specifies the type of next hop.
• a gateway address (A.B.C.D) or interface (interface-name)
• If the next hop type is interface, you can only select a tunnel interface, Null interface or
PPPoE interface.
– distance-value - Specifies the administrative distance of the route.
• The smaller the value is, the higher the priority is.
– weight-value - Specifies the weight value.
• The weight ratio of traffic forwarding in load balance
55 | See. Understand. Act. © 2022 Hillstone Networks | All rights reserved.
Routing Example: Distance
100.1.1.1/24
ip route 100.1.1.0/24 122.1.1.1 10
ISP ip route 100.1.1.0/24 133.1.1.2 1
GW:122.1.1.1 GW:133.1.1.2
ISP 1 ISP 2
Ethernet0/3 Ethernet0/4
untrust untrust
Ethernet0/1 Ethernet0/2
trust trust
LAN1 LAN2
192.168.1.0/24 192.168.2.0/24
56 | See. Understand. Act. © 2022 Hillstone Networks | All rights reserved.
Destination Route(Static Route)
• Network > Routing select destination route,and click 『New』button
• Default route is a special destination route, destination is 0.0.0.0,netmask is 0
• Many users apply for multiple links to achieve load balancing of traffic. However, conventional
load balancing does not consider the flow destination, which can result in slow network speeds
if a server accessed through one ISP is connected via another ISP. To address this issue,
Hillstone devices offer ISP routing function, which allowing different ISP traffic to be routed
through dedicated routes, thereby improving network speed.
• To configure ISP routing, users first need to add subnet entries to an ISP and then configure
ISP routes with the ISP name as the destination. Users can customize ISP information or
upload a configuration file which containing different ISP information.
• Policy-based Route (PBR) is designed to select a router and forward data based on
the source IP address, destination IP address and service type of a packet.
• Only one PBR can be bound to an interface / security zone / virtual router.
• Source-based Routing:
• It select a route and forward data based on the source IP address of the data packet.
• Routing sequence:
Ø Policy based Route à Source interface based route à Source based route à
Destination interface based route à Destination Route/ISP route/dynamic route
• RFC1918 defines three types of private IP addresses as follows. These IP addresses will
not be allocated on the Internet. You can use the IP addresses in an enterprise network
freely.
Ø Class A: 10.0.0.0 - 10.255.255.255(10.0.0.0/8)
Ø Class B: 172.16.0.0 - 172.31.255.255(172.16.0.0/12)
Ø Class C: 192.168.0.0 - 192.168.255.25(192.168.0.0/16)
• NAT (Network Address Translation) is a protocol to translate the IP address within an IP packet
header to another IP address.
• When the IP packets pass through a firewall, firewall will translate the source IP address and/or
the destination IP address in the IP packets.
• In practice, NAT is mostly used to allow the private network to access the public network, or
vice versa.
• Static NAT:
• It refers to the process of translating a private IP address from an internal network into a public IP address. It
follows a one-to-one mapping, where each IP address is translated to a specific public IP address.
• Dynamic-IP NAT:
• Dynamic Source NAT involves a multiple-to-multiple translation. In this mode, the source addresses are
translated to specified IP addresses. Each source address is mapped to a unique IP address for translation until
all the specified addresses are occupied.
• Dynamic-Port NAT:
• Multiple source addresses are translated into one of the addresses specified in the IP address entry.
• Sticky: When enabled, all sessions generated by each source IP will be mapped to the same fixed IP address.
71 | See. Understand. Act. © 2022 Hillstone Networks | All rights reserved.
Configure SNAT (CLI)
• To configure SNAT ,in the Vrouter/NAT configuration mode, use the following
command:
• snatrule [id id] [before id | after id | top] from src-address to dst-address [eif egress-
interface] trans-to {addressbook trans-to-address | eif-ip} mode {static | dynamicip |
dynamicport [sticky]} [log] [disable] [ track track-name] [description description]
• Example 1:
SG-6000(config)# ip vrouter trust-vr
SG-6000(config-vrouter)# snatrule from any to any ser any eif ethernet0/3 trans-to eif-
ip mode dynamicport
• Example 2:
SG-6000(config)# nat
SG-6000(config-nat)# snatrule from any to any ser any eif ethernet0/3 trans-to eif-
ip mode dynamicport
IP:192.168.40.1 IP:100.1.1.2
Server
Game APP
Requirements: In this task, the requirement is to implement internet access for the Office area.
The following requirements should be met:
• The firewall should be connected to the internet by using dual links, where E0/4 is the primary
link and E0/3 serves as a backup link.
• To ensure smooth operations in the Office area, implement the requirement for Office users to
access the internet, while also restricting the content they can access. The access control
measures should be flexible, which can met different business needs.
Ø Office users can only access to the internet
Ø Only when accessing to the 150.1.1.0/24 and 180.1.1.0/24 networks, it should be forwarded through the E0/3
interface. All other traffic should be forwarded through E0/4.
Ø Server is prohibited to access to the internet.
Ø During office hours, Office users should be prohibited from accessing gaming websites.
Ø Internet access information from the Office area should be logged on the firewall.
Thinking: can we implement that the 192.168.10.10 publish HTTP service to the external users?
If we can, how to implement it?
Thinking: can we implement that the 192.168.10.10 publish HTTP service to the external users through
TCP 8888 port?
If we can, how to implement it?
81 | See. Understand. Act. © 2022 Hillstone Networks | All rights reserved.
DNAT – Advanced Settings
• Add source address information to exact the DNAT rule
Example 2:
SG-6000(config)# nat
SG-6000(config-nat)# dnatrule from any to 200.1.1.1/32 service http trans-
to 192.168.10.10 port 80
ISP
IDC Office area E0/4 Internet
Internet02 office area
• DNAT configuration
SG-6000(config)# ip vrouter trust-vr
SG-6000(configvrouter)# dnatrule from ____ to ____ service ____ trans-
to ip ____ port ____ log
• Security Policy
SG-6000(config)# rule from ____ to ____ from-zone ____ to-
zone ____ service ____ permit
2xx.0.0.0/24 office
.200
Internet01 E0/4
E0/2 .10
Internet .2
.1
100.1.1.0/28 E0/3
.1 Office_User
Guest-User Internet02 E0/1 192.168.40.0/24
10.50.50.0/24
.2
IDC .1
10.60.60.0/24
IDC_Server
87 | See. Understand. Act. 10.60.60.10 © 2022 Hillstone Networks | All rights reserved.
Task 5: Publish Internal Business
Requirements:
In this task, there is a need to publish the FTP and HTTP services from webServer1 in the IDC
zone to the external network. The requirements are as follows:
• To facilitate business development and convenient resource transfer, the administrator has
decided to publish the HTTP service from the internal network server to the internet for user
access. Additionally, the FTP service should be accessible to internal network users and VPN
users to facilitate file uploads and downloads. You are required to configure the firewall to
ensure the smooth operation of these services.
Ø Internal network publish HTTP service to the external network.
Ø Use the non-standard port 8888 for the HTTP service.
Ø Limit FTP access to internal network users only.
Ø Enable NAT logging.
• To move a NAT rule, in the NAT configuration mode, use the following commands:
Ø snatrule move id {before id | after id| top | bottom}
Ø dnatrule move id {before id | after id| top | bottom}
• To delete a NAT rule, in the NAT configuration mode, use the following commands:
Ø no snatrule id id
Ø no dnatrule id id
• When there is a large accumulation of NAT rules on a device, it becomes challenging for users
to determine whether any rules need to be removed, increasing the difficulty of maintenance.
To ensure the effectiveness of NAT rules and help users resolve issues where some NAT rules
are not being matched due to rule overlapping, the system can perform redundancy check on
NAT rules. This detection checks the coverage of NAT rules and assists users in identifying
and resolving problems caused by rule conflicts or overlaps.