实现需求:用户通过内外网用户通过公网IP访问内部服务器。
一、局域网配置:交换机(SW7)、防火墙(FW3)、服务器(Server1)、客户端(Client1)
二、配置思路
1、配置防火墙接口和IP地址
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.1.1.1 255.255.255.0
interface GigabitEthernet0/0/0
undo shutdown
ip address 2.2.2.1 255.255.255.0
2、配置--接口加入安全区域
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/0
3、配置安全策略
security-policy
rule name trust2untrust
source-zone trust
destination-zone untrust
action permit
rule name untrust2trust
source-zone untrust
destination-zone trust
action permit
4、配置源NAT策略和内网用户通过外网IP访问内部服务器
nat-policy
rule name nat //配置通过Easy-IP方式访问Internet
source-zone trust
destination-zone untrust
source-address 3.3.3.0 24
source-address 4.4.4.0 24
action nat easy-ip
rule name trust2trustnat //配置内网用户通过外网IP访问内部服务器
source-zone trust
destination-zone trust
action nat easy-ip
5、配置服务器映射
nat server httpserver 0 protocol tcp global 10.1.1.1 www inside 4.4.4.254 www