创新互联-专业网站定制、快速模板网站建设、高性价比镇江网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式镇江网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖镇江地区。费用合理售后完善,10年实体公司更值得信赖。
完成在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)#
以上设置均已完成的情况下,进行实验验证,应该为以下情况: