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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

H3C防火墙配置telnet/ftp连接;保存导出配置文件,设置下一...

[复制链接]

212

主题

226

帖子

1371

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1371
发表于 6 天前 | 显示全部楼层 |阅读模式

H3C防火墙配置telnet/ftp连接;保存导出配置文件,设置下一次启动文件

1.   基本配置
system-view
sysname fw1
undoinfo-center enable
interfacegigabitethernet 1/0/2
descriptiontrust
ip address10.1.1.1 24
manage pinginbound
manage pingoutbound
manage telnetinbound  //接口放行telnet入站
quit
interfaceloopback 0  //配置环回口做为管理地址
ip address10.10.10.10 32
descriptionmanagerment  //配置接口描述
quit
security-zonename trust  //配置案例域
importinterface gigabitethernet 1/0/2  //接口加入安全域
quit
2.   配置安全策略
security-policyip   //配置安全策略
rule 5 nametelnetftp  //规则名称
source-zonetrust  //源安全域
destination-zonelocal  //目标安全域
source-ip-host10.1.1.100  //源主机地址
destination-ip-host10.10.10.10  //目标主机地址
service any  //放行全部服务
action pass  //动作执行为放行
quit
quit
3.   配置VTY虚拟用户
user-interfacevty 0 63  //配置VTY虚拟用户视图
authentication-modescheme  //身份证认模式为scheme类型AAA
idle-timeout30  //配置无动作登出时间
protocolinbound all  //放行全部协议入站
user-rolenetwork-admin  //绑定用户角色为网络管理员
quit
4.   配置用户/保存
local-userzurkj  //创建本地用户
passwordsimple Aa123456!!  //设置用户密码
authorization-attributeuser-role level-15  //配置用户角色授权属性为最高级别
service-typeftp  //用户开启ftp功能
service-typetelnet  //用户开启telnet功能
quit
ftp serverenable  //开启ftp服务
telnet serverenable  //开启telnet服务
return
save force  //保存
查看下一次的启动文件
displaystartup  

查看启动文件位置

修改设备配置
system-view
interfaceloopback 1
ip address100.100.100.100 32
quit
不覆盖保存,另存配置文件
save new.cfg

查看新配置文件变更
more new.cfg | included ip address

设置new.cfg文件为下一次启动配置
startup saved-configuration new.cfg

reboot  //重启生效
客户端下载配置文件

查看当前FTP文件目录

下载文件
如果是在CMD环境里,可以先配置一下本地FTP下载目录
lcd C:\Users\Administrator\Desktop
也可以通过FlashFXP可视终端

以下为脚本
  1. system-view
  2. sysname fw1
  3. undo info-center enable
  4. interface gigabitethernet 1/0/2
  5. description trust
  6. ip address 10.1.1.1 24
  7. manage ping inbound
  8. manage ping outbound
  9. manage telnet inbound
  10. quit
  11. interface loopback 0
  12. ip address 10.10.10.10 32
  13. description managerment
  14. quit
  15. security-zone name trust
  16. import interface gigabitethernet 1/0/2
  17. quit
  18. security-policy ip
  19. rule 5 name telnetftp
  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. idle-timeout 30
  31. protocol inbound all
  32. user-role network-admin
  33. quit
  34. local-user zurkj
  35. password simple Aa123456!!
  36. authorization-attribute user-role level-15
  37. service-type ftp
  38. service-type telnet
  39. quit
  40. ftp server enable
  41. telnet server enable
  42. return
  43. save force
复制代码
  1. system-view
  2. interface loopback 1
  3. ip address 100.100.100.100 32
  4. quit
  5. save new.cfg
  6. dir
  7. more new.cfg
  8. display startup
  9. startup saved-configuration new.cfg
  10. display startup
  11. reboot
  12. y
复制代码

本帖子中包含更多资源

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

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

使用道具 举报

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

本版积分规则

公司网站

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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