一.測(cè)試拓?fù)?/strong>
網(wǎng)站制作、建網(wǎng)站找專業(yè)的建站公司成都創(chuàng)新互聯(lián):定制網(wǎng)站、模板網(wǎng)站、仿站、小程序開(kāi)發(fā)、軟件開(kāi)發(fā)、重慶APP開(kāi)發(fā)公司等。做網(wǎng)站價(jià)格咨詢成都創(chuàng)新互聯(lián):服務(wù)完善、10多年建站、值得信賴!網(wǎng)站制作電話:18980820575
二.測(cè)試思路
1.分別測(cè)試tcp和udp的連續(xù)端口PAT
2.再用靜態(tài)端口轉(zhuǎn)換工具分別將TCP端口和udp端口轉(zhuǎn)換到某個(gè)常用端口進(jìn)行測(cè)試
---tcp轉(zhuǎn)換到TCP23,用telnet測(cè)試
---udp轉(zhuǎn)換到UDP514,用syslog發(fā)送進(jìn)行測(cè)試
3.為了測(cè)試方便,防火墻只設(shè)兩個(gè)區(qū)Outside和Inside
---將Inside服務(wù)器的TCP1000~2000映射到防火墻Outside口的TCP1000~2000上
---將Inside服務(wù)器的UDP1000~2000映射到防火墻Outside口的UPD2000~3000上
4.測(cè)試發(fā)現(xiàn)如果TCP端口范圍與UDP端口范圍一樣,第二個(gè)NAT配置不上,會(huì)報(bào)如下錯(cuò)誤:
ERROR: NAT unable to reserve ports.
三.基本配置
1.Outside服務(wù)器
IP:202.100.1.8/24
2.防火墻ASA842
interface GigabitEthernet0
nameif Outside
security-level 0
ip address 202.100.1.10 255.255.255.0
!
interface GigabitEthernet1
nameif Inside
security-level 100
ip address 10.1.1.10 255.255.255.0
3.Intside服務(wù)器
IP:10.1.1.8/24
GW:10.1.1.10
四.靜態(tài)PAT端口范圍配置
1.定義端口范圍對(duì)象
object network Inside_Server
host 10.1.1.8
object service tcp_ports
service tcp destination range 1000 2000
object service udp_ports
service udp destination range 2000 3000
2.配置twice-nat
nat (outside,inside) source static any any destination static interface Inside_Server service tcp_ports tcp_ports
nat (outside,inside) source static any any destination static interface Inside_Server service udp_ports udp_ports
3.配置并應(yīng)用防火墻策略
access-list Outside extended permit tcp any object Inside_Server range 1000 2000
access-list Outside extended permit udp any object Inside_Server range 2000 3000
access-group Outside in interface Outside
4.測(cè)試驗(yàn)證
---可以用多種方式驗(yàn)證,如果進(jìn)行靜態(tài)端口轉(zhuǎn)換嫌麻煩,可以直接抓包驗(yàn)證