1. 程式人生 > >某公司防火墻配置-2

某公司防火墻配置-2

action splay 關閉 title -o image 狀態 mit 發布

好的,接著昨天的配置,我們需要發布公司的服務器供internet上的用戶訪問,拓撲圖如下:

技術分享圖片

由於為了防止病毒攻擊,我們不能放開untrust區域和dmz區域之間的策略:

[SRG]display firewall packet-filter default all

技術分享圖片

狀態為deny。

接下來我們來做一些策略讓internet上的用戶可以訪問服務器上的http、ping通、ftp

首先先創建一個服務集toserver:

[SRG]ip service-set toserver type object

然後把icmp、www(80)、ftp(21)放入服務集中:

[SRG-object-service-set-toserver]service 0 protocol icmp

[SRG-object-service-set-toserver]service 1 protocol tcp destination-port 80

[SRG-object-service-set-toserver]service 2 protocol tcp destination-port 21


接著我們開啟策略:

[SRG]policy interzone untrust dmz inbound

[SRG-policy-interzone-dmz-untrust-inbound]policy 10

[SRG-policy-interzone-dmz-untrust-inbound-10]policy service service-set toserver

[SRG-policy-interzone-dmz-untrust-inbound-10]policy destination 10.1.3.10 0

[SRG-policy-interzone-dmz-untrust-inbound-10]action permit


接著我們配置服務器:

技術分享圖片

最後我們驗證一下:

1、用untrust區域中的client9ping服務器地址:


技術分享圖片

2、訪問服務器的http的功能:

技術分享圖片


由於ftp有雙通道概念,防火墻默認是關閉雙通道的所以我們要開啟ftp雙通道:

[SRG]firewall interzone untrust dmz

[SRG-interzone-dmz-untrust]detect ftp

然後驗證ftp:

技術分享圖片

如果不開啟雙通道模式是無法訪問ftp的,大家可以驗證一下。

某公司防火墻配置-2