IPsec VPN与SSL VPN实验思路(eNSP)

1. 拓扑结构更新与设备接口分配

根据提供的拓扑图,调整设备连接分配如图:


2. 防火墙基础配置调整

总部防火墙FW1
python 复制代码
# 接口配置
interface GigabitEthernet1/0/1   # 连接LSW1(内网)
 ip address 192.168.10.254 255.255.255.0
 service-manage all permit

interface GigabitEthernet1/0/2   # 连接AR1(公网)
 ip address 49.0.0.1 255.255.255.0
 nat outbound 2001

# 安全区域
firewall zone trust
 add interface GigabitEthernet1/0/1
firewall zone untrust
 add interface GigabitEthernet1/0/2

# 默认路由
ip route-static 0.0.0.0 0.0.0.0 49.0.0.2
分部/出差防火墙FW2
python 复制代码
# 分部接口
interface GigabitEthernet1/0/1   # 连接LSW2(分部内网)
 ip address 172.16.10.254 255.255.255.0

# 出差接口
interface GigabitEthernet1/0/3   # 连接LSW3(出差内网)
 ip address 10.0.0.254 255.255.255.0

interface GigabitEthernet1/0/2   # 连接AR1(公网)
 ip address 50.0.0.1 255.255.255.0
 nat outbound 2001

# 默认路由
ip route-static 0.0.0.0 0.0.0.0 50.0.0.2

3. IPsec VPN配置

FW1(总部)
python 复制代码
# IKE提议与对等体
ike proposal 10
 encryption-algorithm aes-256
 dh group14
 authentication-algorithm sha2-256

ike peer branch
 pre-shared-key Huawei@123
 ike-proposal 10
 remote-address 50.0.0.1   # FW2公网IP

# IPsec策略与ACL
ipsec proposal ipsec_pro
 esp authentication-algorithm sha2-256
 esp encryption-algorithm aes-256

ipsec policy-map ipsec_pol 10
 ike-peer branch
 proposal ipsec_pro
 security acl 3000

acl number 3000
 rule 5 permit ip source 192.168.10.0 0.0.0.255 destination 172.16.10.0 0.0.0.255
FW2(分部)
python 复制代码
ike peer hq
 pre-shared-key Huawei@123
 ike-proposal 10
 remote-address 49.0.0.1   # FW1公网IP

ipsec policy-map ipsec_pol 10
 ike-peer hq
 proposal ipsec_pro
 security acl 3000

acl number 3000
 rule 5 permit ip source 172.16.10.0 0.0.0.255 destination 192.168.10.0 0.0.0.255

4. SSL VPN配置

总部FW1
python 复制代码
# 虚拟网关绑定公网接口
ssl vpn-gateway vg1
 ip address 49.0.0.1 port 443
 service enable

# 资源组包含总部内网资源
resource-group rg1
 web-url "http://192.168.10.100"  # 总部服务器
 tcp-resource 1
  address 192.168.10.200
  port 3389
  local-port 53389  # 映射远程桌面

# 用户认证配置
aaa
 local-user user-remote password cipher Huawei@123
 service-type sslvpn
 access-limit 5

5. 路由器AR1公网路由配置

python 复制代码
# 接口配置
interface GigabitEthernet0/0/0   # 连接FW1
 ip address 49.0.0.2 255.255.255.0

interface GigabitEthernet0/0/1   # 连接FW2
 ip address 50.0.0.2 255.255.255.0

# 静态路由
ip route-static 192.168.10.0 255.255.255.0 49.0.0.1
ip route-static 172.16.10.0 255.255.255.0 50.0.0.1
ip route-static 192.168.20.0 255.255.255.0 10.0.0.254

6. 交换机LSW1/LSW2/LSW3配置(示例为LSW1)

python 复制代码
# 默认VLAN 1,所有端口为access模式
vlan 1

interface Ethernet0/0/1   # 连接PC1
 port link-type access
 port default vlan 1

interface Ethernet0/0/3   # 连接FW1
 port link-type access
 port default vlan 1

7. 关键验证步骤

IPsec VPN验证
  1. 在FW1和FW2上检查SA状态:

    bash 复制代码
    display ike sa
    display ipsec sa
  2. 从分部PC2 ping 总部服务器:

    bash 复制代码
    PC2> ping 192.168.10.100
SSL VPN验证
  1. 出差用户PC3通过浏览器访问:

    bash 复制代码
    https://49.0.0.1

    使用用户名 user-remote 和密码 Huawei@123 登录。

  2. 访问Web资源或通过远程桌面连接:

    bash 复制代码
    PC3> telnet 127.0.0.1 53389  # 测试映射的RDP端口

总结

本实验演示了VPN网络的搭建过程,涵盖IPsec与SSL VPN的配置、安全策略设计及故障排查方法。通过此实验,可深入理解以下知识点:

  • VPN技术在网络安全中的核心作用。

  • 防火墙多区域安全策略的精细化控制。

  • NAT与VPN共存的解决方案。

相关推荐
p66666666682 小时前
vmware虚拟机的三种网络配置详细介绍,包能解决虚拟机网络问题
网络
赖small强2 小时前
【Linux 网络基础】Linux 平台 DHCP 运作原理与握手过程详解
linux·网络·dhcp
Mu.3872 小时前
计算机网络模型
网络·网络协议·计算机网络·安全·http·https
xixixi777774 小时前
解析一下传输安全——“它是什么”,更是关于“它为何存在”、“如何实现”以及“面临何种挑战与未来”
网络·安全·通信
jerryinwuhan6 小时前
socket由浅入深
网络
xu_yule8 小时前
网络和Linux网络-3(套接字编程)TCP网络通信代码
linux·网络·tcp/ip
喜欢吃豆9 小时前
使用 OpenAI Responses API 构建生产级应用的终极指南—— 状态、流式、异步与文件处理
网络·人工智能·自然语言处理·大模型
xixixi777779 小时前
解析一下存储安全——“它是什么”,更是关于“它为何存在”、“如何实现”以及“面临何种挑战与未来”
网络·安全·通信
运维有小邓@9 小时前
实时日志关联分析工具:智能检测潜在安全威胁
运维·网络·安全
j***576810 小时前
电脑可以连接wifi,但是连接后仍然显示没有网络
网络·电脑·php