• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

SecPath F100-M-G3(通过L2TP从外网访问内网)

2022-07-14提问
  • 0关注
  • 1收藏,1154浏览
粉丝:0人 关注:0人

问题描述:

如拓扑图所示,内网设备互联是vlan304,172.10.18.0/24网段
核心交换机使用的三层口,172.100.1.1/29,对接防火墙172.100.1.2/29
目前内网都能正常通信,现在想在防火墙上做L2TP,让出差员工能从外网访问内网
做完之后,连上L2TP,发现只能电脑只能ping通防火墙上的IP:172.100.1.2,而不能ping通核心交换机的:172.100.1.1和172.10.18.254
防火墙的配置如下所示

# version 7.1.064, Release 9524P33 # sysname H3C # context Admin id 1 # irf mac-address persistent timer irf auto-update enable undo irf link-delay irf member 1 priority 1 # ip pool l2tp1 172.10.10.1 # password-recovery enable # vlan 1 # controller Cellular1/0/0 # interface Virtual-Template1 bandwidth 10000000 ppp authentication-mode chap remote address pool l2tp1 ip address 172.10.10.254 255.255.255.0 igmp enable # interface NULL0 # interface GigabitEthernet1/0/0 port link-mode route combo enable copper ip address 192.168.0.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-mode route description GuideLan Interface combo enable fiber ip address 172.100.1.2 255.255.255.248 igmp enable undo dhcp select server # interface GigabitEthernet1/0/2 port link-mode route nat outbound # interface GigabitEthernet1/0/3 port link-mode route description GuideWan Interface bandwidth 100000000 ip address 120.196.93.186 255.255.255.240 igmp enable dns server 211.136.192.6 nat outbound description GuideNat gateway 120.196.93.177 # interface GigabitEthernet1/0/4 port link-mode route # interface GigabitEthernet1/0/5 port link-mode route # interface GigabitEthernet1/0/6 port link-mode route # interface GigabitEthernet1/0/7 port link-mode route # interface GigabitEthernet1/0/8 port link-mode route # interface GigabitEthernet1/0/9 port link-mode route # interface GigabitEthernet1/0/10 port link-mode route # interface GigabitEthernet1/0/11 port link-mode route # security-zone name Local # security-zone name Trust import interface GigabitEthernet1/0/1 import interface Virtual-Template1 # security-zone name DMZ # security-zone name Untrust import interface GigabitEthernet1/0/3 # security-zone name Management import interface GigabitEthernet1/0/0 import interface GigabitEthernet1/0/2 # scheduler logfile size 16 # line class aux user-role network-operator # line class console authentication-mode scheme user-role network-admin # line class usb user-role network-admin # line class vty user-role network-operator # line aux 0 user-role network-admin # line con 0 user-role network-admin # line vty 0 63 authentication-mode scheme user-role network-admin # ip route-static 0.0.0.0 0 GigabitEthernet1/0/3 120.196.93.177 ip route-static 172.10.0.0 16 172.100.1.1 # info-center source FILTER logfile deny # ssh server enable # domain system # domain default enable system # role name level-0 description Predefined level-0 role # role name level-1 description Predefined level-1 role # role name level-2 description Predefined level-2 role # role name level-3 description Predefined level-3 role # role name level-4 description Predefined level-4 role # role name level-5 description Predefined level-5 role # role name level-6 description Predefined level-6 role # role name level-7 description Predefined level-7 role # role name level-8 description Predefined level-8 role # role name level-9 description Predefined level-9 role # role name level-10 description Predefined level-10 role # role name level-11 description Predefined level-11 role # role name level-12 description Predefined level-12 role # role name level-13 description Predefined level-13 role # role name level-14 description Predefined level-14 role # user-group system # local-user admin class manage password hash $h$6$B09jldzECww4j80c$0wUodAmxDN7hleI4/iQk8BZx5qAok9x6SnEGOVLp78IYQ56sL35Ueb2NszVVTK1x9tQE+i1DEHiqE1lnqMD+uA== service-type ssh terminal http https authorization-attribute user-role level-3 authorization-attribute user-role network-admin authorization-attribute user-role network-operator # local-user admin class network password cipher $c$3$HBAeP9rB20zNzQS5NINAZ6AtyAXkQCHH service-type ppp authorization-attribute user-role network-operator # session synchronization enable session synchronization http # ipsec logging negotiation enable # l2tp-group 1 mode lns allow l2tp virtual-template 1 undo tunnel authentication # l2tp enable # ike logging negotiation enable # ip https enable # inspect logging parameter-profile av_logging_default_parameter # inspect logging parameter-profile ips_logging_default_parameter # inspect logging parameter-profile url_logging_default_parameter # loadbalance isp file flash:/lbispinfo_v1.5.tp # traffic-policy rule 1 name GuideAVCPolicy action qos profile guideavcprofile1 source-zone Trust destination-zone DMZ destination-zone Untrust profile name guideavcprofile1 bandwidth downstream guaranteed 100000000 bandwidth downstream maximum 100000000 # security-policy ip rule 1 name GuideSecPolicy action pass source-zone Trust destination-zone Untrust destination-zone DMZ rule 0 name p action pass source-zone Trust source-zone Local destination-zone Local destination-zone Untrust rule 4 name Trust-Untrust action pass source-zone Trust destination-zone Untrust rule 5 name L2TP action pass source-zone Untrust destination-zone Local rule 6 name 1 action pass source-zone Untrust destination-zone Trust # ips logging parameter-profile ips_logging_default_parameter # anti-virus logging parameter-profile av_logging_default_parameter # return 


