拡張ACLコンフィギュレーション・ラボ

まず、図の主張の実験と

ACLで確立は、以下のような構成要件であるルーティング拡張:
1は、LinuxはWebサービスPC1へのアクセス許可
2は、PC2のLinuxのFTPサーバへのアクセスを可能にするために
3、PC1とPC2は、Linuxアクセスする他のサービスを禁止されて
PC1とPC2へのアクセスを可能にする、4
拡張ACLコンフィギュレーション・ラボ

第二に、テスト環境の展開

1は、PC1、PC2およびLinuxシステムでは、静的IP、マスク、ゲートウェイ子を設定し、NICのチーミング対応がされています。
2、完全なLinuxサーバのインストールと起動関連サービス

[root@localhost ~]# yum install vsftpd -y      //安装ftp服务
[root@localhost ~]# yum install httpd -y       //安装http服务
[root@localhost ~]# systemctl stop firewalld.service    //关闭防火墙
[root@localhost ~]# setenforce 0               //关闭增强性安全功能
[root@localhost ~]# systemctl start httpd      //启动服务
[root@localhost ~]# systemctl start vsftpd
[root@localhost ~]# netstat -ntap | egrep '(21|80)'     //检查服务启动状况(80端口为http,21端口为ftp)
tcp6       0      0 :::80                   :::*                    LISTEN      6399/httpd          
tcp6       0      0 :::21                   :::*       

3、ルーティング設定:3ポートIP

R1#conf t 
R1(config)#int f 0/0
R1(config-if)#ip add 192.168.90.1 255.255.255.0
R1(config-if)#no shut 
R1(config-if)#int f 0/1
R1(config-if)#ip add 192.168.80.1 255.255.255.0
R1(config-if)#no shut 
R1(config-if)#int f 1/0
R1(config-if)#ip add 192.168.100.1 255.255.255.0 
R1(config-if)#no shut 
R1(config-if)#ex
R1(config)#do show ip route                 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.90.0/24 is directly connected, FastEthernet0/0
C    192.168.80.0/24 is directly connected, FastEthernet0/1
C    192.168.100.0/24 is directly connected, FastEthernet1/0

図4に示すように、拡張ACLを設定します

R1(config)#access-list 100 permit  tcp 192.168.80.20 0.0.0.255 192.168.100.100 0.0.0.255 eq 80           
R1(config)#access-list 100 permit tcp host 192.168.90.10 host 192.168.100.100 eq 21      
R1(config)#access-list 100 permit ip host 192.168.80.20 192.168.90.0 0.0.0.255         
R1(config)#do show access-list
Extended IP access list 100
    10 permit tcp 192.168.80.0 0.0.0.255 192.168.100.0 0.0.0.255 eq www
    20 permit tcp host 192.168.90.10 host 192.168.100.100 eq ftp
    30 permit ip host 192.168.80.20 192.168.90.0 0.0.0.255
R1(config)#int  f0/1        
R1(config-if)#ip access-group 100 in
R1(config-if)#int  f0/0
R1(config-if)#ip access-group 100 in
R1(config-if)#ex 

5、テスト結果の
ウェブサイトのサービスにアクセスすることができPC1
拡張ACLコンフィギュレーション・ラボ
ftpサービスにアクセスすることができPC2が
拡張ACLコンフィギュレーション・ラボ
アクセスPC2 PC1をすることができます
拡張ACLコンフィギュレーション・ラボ

おすすめ

転載: blog.51cto.com/14475593/2443135