知ALGNAT张辛2015-07-28发表防火墙内网用户通过公网域名访问内部服务器典型配置案例集1、PC和服务器的网关都在核心交换机上.
2、PC通过运营商A上公网,服务器通过运营商B上公网.
3、公网用户通过运营商B访问内网服务器.
4、PC使用DNS服务器为公网DNS.
5、PC通过域名www.
aaa.
com访问内网服务器,公网DNS解析该域名IP为123.
1.
1.
1.
1)防火墙开启ALGDNS功能.
核心交换机配置:核心交换机上配置PC和服务器的网关,缺省路由指向防火墙,具体配置略.
防火墙配置:1、在接口G0/0、G0/1、G0/2上配置相应的地址,正确配置路由和域间策略,具体配置略.
2、通过PBR将PC访问公网的流量重定向至运营商A,PC访问服务器的流量不做重定向.
#[F1000-E-SI]aclnumber3010[F1000-E-SI-acl-adv-3010]rulepermitipsource192.
168.
1.
50[F1000-E-SI-acl-adv-3000]quit#[F1000-E-SI]policy-based-routePC-WANpermitnode10[F1000-E-SI-pbr-PC-WAN-10]if-matchacl3010[F1000-E-SI-pbr-PC-WAN-10]applyip-addressnext-hop58.
1.
1.
2#[F1000-E-SI]interfaceGigabitEthernet0/0[F1000-E-SI-GigabitEthernet0/0]ippolicy-based-routePC-WAN#3、在防火墙上开启ALGDNS功能.
(缺省是关闭的,开启后配置中无显示.
)#[F1000-E-SI]algdns#4、在接口G0/1上配置natserver和PC上公网的natoutbound功能.
#[F1000-E-SI]interfaceGigabitEthernet0/1[F1000-E-SI-GigabitEthernet0/1natoutbound3010[F1000-E-SI-GigabitEthernet0/1]natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5www#5、在接口G0/2上配置natserver和服务器上公网的natoutbound功能.
[F1000-E-SI]aclnumber3020[F1000-E-SI-acl-adv-3020]rulepermitipsource192.
168.
99.
50[F1000-E-SI-acl-adv-3020]quit#[F1000-E-SI]interfaceGigabitEthernet0/2[F1000-E-SI-GigabitEthernet0/2]natoutbound3020[F1000-E-SI-GigabitEthernet0/2]natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5www#完整配置:#undoalgftpundoalgrtspundoalgh323undoalgsipundoalgsqlnetundoalgpptpundoalgilsundoalgnbtundoalgmsnundoalgqqundoalgtftpundoalgsccpundoalggtp#aclnumber3010rule0permitipsource192.
168.
1.
50aclnumber3020rule0permitipsource192.
168.
99.
50#policy-based-routePC-WANpermitnode10if-matchacl3010applyip-addressnext-hop58.
1.
1.
2#interfaceGigabitEthernet0/0portlink-moderouteipaddress192.
168.
255.
1255.
255.
255.
252ippolicy-based-routePC-WAN#interfaceGigabitEthernet0/1portlink-moderoutenatoutbound3010natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5wwwipaddress58.
1.
1.
1255.
255.
255.
252#interfaceGigabitEthernet0/2portlink-moderoutenatoutbound3020natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5wwwipaddress202.
2.
2.
1255.
255.
255.
252#iproute-static0.
0.
0.
00.
0.
0.
0202.
2.
2.
2iproute-static192.
168.
0.
0255.
255.
0.
0192.
168.
255.
2#2)防火墙不开启ALGDNS功能.
核心交换机配置:核心交换机上配置PC和服务器的网关,缺省路由指向防火墙,具体配置略.
防火墙配置:1、在接口G0/0、G0/1、G0/2上配置相应的地址,正确配置路由和域间策略,具体配置略.
2、通过PBR将PC访问公网的流量重定向至运营商A,PC访问服务器的流量不做重定向.
#[F1000-E-SI]aclnumber3000[F1000-E-SI-acl-adv-3000]rulepermitipsource192.
168.
1.
50destination192.
168.
99.
50[F1000-E-SI-acl-adv-3000]quit#[F1000-E-SI]aclnumber3010[F1000-E-SI-acl-adv-3010]rulepermitipsource192.
168.
1.
50[F1000-E-SI-acl-adv-3000]quit#[F1000-E-SI]policy-based-routePC-WANdenynode5[F1000-E-SI-pbr-PC-WAN-5]if-matchacl3000[F1000-E-SI-pbr-PC-WAN-5]quit[F1000-E-SI]policy-based-routePC-WANpermitnode10[F1000-E-SI-pbr-PC-WAN-10]if-matchacl3010[F1000-E-SI-pbr-PC-WAN-10]applyip-addressnext-hop58.
1.
1.
2#[F1000-E-SI]interfaceGigabitEthernet0/0[F1000-E-SI-GigabitEthernet0/0]ippolicy-based-routePC-WAN#3、在接口G0/0上配置natserver和PC访问服务器的natoutbound功能.
#[F1000-E-SI]interfaceGigabitEthernet0/0[F1000-E-SI-GigabitEthernet0/2]natoutbound3000[F1000-E-SI-GigabitEthernet0/2]natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5www#4、在接口G0/1上配置PC上公网的natoutbound功能.
#[F1000-E-SI]interfaceGigabitEthernet0/1[F1000-E-SI-GigabitEthernet0/2]natoutbound3010#5、在接口G0/2上配置natserver和服务器上公网的natoutbound功能.
[F1000-E-SI]aclnumber3020[F1000-E-SI-acl-adv-3020]rulepermitipsource192.
168.
99.
50[F1000-E-SI-acl-adv-3020]quit#[F1000-E-SI]interfaceGigabitEthernet0/2[F1000-E-SI-GigabitEthernet0/2]natoutbound3020[F1000-E-SI-GigabitEthernet0/2]natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5www#完整配置:#undoalgall#aclnumber3000rule5permitipsource192.
168.
1.
50destination192.
168.
99.
50aclnumber3010rule0permitipsource192.
168.
1.
50aclnumber3020rule0permitipsource192.
168.
99.
50#policy-based-routePC-WANdenynode5if-matchacl3000policy-based-routePC-WANpermitnode10if-matchacl3010applyip-addressnext-hop58.
1.
1.
2#interfaceGigabitEthernet0/0portlink-moderoutenatoutbound3000natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5wwwipaddress192.
168.
255.
1255.
255.
255.
252ippolicy-based-routePC-WAN#interfaceGigabitEthernet0/1portlink-moderoutenatoutbound3010ipaddress58.
1.
1.
1255.
255.
255.
252#interfaceGigabitEthernet0/2portlink-moderoutenatoutbound3020natserverprotocoltcpglobal123.
1.
1.
1wwwinside192.
168.
99.
5wwwipaddress202.
2.
2.
1255.
255.
255.
252#iproute-static0.
0.
0.
00.
0.
0.
0202.
2.
2.
2iproute-static192.
168.
0.
0255.
255.
0.
0192.
168.
255.
2#1、在接口同时配置有PBR和NAT的情况下,报文优先匹配NAT.
做完NAT转换后,再进行PBR匹配.
修罗云怎么样?修罗云是一家国内老牌商家,修罗云商家以销售NAT机器起家,国内的中转机相当不错,给的带宽都非常高,此前推荐的也都是国内NAT VPS机器。今天,云服务器网(www.yuntue.com)小编主要介绍一下修罗云的香港云服务器,适合建站,香港沙田cn2云服务器,2核2G,5M带宽仅70元/月起,同时香港香港大带宽NAT VPS低至50元/月起,性价比不错,可以尝试一下!点击进入:修罗云官...
SugarHosts 糖果主机商也算是比较老牌的主机商,从2009年开始推出虚拟主机以来,目前当然还是以虚拟主机为主,也有新增云服务器和独立服务器。早年很多网友也比较争议他们家是不是国人商家,其实这些不是特别重要,我们很多国人商家或者国外商家主要还是看重的是品质和服务。一晃十二年过去,有看到SugarHosts糖果主机商12周年的促销活动。如果我们有需要香港、美国、德国虚拟主机的可以选择,他们家的...
Hostodo在九月份又发布了两款特别套餐,开设在美国拉斯维加斯、迈阿密和斯波坎机房,基于KVM架构,采用NVMe SSD高性能磁盘,最低1.5GB内存8TB月流量套餐年付34.99美元起。Hostodo是一家成立于2014年的国外VPS主机商,主打低价VPS套餐且年付为主,基于OpenVZ和KVM架构,美国三个地区机房,支持支付宝或者PayPal、加密货币等付款。下面列出这两款主机配置信息。CP...