配置好后无法上外网,可以ping通网关,及wan口ip
# version 7.1.064, Release 9590P18 # sysname H3C # clock timezone Bangkok add 07:00:00 clock protocol none # wlan global-configuration # irf mac-address persistent timer irf auto-update enable undo irf link-delay irf member 1 priority 1 # dhcp server always-broadcast # dns proxy enable dns server 8.8.8.8 dns server 114.114.114.114 ip host quicknet.h3c.com 10.27.254.254 dns fast-reply enable # lldp global enable # password-recovery enable # vlan 1 # dhcp server ip-pool lan1 gateway-list 192.168.0.1 network 192.168.0.0 mask 255.255.255.0 address range 192.168.0.2 192.168.0.254 dns-list 192.168.0.1 # dhcp server ip-pool lan2 gateway-list 10.27.254.254 network 10.27.254.0 mask 255.255.255.0 dns-list 61.19.245.245 202.129.27.135 forbidden-ip-range 10.27.254.1 10.27.254.100 # interface NULL0 # interface Vlan-interface1 description LAN-interface ip address 10.27.254.254 255.255.255.0 tcp mss 1280 undo dhcp select server # interface GigabitEthernet1/0/1 port link-mode route description GuideWan Interface ip address 122.155.78.162 255.255.255.252 dns server 61.19.245.245 dns server 202.129.27.135 ipsec apply policy tozb gateway 122.155.78.161 # interface GigabitEthernet1/0/0 port link-mode bridge # interface GigabitEthernet1/0/2 port link-mode bridge # interface GigabitEthernet1/0/3 port link-mode bridge # interface GigabitEthernet1/0/4 port link-mode bridge # interface GigabitEthernet1/0/5 port link-mode bridge # interface GigabitEthernet1/0/6 port link-mode bridge port link-type trunk port trunk permit vlan all # security-zone name Local # security-zone name Trust import interface GigabitEthernet1/0/2 vlan 1 import interface GigabitEthernet1/0/6 vlan 1 # security-zone name DMZ # security-zone name Untrust import interface GigabitEthernet1/0/1 # security-zone name Management # security-zone name LAN import interface Vlan-interface1 import interface GigabitEthernet1/0/0 vlan 1 import interface GigabitEthernet1/0/3 vlan 1 import interface GigabitEthernet1/0/4 vlan 1 import interface GigabitEthernet1/0/5 vlan 1 # scheduler logfile size 16 # line class aux user-role network-operator # line class console authentication-mode scheme user-role network-admin # line class vty user-role network-operator # line aux 0 authentication-mode none 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 10.27.254.1 # undo info-center logfile enable # ssh server enable # acl advanced name IPsec_tozb_IPv4_1 rule 0 permit ip source 10.27.0.0 0.0.0.255 destination 172.0.3.0 0.0.0.255 rule 1 permit ip source 10.27.0.0 0.0.0.255 destination 10.0.0.0 0.0.0.255 # 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$+wLHP+aeP/vvLaj2$KRlI49Y8l7iiDLfX//cYbdm3/bYacWX/+WxrgCEue7mD/BG6nbsod3lXq/ExCtBDmucekpNMTnwguvadjZbxhQ== service-type ssh telnet terminal http https authorization-attribute user-role level-3 authorization-attribute user-role network-admin authorization-attribute user-role network-operator password-control length 4 password-control composition type-number 1 type-length 1 undo password-control complexity user-name check # ssl renegotiation disable ssl version ssl3.0 disable ssl version tls1.0 disable undo ssl version tls1.1 disable # ipsec transform-set tozb_IPv4_1 esp encryption-algorithm aes-cbc-128 esp authentication-algorithm sha256 # ipsec policy tozb 1 isakmp transform-set tozb_IPv4_1 security acl name IPsec_tozb_IPv4_1 local-address 122.155.78.162 remote-address 119.145.41.172 ike-profile tozb_IPv4_1 # nat global-policy rule name PolicyRule_1 description GuideNat source-zone Trust destination-zone Untrust action snat easy-ip # ike profile tozb_IPv4_1 keychain tozb_IPv4_1 exchange-mode aggressive local-identity address 122.155.78.162 match remote identity address 119.145.41.172 255.255.255.0 match local address GigabitEthernet1/0/1 proposal 1 # ike proposal 1 encryption-algorithm 3des-cbc authentication-algorithm md5 # ike keychain tozb_IPv4_1 match local address GigabitEthernet1/0/1 pre-shared-key address 119.145.41.172 255.255.255.0 key cipher $c$3$x/RqlIhxPsG+oA1ThJEmgcj8u+9o7ZCDU3N6 # netconf soap http enable # ip http enable ip https enable # loadbalance isp file flash:/lbispinfo_v1.5.tp # smartmc tc enable # wlan ap-group default-group vlan 1 # security-policy ip rule 4 name GuideSecPolicy action pass source-zone Trust source-zone Local destination-zone Untrust destination-zone DMZ destination-zone Trust destination-zone Local rule 0 name AUTONET_LOCAL2ANY_DONTMODIFY action pass source-zone local rule 1 name AUTONET_LAN2LOCAL_DONTMODIFY action pass source-zone LAN destination-zone local rule 2 name AUTONET_LAN2LAN_DONTMODIFY action pass source-zone LAN destination-zone LAN # cloud-management server domain cloudnet.h3c.com # return
(0)
1、默认路由需要指向公网网关,不是内网地址
2、vlan1不在trust安全,在LAN安全域,所以需要配置LAN-untrust的nat策略
3、检查下是否放通LAN-untrust的安全策略
(0)
暂无评论
根据你提供的配置内容,防火墙配置完成后无法上网的问题可能与以下几个方面有关:
1. 静态路由配置
你已经设置了静态路由 ip routestatic 0.0.0.0 0 10.27.254.1,这意味着所有到外部网络的流量都应该通过网关 10.27.254.1 进行路由。确保这个网关的 IP 地址是正确的,并且能够正确访问外网。如果该网关不可达或配置错误,外部网络访问将失败。
2. NAT 配置
配置了 nat globalpolicy rule name PolicyRule_1 description GuideNat sourcezone Trust destinationzone Untrust action snat easyip,这表示源地址转换(SNAT)将被应用于从 Trust 区域到 Untrust 区域的流量。需要确保:
Trust 区域和 Untrust 区域配置正确。
easyip 是否适合当前的网络环境。如果你的公网 IP 地址是 122.155.78.162,需要确保防火墙配置了正确的 NAT 地址池或正确绑定到公网接口。
3. 安全策略配置
安全策略中有 securitypolicy ip rule 4 name GuideSecPolicy action pass sourcezone Trust sourcezone Local destinationzone Untrust destinationzone DMZ destinationzone Trust destinationzone Local。确保从 Trust 区域到 Untrust 区域的流量被允许通过。如果该策略没有配置正确或没有包括相关的流量路径,可能导致访问外网失败。
4. DNS 配置
防火墙配置了 DNS 服务器地址 8.8.8.8 和 114.114.114.114,并启用了 DNS 代理。需要确认防火墙能正常访问这些 DNS 服务器,且设备的 DNS 解析是否正常。如果你可以 ping 通网关和外部 IP,但无法解析域名,可能是 DNS 配置问题。
5. 防火墙接口设置
WAN 接口(GigabitEthernet1/0/1) 的配置看起来没有问题,但需要确保这个接口的 IP 地址 122.155.78.162 在物理连接和网络配置上正确。
GigabitEthernet1/0/1 被配置为 route 模式,而其他接口(GigabitEthernet1/0/0, GigabitEthernet1/0/2 等)则是桥接模式。如果有网络配置错误或接口没有正确划分到对应的安全区域,可能会导致访问受限。
6. ACL 配置
你配置了名为 IPsec_tozb_IPv4_1 的 ACL,并应用于 IPsec 的流量。确保这部分的 ACL 配置不会误拦截正常的外部流量,特别是 NAT 和路由流量。建议暂时禁用或调整这部分 ACL,以排除是否是 ACL 导致的问题。
7. Ping 测试
你可以 ping 通网关及 WAN 接口 IP 地址,表明物理连接正常,但确保防火墙内的路由、NAT 和安全策略都没有问题。尝试从防火墙的内部接口 Vlaninterface1 ping 外部 IP(如 8.8.8.8 或 114.114.114.114)来检查网络连接。
8. 检查日志
查看防火墙的日志,特别是连接或安全策略日志,看看是否有任何被拒绝的连接或错误信息。这能帮助定位是否是策略、路由、NAT 或 DNS 配置问题。
推荐的排查步骤:
1. 确认网关 10.27.254.1 可达,且能够访问外部网络。
2. 检查防火墙上的 NAT 配置,确保内部流量能够正确地进行源地址转换(SNAT)。
3. 检查安全策略配置,确保外部流量没有被错误的规则阻断。
4. 确认 DNS 配置是否正确,且防火墙能够访问配置的 DNS 服务器。
5. 使用 ping 测试来逐步确认网络连接(如从 LAN 接口 ping 外部 IP)。
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论