首页 > 其他分享 >H3C ACL配置实验

H3C ACL配置实验

时间:2024-02-05 15:11:45浏览次数:23  
标签:H3C 0.0 Request packet ACL 实验 192.168 3.1 out

H3C ACL配置实验

实验拓扑

image

实验需求

  1. 按照图示配置 IP 地址

  2. 全网路由互通

  3. 在 SERVER1 上配置开启 TELNET 和 FTP 服务

  4. 配置 ACL 实现如下效果

    1. 192.168.1.0/24​ 网段不允许访问 192.168.2.0/24​ 网段,要求使用基本 ACL 实现
    2. PC1 可以访问 SERVER1 的 TELNET 服务,但不能访问 FTP 服务
    3. PC2 可以访问 SERVER1 的 FTP 服务,但不能访问 TELNET 服务
    4. 192.168.2.0/24​ 网段不允许访问 SERVER1,要求通过高级 ACL 实现

实验步骤

设备配置IP地址(略)

R1,R2,R3 上配置 OSPF 使全网路由互通

R1

#
 sysname R1
#
ospf 1 router-id 1.1.1.1
 silent-interface GigabitEthernet0/0
 area 0.0.0.0
  network 1.1.1.1 0.0.0.0
  network 100.1.1.0 0.0.0.255
  network 192.168.1.0 0.0.0.255

R2

#
ospf 1 router-id 2.2.2.2
 silent-interface GigabitEthernet0/2
 area 0.0.0.0
  network 2.2.2.2 0.0.0.0
  network 100.1.1.0 0.0.0.255
  network 100.2.2.0 0.0.0.255
  network 192.168.2.0 0.0.0.255

R3

#
 sysname R3
#
ospf 1 router-id 3.3.3.3
 silent-interface GigabitEthernet0/1
 area 0.0.0.0
  network 3.3.3.3 0.0.0.0
  network 100.2.2.0 0.0.0.255
  network 192.168.3.0 0.0.0.255

SERVER1 上配置开启 TELNET 和 FTP 服务

#
 sysname Server
#
 telnet server enable
#
line vty 0 4
 authentication-mode scheme
 protocol inbound all 
#
local-user admin class manage
 password simple Test123456
 service-type ftp
 service-type telnet
 authorization-attribute user-role level-15
#
 ftp server enable
#
return

配置 ACL

192.168.1.0/24​ 网段不允许访问 192.168.2.0/24​ 网段,要求使用基本 ACL 实现

在R2上配置基本ACL

#
acl basic 2000
 rule 0 deny source 192.168.1.0 0.0.0.255
#
interface GigabitEthernet0/2
 packet-filter 2000 outbound

PC1 可以访问 SERVER1 的 TELNET 服务,但不能访问 FTP 服务

PC2 可以访问 SERVER1 的 FTP 服务,但不能访问 TELNET 服务

在R1上高级ACL

#
acl advanced 3000
 rule 0 deny tcp source 192.168.1.1 0 destination 192.168.3.1 0 destination-port range ftp-data ftp
 rule 5 deny tcp source 192.168.1.2 0 destination 192.168.3.1 0 destination-port eq telnet
#
interface GigabitEthernet0/0
 packet-filter 3000 inbound

192.168.2.0/24​ 网段不允许访问 SERVER1,要求通过高级 ACL 实现

在R2上配置高级ACL

#
acl advanced 3000
 rule 0 deny ip source 192.168.2.0 0.0.0.255 destination 192.168.3.1 0
#
interface GigabitEthernet0/2
 packet-filter 3000 inbound

实验验证

192.168.1.0/24​ 网段不允许访问 192.168.2.0/24​ 网段

<PC1>ping 192.168.2.1
Ping 192.168.2.1 (192.168.2.1): 56 data bytes, press CTRL+C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 192.168.2.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
<PC1>%Feb 3 14:42:52:076 2024 PC1 PING/6/PING_STATISTICS: Ping statistics for 192.168.2.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

<PC2>ping 192.168.2.1
Ping 192.168.2.1 (192.168.2.1): 56 data bytes, press CTRL+C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 192.168.2.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
<PC2>%Feb  3 14:43:06:493 2024 PC2 PING/6/PING_STATISTICS: Ping statistics for 192.168.2.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

PC1 可以访问 SERVER1 的 TELNET 服务,但不能访问 FTP 服务

<PC1>telnet 192.168.3.1
Trying 192.168.3.1 ...
Press CTRL+K to abort
Connected to 192.168.3.1 ...

<span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span>**

  • Copyright (c) 2004-2021 New H3C Technologies Co., Ltd. All rights reserved.*
  • Without the owner's prior written consent, *
  • no decompiling or reverse-engineering shall be allowed. *
    <span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span><span style="font-weight: bold;" data-type="strong"></span>**

Login: admin
Password:
<Server>

<PC1>ftp 192.168.3.1
Press CTRL+C to abort.
ftp: connect: Connection timed out

PC2 可以访问 SERVER1 的 FTP 服务,但不能访问 TELNET 服务

