祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 111|回复: 0

H3C防火墙配置SSH连接

[复制链接]

212

主题

226

帖子

1371

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1371
发表于 6 天前 | 显示全部楼层 |阅读模式
H3C防火墙配置SSH连接
基本配置
system-view
sysname fw1
undoinfo-center enable
interfacegigabitethernet 0/3  //进入接口
description trust  //配置接口描述
ip address10.1.1.1 24  //配置IP
manage pinginbound  //接口放行ping入站
manage pingoutbound  //接口放行ping出站
manage ssh inbound  //接口放行ssh入站
quit
注意,ssh客户端所在trust域的接口需要放行ssh入站。
interfaceloopback 0  //配置环回接口
descriptionmanagerment  //描述为管理口
ip address10.10.10.1 32
quit
注意,配置环回口做为管理地址也是ssh地址。
配置安全策略
security-zonename trust  //配置安全域
importinterface gigabitethernet 0/3  //加入接口
quit
security-policyip  //建立安全策略
rule name ssh  //规则命名
source-zonetrust  //源域为trust
destination-zonelocal  //目标域为local
source-ip-host10.1.1.100  //源主机地址
destination-ip-host10.10.10.10  //目标主机地址
service any  //放行全部服务
action pass  //动作执行放行
quit
quit
注意,ssh的区域流量是ssh用户端所在的trust区域访问防火墙本身/local区域。
配置用户线视图及用户
user-interfacevty 0 63  //进入虚拟用户视图
authentication-modescheme  //身份认证模式为scheme
protocolinbound all  //放行全部协议入站
user-rolenetwork-admin  //用户角色为网络管理员
idle-timeout30  //配置无动作登出时间为30M
quit
local-userzurkj  //创建本地用户zurkj
passwordsimple 123456  //配置用户密码
authorization-attributeuser-role level-15  //用户角色的授权属性为最高级别
service-typessh http https  //配置服务类型
quit
public-keylocal create rsa  //创建本地rsa密钥对
public-keylocal create dsa  //创建本地dsa密钥对
ssh serverenable  //开启ssh服务
sftp serverenable  //开启sftp服务
ssh userzurkj service-type all authentication-type password
验证
  1. system-view
  2. sysname fw1
  3. undo info-center enable
  4. interface gigabitethernet 1/0/3
  5. description trust
  6. ip address 10.1.1.1 24
  7. manage ping inbound
  8. manage ping outbound
  9. manage ssh inbound
  10. quit
  11. interface loopback 0
  12. description managerment
  13. ip address 10.10.10.1 32
  14. quit
  15. security-zone name trust
  16. import interface gigabitethernet 1/0/3
  17. quit
  18. security-policy ip
  19. rule name ssh
  20. source-zone trust
  21. destination-zone local
  22. source-ip-host 10.1.1.100
  23. destination-ip-host 10.10.10.10
  24. service any
  25. action pass
  26. quit
  27. quit
  28. user-interface vty 0 63
  29. authentication-mode scheme
  30. protocol inbound all
  31. user-role network-admin
  32. idle-timeout 30
  33. quit
  34. local-user zurkj
  35. password simple Aa123456!!
  36. authorization-attribute user-role level-15
  37. service-type ssh http https
  38. quit
  39. public-key local create rsa
  40. y
  41. public-key local create dsa
  42. y
  43. ssh server enable
  44. sftp server enable
  45. ssh user zurkj service-type all authentication-type password
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2025-6-14 13:50 , Processed in 0.081191 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表