首页 > 其他分享 >路由器安全远程管理配置

路由器安全远程管理配置

时间:2022-10-20 23:57:14浏览次数:33  
标签:AR1 AR2 ip 配置 GigabitEthernet0 192.168 远程管理 interface 路由器

1、项目拓扑图

2、具体配置

2.1PC1配置

2.2PC2配置

2.3AR1配置

基础配置
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1  //更改设备名称为AR1
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.10.254 24  //配置接口g0/0/1的IP地址为192.168.10.254 24
Oct 20 2022 23:02:14-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR1-GigabitEthernet0/0/1]dis this  //查询当前命令下的配置
[V200R003C00]
#
interface GigabitEthernet0/0/1
 ip address 192.168.10.254 255.255.255.0 
#
return

[AR1]ip route-static 192.168.20.0 255.255.255.0 192.168.12.2  
//设置静态路由,前面192.168.20.0 255.255.255.0是指你要到达的目标网络地址,后面的192.168.12.2是指你的下一跳地址
[AR1]dis this
[V200R003C00]
#
ip route-static 192.168.20.0 255.255.255.0 192.168.12.2
#
return
[AR1]
[AR1-GigabitEthernet0/0/0]ip address 192.168.12.1 24  //配置接口g0/0/0的IP地址为192.168.12.1 24
Oct 20 2022 23:03:39-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]dis this  //查询当前命令下的配置
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.12.1 255.255.255.0 
#
return
配置ssh服务
[AR1]user-interface vty 0 4   //进入vty视图
[AR1-ui-vty0-4]authentication-mode aaa	//指定验证模式为aaa
[AR1-ui-vty0-4]protocol inbound ssh  //绑定服务为ssh
[AR1-ui-vty0-4]quit

[AR1]aaa
[AR1-aaa]local-user cookie password cipher cookie@37 privilege level 15  //创建用户,分配权限
Info: Add a new user.
[AR1-aaa]local-user cookie service-type ssh  //绑定用户服务类型ssh
[AR1-aaa]quit

[AR1]stelnet server enable   //开启stelnet服务
Info: Succeeded in starting the STELNET server.
[AR1]ssh client first-time enable  //开启ssh服务

[AR1]rsa local-key-pair create   //创建本地密钥对
The key name will be: Host
% RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
       It will take a few minutes.
Input the bits in the modulus[default = 512]:512 
//如果RSA密钥已经存在,则系统将提示用户确认是否替换原有密钥。
执行此命令后,会提示您输入主机密钥的位数。服务器密钥对的位数与主机密钥对的位数至少相差128位。
服务器密钥对和主机密钥对的最小长度为512位,最大长度为2048位,缺省长度为2048位。
小于1024位的RSA密钥对不够安全,不推荐使用。//


Generating keys...
................++++++++++++
..............++++++++++++
.....++++++++
............................++++++++

2.4AR2配置

基础配置
<Huawei>system-view  //进入系统视图界面
Enter system view, return user view with Ctrl+Z.	
[Huawei]sysname AR2	
[AR2]interface GigabitEthernet 0/0/1	
[AR2-GigabitEthernet0/0/1]ip address 192.168.20.254 24
Oct 20 2022 23:08:28-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR2-GigabitEthernet0/0/1]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/1
 ip address 192.168.20.254 255.255.255.0 
#
return
[AR2-GigabitEthernet0/0/1]

[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.12.2 24
Oct 20 2022 23:10:17-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR2-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.12.2 255.255.255.0 
#
return

[AR2]ip route-static 192.168.10.0 255.255.255.0 192.168.12.1
[AR2]dis this
[V200R003C00]
#
ip route-static 192.168.10.0 255.255.255.0 192.168.12.1
#
return
[AR2]
AR2后续操作参照AR1配置ssh服务

3、测试结果 

3.1PC之间通信正常

3.2AR1测试ssh服务正常

3.2AR2测试ssh服务正常

3.3AR1与AR2相互使用ssh服务正常

标签:AR1,AR2,ip,配置,GigabitEthernet0,192.168,远程管理,interface,路由器
From: https://www.cnblogs.com/colk/p/16812014.html

相关文章

  • HCIA学习笔记三十五:OSPF单区域配置
    一、单区域OSPF配置二、DR和BDR• DR可以减少广播型网络中的邻接关系的数量三、DR和BDR的选举四、单区域OSPF实验• 回环口一般指回环接口。回环接口是些逻辑......
  • 神通数据库安装配置方法
    神通数据库安装配置方法背景随着CentOS停服和国产化的要求.公司开始调研国产化系统.好多人都想用debian和ubuntu.但是我感觉既然要国产化.还是用华为的openEluer阿......
  • 管理配置ANSIBLE
    管理配置ANSIBLE目录管理配置ANSIBLE定义清单清单的位置使用静态清单指定受管主机验证清单构建Ansible清单自定义清单文件管理ANSIBLE配置文件配置Ansible配置文件优先级......
  • 华为交换机配置SSH
    [SW]rsalocal-key-paircreate[SW]sshusertestauthentication-typepassword/密码认证[SW]sshusertestservice-typestelnet/......
  • 虚拟机en33配置
    文件路径:/etc/sysconfig/network-scriptsifcfg-ens33文件内容参考如下:1TYPE=Ethernet2PROXY_METHOD=none3BROWSER_ONLY=no4BOOTPROTO=static5DEFROUTE=ye......
  • ansible配置文件
    Ansible配置文件目录Ansible配置文件一、ansible配置文件1.配置ansible2.配置文件优先级3.管理配置文件中的设置4.配置连接4.1连接设置4.2升级特权5.配置文件注释二、构建......
  • 思科CCNP学习DHCP协议与DHCP中继的配置解析
    感谢关注WOLFLAB网络实验室,我们陆续都会发布更多CCNP相关技术!思科CCNP学习DHCP协议与DHCP中继的配置解析需求描述1.     实验室交换机架登陆:Rack99  192.168.9.99......
  • yaml配置
    一、yaml配置1.application.yaml--javascripttypescriptbashsqljsonhtmlcssccppjavarubypythongorustmarkdownperson:name:ldsage:3happy:......
  • 8-jenkins windows环境下配置自动构建启动项目(springboot,gitlab,maven)
    由于远程办公原因,所以我们的服务必须在一个内网,所以就想到使用jenkins来实现提交后自动构建项目启动,不需要再登录到内网操作。jenkins的安装很简单,网上一大片,然后gitlab......
  • 已整理-firewalld防火墙配置
     目录:1、firewalld防火墙介绍2、firewalld区域与配置规则3、firewall-cmd配置 1、firewalld防火墙介绍防火墙作用:隔离,严格过滤入站,允许出站;系统服务......