<PC2>ftp 192.168.3.1
Press CTRL+C to abort.
Connected to 192.168.3.1 (192.168.3.1).
220 FTP service ready.
User (192.168.3.1:(none)): admin
331 Password required for admin.
Password: 
230 User logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 
ftp> dir
227 Entering Passive Mode (192,168,3,1,208,65)
150 Accepted data connection
drwxrwxrwx    2 0          0                4096 Feb  3 13:41 diagfile
-rwxrwxrwx    1 0          0                 252 Feb  3 14:39 ifindex.dat
-rwxrwxrwx    1 0          0               43136 Feb  3 13:41 licbackup
-rwxrwxrwx    1 0          0               43136 Feb  3 13:41 licnormal
drwxrwxrwx    2 0          0                4096 Feb  3 13:41 logfile
-rwxrwxrwx    1 0          0                   0 Feb  3 13:41 msr36-cmw710-boot-r0424p22.bin
-rwxrwxrwx    1 0          0                   0 Feb  3 13:41 msr36-cmw710-system-r0424p22.bin
drwxrwxrwx    2 0          0                4096 Feb  3 13:41 seclog
-rwxrwxrwx    1 0          0                2690 Feb  3 14:39 startup.cfg
-rwxrwxrwx    1 0          0               44874 Feb  3 14:39 startup.mdb
226 10 matches total
ftp> 
<PC2>telnet 192.168.3.1
Trying 192.168.3.1 ...
Press CTRL+K to abort
Connected to 192.168.3.1 ...
Failed to connect to the remote host! 

192.168.2.0/24​ 网段不允许访问 SERVER1

<PC3>ping 192.168.3.1
Ping 192.168.3.1 (192.168.3.1): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 192.168.3.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
<PC3>%Feb 3 15:12:18:542 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.3.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

<PC3>telnet 192.168.3.1
Trying 192.168.3.1 ...
Press CTRL+K to abort
Connected to 192.168.3.1 ...
Failed to connect to the remote host!

实验附件

H3C ACL基本配置实验.zip

标签:H3C,0.0,Request,packet,ACL,实验,192.168,3.1,out
From: https://www.cnblogs.com/caomojian/p/18008222/h3c-acl-configuration-experiment-zhsakj

相关文章

  • Linux下Oracle启用
    1,Linux切换到Oraclesu-oracle2,使用sqlplus并以管理员的身份登录sqlplus/assysdba3,开启cbdstartup4,开启pdbalterpluggabledatabaseORA19CPDBopen;ORA19CPDB为pdb的名字,可以通过showpdbs查看5,退出sqlplusexit6,打开监听lsnrctlstart7,......
  • oracle常用sql
    --备份tbluser的数据到tbluser_bak中createtabletbluser_bakasselect*fromtbluser;--此处不加as也行--删除备份表的数据truncatetabletbluser_bak;--还原表数据insertintotbluser_bakselect*fromtbluser;--查看数据是否恢复select*fromtbluser_bak;-......
  • H3C PPP认证基本配置实验
    H3CPPP认证基本配置实验实验拓扑​​实验需求R1和R2使用PPP链路直连,R2和R3把2条PPP链路捆绑为PPPMP直连按照图示配置IP地址R2对R1的PPP进行单向chap验证R2和R3的PPP进行双向chap验证实验步骤R2和R3把2条PPP链路捆绑为PPPMP......
  • ospf实验
    拓扑配置[1-ospf-1]are0[1-ospf-1-area-0.0.0.0]net1.1.1.10.0.0.0[1-ospf-1-area-0.0.0.0]net12.1.1.10.0.0.0[1]interfaceLoopBack0[1-LoopBack0]ipad [1-LoopBack0]ipaddress1.1.1.132[1-LoopBack0]intg0/0/0[1-GigabitEthernet0/0/0]ipad [1-GigabitE......
  • Oracle-修改字段类型方法总结
    有一个表名为test,字段段名为name,数据类型nchar(20)。1、假设字段数据为空,则不管改什么字段类型,可以直接执行:altertabletestmodify(namenvarchar2(20));2、假设字段有数据,这时再来修改表的字段类型就无法修改:altertabletestmodify(namenvarchar2(20));3、假设字段有数据,......
  • h3c交换机配置登录口令强度要求、更换要求
    H3C交换机的具体命令可能会根据不同的设备型号和软件版本有所不同。以下是一些通用的命令示例,你可以根据你的具体情况进行调整:1.登录口令强度要求:设置最小密码长度:[Switch]aaa[Switch-aaa]local-useruser1password-min-length8设置密码复杂性:[Switch]aaa[Switch-aaa]loc......
  • Oracle向数据库插入日期格式数据
    插入系统日期insertintostudent(sno,sname,birthdate)values(007,'omit',sysdate);插入Oracle数据库指定格式的日期insertintostudent(sno,sname,birthdate)values(008,'Ding','18/11月/2022');使用todate()插入其他格式的日期(最常用)insertintostudent(sno,sname,......
  • ORACLE_sql中后相似下划线“_”没有匹配生效
    在oracle中我想查出库中所有表名类似“T_BD_ACCOUNTVIEW_QX_”的记录,用sql语句查询如下,得到结果却不一样,SELECTtable_nameFROMuser_tablesuwhereu.table_namelike'T_BD_ACCOUNTVIEW_QX_%';结果如下: 很显然,最后一个横杠没有匹配生效,查询后才知道,在Oracle中,下划线......
  • ORACLE:ORA-00933错误,SQL命令不正确结束
    什么是ORA-00933错误ORA-00933错误是Oracle数据库中常见的SQL错误之一。它表示SQL命令在语法上或结构上没有正确结束,导致解析错误。该错误通常会在执行SQL语句时发生,导致查询无法正常执行。ORA-00933错误的常见原因ORA-00933错误可能由以下几个原因引起: 缺少或多余的分号(;):......
  • vSphere上启用嵌套虚拟化运行Proxmox VE和DoraCloud,虚拟机无法访问物理网络问题
    在vSphere上部署ProxmoxVE,然后在ProxmoxVE内部署DoraCloud桌面云系统。首先遇到的一个问题是安装ProxmoxVE时,提示不支持嵌套虚拟化。解决方法:在vSphere中为ProxmoxVE这个虚拟机启用嵌套,即让vSphereESXi向虚拟机暴露硬件虚拟化的支持。这样ProxmoxVE可以正常检测到硬......