如拓扑图所示,内网设备互联是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
(0)
最佳答案
您好,设置好L2TP,然后做ACL访问控制就可以了
参考L2TP配置
本案例适用于软件平台为Comware V7系列防火墙:F100-X-G2、F1000-X-G2、F100-X-WiNet、F1000-AK、F10X0等。
注:本案例是在F100-C-G2的Version 7.1.064, Release 9510P08版本上进行配置和验证的。
防火墙采用固定IP地址的方式部署在公司互联网出口,运营商提供的IP地址为198.76.28.30/30,网关为198.76.28.29,DNS地址为221.228.255.1。初步规划防火墙使用3接口接入运营商,使用4接口连接内部网络,内部网络使用192.168.10.0网段。
需求:
1)要求内网终端可以自动获取到地址并可以访问互联网。
2)公司外部办公人员需要通过拨号VPN连入公司内网。
#将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
#配置内网接口为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
#进入1/0/3接口配置NAT动态地址转换。
[H3C]interface GigabitEthernet 1/0/3
[H3C-GigabitEthernet1/0/3]nat outbound
[H3C-GigabitEthernet1/0/3]quit
#配置默认路由到外网网关。
[H3C]ip route-static 0.0.0.0 0 198.76.28.29
#创建本地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
[H3C]l2tp enable
#创建用于给L2TP拨号用户分配地址的地址池。
[H3C] ip pool aaa 192.168.100.2 192.168.100.254
[H3C] ip pool aaa gateway 192.168.100.1
#创建接口Virtual-Template1,PPP认证方式为CHAP,并使用地址池aaa为Client端分配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
# 创建LNS模式的L2TP组1,配置隧道本端名称为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
#将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
#将1/0/4内网接口加入Trust区域。
[H3C]security-zone name Trust
[H3C-security-zone-Trust]import interface GigabitEthernet 1/0/4
[H3C-security-zone-Trust]quit
#创建对象策略pass。
[H3C]object-policy ip pass
[H3C-object-policy-ip-pass] rule 0 pass
[H3C-object-policy-ip-pass]quit
#创建Trust到Local域的域间策略调用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
#创建trust到Local域的域间策略调用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
#创建Local到trust域的域间策略调用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
#创建服务对象1701用于匹配L2TP的UDP 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
#创建Untrust到Local域的域间策略调用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
#创建Local到Untrust域的域间策略调用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
#创建地址对象匹配到内网数据
[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
#创建Untrust到Trust域的域间策略调用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
#开启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.114或8.8.8.8等DNS服务器地址。
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论