组网及组网描述:




最佳答案

粉丝:186人 关注:0人

您好,设置好L2TP,然后做ACL访问控制就可以了

参考L2TP配置

防火墙L2TP VPN的配置方法


1 配置需求及说明

1.1  适用的产品系列

本案例适用于软件平台为Comware V7系列防火墙:F100-X-G2F1000-X-G2F100-X-WiNetF1000-AKF10X0等。

注:本案例是在F100-C-G2Version 7.1.064, Release 9510P08版本上进行配置和验证的。

1.2  配置需求及实现的效果

防火墙采用固定IP地址的方式部署在公司互联网出口,运营商提供的IP地址为198.76.28.30/30,网关为198.76.28.29DNS地址为221.228.255.1。初步规划防火墙使用3接口接入运营商,使用4接口连接内部网络,内部网络使用192.168.10.0网段。

需求:

1)要求内网终端可以自动获取到地址并可以访问互联网。

2)公司外部办公人员需要通过拨号VPN连入公司内网。

2 组网图


3 配置步骤

3.1  配置外网接口

#1/0/3设置为外网接口并设置IP地址。

<H3C>system-view

[H3C]interface GigabitEthernet 1/0/3

[H3C-GigabitEthernet1/0/3]ip address 198.76.28.30 255.255.255.252

[H3C-GigabitEthernet1/0/3]quit

3.2  配置内网接口

#配置内网接口为1/0/4接口并指定IP地址为192.168.10.1

[H3C]interface GigabitEthernet 1/0/4

[H3C-GigabitEthernet1/0/4] ip address 192.168.10.1 255.255.255.0

[H3C-GigabitEthernet1/0/4] quit

3.3  配置NAT地址转换

#进入1/0/3接口配置NAT动态地址转换。

[H3C]interface GigabitEthernet 1/0/3

[H3C-GigabitEthernet1/0/3]nat outbound

[H3C-GigabitEthernet1/0/3]quit

3.4  配置到外网网关的静态路由

#配置默认路由到外网网关。

[H3C]ip route-static 0.0.0.0 0 198.76.28.29

3.5  建立VPN拨号账户

#创建本地PPP用户vpdnuser,设置密码为HelLo

[H3C]Local-user vpdnuser class network

[H3C-luser-network-vpdnuser]password simple HelLo

[H3C-luser-network-vpdnuser]service-type ppp

[H3C-luser-network-vpdnuser]quit

3.6  开启L2TP功能

[H3C]l2tp enable

3.7  配置L2TP用户地址池

#创建用于给L2TP拨号用户分配地址的地址池。

[H3C] ip pool aaa 192.168.100.2 192.168.100.254

[H3C] ip pool aaa gateway 192.168.100.1

3.8  创建L2TP接口

#创建接口Virtual-Template1PPP认证方式为CHAP,并使用地址池aaaClient端分配IP地址。

[H3C]interface virtual-template 1

[H3C -Virtual-Template1]ppp authentication-mode chap domain system

[H3C -Virtual-Template1]ip address 192.168.100.1 24

[H3C-Virtual-Template1]remote address pool aaa

[H3C-Virtual-Template1]quit

3.9  创建L2TP1

# 创建LNS模式的L2TP1,配置隧道本端名称为LNS,指定接收呼叫的虚拟模板接口为VT1

