| 
 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可视终端 
 以下为脚本 复制代码system-view
sysname fw1
undo info-center enable
interface gigabitethernet 1/0/2
description trust
ip address 10.1.1.1 24
manage ping inbound
manage ping outbound
manage telnet inbound
quit
interface loopback 0
ip address 10.10.10.10 32
description managerment
quit
security-zone name trust
import interface gigabitethernet 1/0/2
quit
security-policy ip
rule 5 name telnetftp
source-zone trust
destination-zone local
source-ip-host 10.1.1.100
destination-ip-host 10.10.10.10
service any
action pass
quit
quit
user-interface vty 0 63
authentication-mode scheme
idle-timeout 30
protocol inbound all
user-role network-admin
quit
local-user zurkj
password simple Aa123456!!
authorization-attribute user-role level-15
service-type ftp 
service-type telnet
quit
ftp server enable
telnet server enable
return
save force
复制代码system-view
interface loopback 1
ip address 100.100.100.100 32
quit
save new.cfg
dir
more new.cfg
display startup
startup saved-configuration new.cfg
display startup
reboot
y
 |