上一節(jié)我們配置了內(nèi)網(wǎng)用戶訪問DMZ區(qū)域,今天我們來配置一下內(nèi)網(wǎng)用戶訪問互聯(lián)網(wǎng)!
首先配置好各接口IP地址,并將接口加入到相應(yīng)的安全區(qū)域內(nèi)
配置Trust用戶訪問互聯(lián)網(wǎng)UnTrust
1、創(chuàng)建地址池
[FW1]nat address-group 1 10.1.1.20 10.1.1.21//配置NAT轉(zhuǎn)換公網(wǎng)地址池;
2、配置NAT策略
[FW1]nat-policy interzone trust untrust outbound
[FW1-nat-policy-interzone-trust-untrust-outbound]policy 10
[FW1-nat-policy-interzone-trust-untrust-outbound-10]action source-nat
//配置源NAT轉(zhuǎn)換,也可以配置no-pat模式;
[
FW1-nat-policy-interzone-trust-untrust-outbound-10]policy source 192.168.2.0 mask 24 (某一段地址)
[
FW1-nat-policy-interzone-trust-untrust-outbound-10]policy source 192.168.1.10 0(允許單個(gè)主機(jī)放行)
[FW1-policy-interzone-trust-untrust-outbound-20]policy destination any
3、配置源NAT地址轉(zhuǎn)換
[
FW1-nat-policy-interzone-trust-untrust-outbound-10]address-group 1//關(guān)聯(lián)地址池,使用端口復(fù)用PAT模式;若使用動(dòng)態(tài)NAT,多對(duì)多模式,配置下列命令:
4、No-Pat地址轉(zhuǎn)換
[
FW1-nat-policy-interzone-trust-untrust-outbound-10]address-group 1 no-pat//No-pat不進(jìn)行端口轉(zhuǎn)換,只進(jìn)行地址轉(zhuǎn)換,表示一對(duì)一轉(zhuǎn)換,一個(gè)公網(wǎng)對(duì)應(yīng)一個(gè)私網(wǎng)地址;
5、配置Trust到untrust安全策略并放行
[FW1]policy interzone trust untrust outbound
[FW1-policy-interzone-trust-untrust-outbound]policy 20
[
FW1-nat-policy-interzone-trust-untrust-outbound-10]policy source 192.168.1.0 mask 24 (放行轉(zhuǎn)換之前的地址,某一段地址)
[FW1-policy-interzone-trust-untrust-outbound-20]policy service service-set icmp//不配置表示允許所有;
[FW1-policy-interzone-trust-untrust-outbound-20]action permit
[FW1-policy-interzone-trust-untrust-outbound-20]q
[FW1-policy-interzone-trust-untrust-outbound]q
[FW1]
注意:按照數(shù)據(jù)包到防火的轉(zhuǎn)發(fā)流程,先匹配安全策略,策略通過的話,再匹配源NAT。
6、檢測(cè)配置
查看NAT策略
[FW1]display nat-policy all
[FW1]display nat-policy interzone trust untrust outbound
這個(gè)只有流量通過后,才能有數(shù)據(jù);
[FW1]display firewall session table
檢查安全策略
<FW1>display policy all
7、創(chuàng)建防火墻路由
[FW1]ip route-static 0.0.0.0 0.0.0.0 10.1.1.11
<FW1>display ip routing-table protocol static
8、測(cè)試內(nèi)部終端到公網(wǎng)PC
9、查看會(huì)話表
<FW1>display firewall session table
10、查看會(huì)話表詳細(xì)信息
<FW1>display firewall session table verbose
[FW1]display firewall packet-filter default all
|