[H3C]l2tp-group 1 mode lns

[H3C-l2tp1]tunnel name LNS

[H3C-l2tp1]allow l2tp virtual-template 1

[H3C-l2tp1]undo tunnel authentication

[H3C-l2tp1]quit

3.10  配置外网接口、VT接口加入Untrust安全区域

#1/0/3外网接口加入Untrust区域。

[H3C]security-zone name Untrust

[H3C-security-zone-Untrust]import interface GigabitEthernet 1/0/3

[H3C-security-zone-Untrust]import interface Virtual-Template 1

[H3C-security-zone-Untrust]quit

3.11  配置内网接口加入Trust安全区域

#1/0/4内网接口加入Trust区域。

[H3C]security-zone name Trust

[H3C-security-zone-Trust]import interface GigabitEthernet 1/0/4

[H3C-security-zone-Trust]quit

3.12  配置安全策略将TrustUntrust域内网数据放通

#创建对象策略pass

[H3C]object-policy ip pass

[H3C-object-policy-ip-pass] rule 0 pass

[H3C-object-policy-ip-pass]quit

#创建TrustLocal域的域间策略调用pass策略。

[H3C]zone-pair security source Trust destination Untrust

[H3C-zone-pair-security-Trust- Untrust]object-policy apply ip pass

[H3C-zone-pair-security-Trust- Untrust]quit

3.13  配置安全策略将TrustLocal域、LocalTrust域数据全放通策略

#创建trustLocal域的域间策略调用pass策略。

[H3C]zone-pair security source Trust destination Local

[H3C-zone-pair-security-Trust-Local]object-policy apply ip pass

[H3C-zone-pair-security-Trust-Local]quit

#创建Localtrust域的域间策略调用pass策略。

[H3C]zone-pair security source Local destination Trust

[H3C-zone-pair-security-Local-Trust]object-policy apply ip pass

[H3C-zone-pair-security-Local-Trust]quit

3.14  配置安全策略将UntrustLocal域目的端口为UDP1701端口放通。

#创建服务对象1701用于匹配L2TPUDP 1701端口。

[H3C]object-group service 1701

[H3C-obj-grp-service-1701]service udp destination eq 1701

[H3C-obj-grp-service-1701]quit

在对象策略中调用1701服务对象。

[H3C]object-policy ip 1701

[H3C-object-policy-ip-1701]rule pass service 1701

[H3C-object-policy-ip-1701]quit

#创建UntrustLocal域的域间策略调用1701服务对象策略。

[H3C]zone-pair security source Untrust destination Local

[H3C-zone-pair-security-Untrust-Local]object-policy apply ip 1701

[H3C-zone-pair-security-Untrust-Local]quit

#创建LocalUntrust域的域间策略调用1701服务对象策略。

[H3C]zone-pair security source Local destination Untrust

[H3C-zone-pair-security-Local-Untrust]object-policy apply ip 1701

[H3C-zone-pair-security-Local-Untrust]quit

3.15  配置安全策略将Untrusttrust访问内网资源的数据放通

#创建地址对象匹配到内网数据

[H3C]object-group ip address neiwang

[H3C-obj-grp-service-neiwang]network subnet 192.168.10.0 255.255.255.0

[H3C-obj-grp-service-neiwang]quit

在对象策略中调用到内网数据对象。

[H3C]object-policy ip neiwang

[H3C-object-policy-ip-neiwang]rule pass destination-ip neiwang

[H3C-object-policy-ip-neiwang]quit

#创建UntrustTrust域的域间策略调用neiwang地址对象策略。

[H3C]zone-pair security source Untrust destination Trust

[H3C-zone-pair-security-Untrust-Trust]object-policy apply ip neiwang

[H3C-zone-pair-security-Untrust-Trust]quit

3.16  配置DHCP服务

#开启DHCP服务并指定动态下发的地址以及网关等参数。

[H3C]dhcp enable

[H3C]dhcp server ip-pool  1

[H3C-dhcp-pool-1]network 192.168.10.0

[H3C-dhcp-pool-1]gateway-list 192.168.10.1

[H3C-dhcp-pool-1]dns-list 221.228.255.1

[H3C-dhcp-pool-1]quit

注:DNS服务器地址优先设置当地运营商提供的DNS服务器地址,如果没有提供可以设置114.114.114.1148.8.8.8DNS服务器地址。

3.17  保存配置

[H3C]save force

暂无评论

0 个回答

该问题暂时没有网友解答

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明