千家信息网

ACL扩展访问控制列表详解

发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,本章实验:允许win10-1访问linux的web服务禁止win10-1访问linux的其他服务允许win10访问win10-2主机ACL扩展访问控制列表详解1.配置GNS3三台主机,一台路由器win
千家信息网最后更新 2026年11月03日ACL扩展访问控制列表详解

本章实验:

允许win10-1访问linux的web服务

禁止win10-1访问linux的其他服务

允许win10访问win10-2主机

ACL扩展访问控制列表详解

1.配置GNS3

三台主机,一台路由器
win10 -1 :绑定VMnet1网卡
win10-2:绑定VMnet2网卡
linux:绑定VMnet8网卡作为测试
f0/0:192.168.1.1/24
f1/0:192.168.2.1/24
f10/1:192.168.100.1/24

2.配置linux服务器,安装两个服务VSFTPD,HTTPD

[root@localhost ~]# yum install vsftpd -y已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.cn99.com * updates: mirrors.cn99.com正在解决依赖关系--> 正在检查事务---> 软件包 vsftpd.x86_64.0.3.0.2-25.el7 将被 安装--> 解决依赖关系完成[root@localhost ~]# yum install httpd -y已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.cn99.com * updates: mirrors.cn99.com正在解决依赖关系--> 正在检查事务

3.把linux服务器绑定VMnet8网卡

4.把linux服务器设置静态IP地址

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens33UUID=849aa04e-1874-490f-8cb0-b2fde4b9a6f8DEVICE=ens33ONBOOT=yesIPADDR=192.168.100.100NETMASK=255.255.255.0GATEWAY=192.168.100.1[root@localhost ~]# systemctl restart network重启linux服务器

5.给win10 -1和win10 -2绑定网卡

6.win10-2设置固定IP地址

7.win10-1设置固定IP地址

8.回到GNS3给接口配置地址

R1#conf tR1(config)#int f0/0R1(config-if)#ip add 192.168.1.1 255.255.255.0R1(config-if)#no shutR1(config-if)#int f0/1R1(config-if)#ip add 192.168.100.1 255.255.255.0R1(config-if)#no shutR1(config-if)#int f1/0R1(config-if)#ip add 192.168.2.1 255.255.255.0R1(config-if)#no shutR1(config-if)#exR1(config)#do show ip routeCodes: 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 routeGateway of last resort is not setC    192.168.1.0/24 is directly connected, FastEthernet0/0C    192.168.2.0/24 is directly connected, FastEthernet1/0C    192.168.100.0/24 is directly connected, FastEthernet0/1

9.把win10 -1和win10-2防火墙都关掉

10.用win10-2去pingwin 10 -1,看看能不能连通

C:\Users\CHEN>ping 192.168.1.2正在 Ping 192.168.1.2 具有 32 字节的数据:来自 192.168.1.2 的回复: 字节=32 时间=19ms TTL=127来自 192.168.1.2 的回复: 字节=32 时间=18ms TTL=127来自 192.168.1.2 的回复: 字节=32 时间=14ms TTL=127来自 192.168.1.2 的回复: 字节=32 时间=15ms TTL=127

11.linux开启两个服务,并写两个文件内容

root@localhost chen]# systemctl stop firewalld.serviceroot@localhost chen]# setenforce 0[root@localhost chen]# cd /var/www/html[root@localhost html]# vim index.html 

this is test web

[root@localhost html]# lsindex.html[root@localhost html]# systemctl start httpd[root@localhost html]# systemctl start vsftpd[root@localhost html]# cd /var/ftp[root@localhost ftp]# lspub[root@localhost ftp]# echo "this is ftp" > ftp.txt[root@localhost ftp]# lsftp.txt pub[root@localhost html]# netstat -nuap | egrep '(21|80)'udp 0 0 192.168.122.1:53 0.0.0.0:* 1380/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 1380/dnsmasq

12.去win10-1测试能不能访问192.168.100.100两个服务是不是都能访问

13.回到GNS3开始配置ACL扩展访问控制列表

R1#conf tR1(config)#access-list 100 permit tcp host 192.168.1.2 host   192.168.100.100 eq www  //扩展的序列号100-199,允许tcp协议,固定地址192.168.1.2去访问192.168.100.100 后面跟端口号80也可以是名字R1(config)#do show access-list  //查看访问控制列表Extended IP access list 100    10 permit tcp host 192.168.1.2 host 192.168.100.100 eq wwwR1(config)#access-list 100 deny ip host 192.168.1.2 host 192.168.100.100R1(config)#do show access-list                                          Extended IP access list 100    10 permit tcp host 192.168.1.2 host 192.168.100.100 eq www    20 deny ip host 192.168.1.2 host 192.168.100.100R1(config)#access-list 100 permit ip host 192.168.1.2 192.168.2.0 0.0.0.255R1(config)#do show access-list                                             Extended IP access list 100    10 permit tcp host 192.168.1.2 host 192.168.100.100 eq www    20 deny ip host 192.168.1.2 host 192.168.100.100    30 permit ip host 192.168.1.2 192.168.2.0 0.0.0.255R1(config-if)#ip access-group 100 in  //应用在接口,离限制方最近的端口,是入口方向。

ACL扩展访问控制列表配置好后,测试win10-1能不能访问ftp服务

我们的实验就成功了

服务 地址 字节 正在 网卡 配置 控制 两个 时间 服务器 测试 主机 事务 接口 插件 实验 检查 成功 入口 内容 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 南京欣网互联网络科技 中国互联网科技股 美国互联网科技巨头监管 北京互联网科技有限公司 互联网科技媒体 友谊互联网络科技 互联网科技logo 金融科技和互联网金融 湖南洣水互联网科技有限公司扣款 卫星互联网科技股票 以后互联网后是啥科技 银川新华互联网科技职业技术培训学校图片 九思连强互联网电子科技有限公司 吉林省码上互联网科技电话 好易买互联网科技 亚光科技低轨卫星互联网 互联网科技创业计划的风险分析 科技发展第三阶段互联网时代 广州全民伙伴互联网科技有限公司 武汉亿视互联网科技有限公司 哈尔滨大商圈互联网科技有限公司 涨乐互联网科技 美国互联网科技巨头监管 博兴的互联网电子科技公司 青岛中康互联网医疗科技有限公司 昭通云南众福互联网科技有限公司 注册互联网科技公司经营范围大全 宇信科技在杭州互联网排第几 科技互联网专业工作会议发言稿 华人运通互联网科技公司
0