完成在R1路由上扩展ACL的建立,实现实验要求:
允许PC1访问Linux的web服务;
允许PC2访问Linux的ftp服务;
禁止PC1、PC2访问Linux的其它服务;
允许PC1联通PC2
1、完成两台PC机静态的设置与网卡的绑定
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 :::* LISTEN 6435/vsftpd
3、Linux设置静态IP并绑定网卡
4、R1路由的设置
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
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
R1(config)#
R1(config)#$t tcp 192.168.80.20 0.0.0.255 192.168.100.100 0.0.0.255 eq 80
R1(config)#$ 100 permit tcp host 192.168.90.10 host 192.168.100.100 eq 21
R1(config)#$ 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 f 0/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
R1(config)#
以上设置均已完成的情况下,进行实验验证,应该为以下情况:
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。