! 设置主机名
hostname FW1
! 禁用IP域名查找,加快命令执行速度
no ip domain-lookup
! 配置密码和登录设置
enable secret <your_enable_password>
username <your_username> secret <your_user_password>
line vty 0 15
login local
transport input ssh
line console 0
logging synchronous
login local
exec-timeout 10 0
! 生成SSH密钥,启用SSH
crypto key generate rsa general-keys modulus 2048
ip ssh version 2
! 配置接口
! 请根据您的实际需求更改接口类型和编号
interface GigabitEthernet0/0
description INSIDE
ip address <your_inside_interface_ip> <your_inside_interface_subnet_mask>
no shutdown
nameif inside
security-level 100
interface GigabitEthernet0/1
description OUTSIDE
ip address <your_outside_interface_ip> <your_outside_interface_subnet_mask>
no shutdown
nameif outside
security-level 0
! 配置访问控制列表(ACL)
access-list OUTSIDE_IN extended permit icmp any any echo-reply
access-list OUTSIDE_IN extended deny ip any any
access-group OUTSIDE_IN in interface outside
! 配置网络地址转换(NAT)
object network INSIDE_NET
subnet <your_inside_subnet> <your_inside_subnet_mask>
nat (inside,outside) dynamic interface
! 配置默认路由
route outside 0.0.0.0 0.0.0.0 <your_default_gateway> 1
! 保存配置
wr