思科防火墙NAT——实验
创始人
2024-03-21 13:59:47
0

  • 作者简介:一名在校云计算网络运维学生、每天分享网络运维的学习经验、和学习笔记。 

  •  座右铭:低头赶路,敬事如仪

  • 个人主页:网络豆的主页​​​​​​

目录

前言

 1.实验

防火墙配置

其他配置


前言

本章将会讲解思科NAT配置的实验

 1.实验


防火墙配置

ciscoasa> en
ciscoasa# conf t
ciscoasa(config)# int e0/0
ciscoasa(config-if)# nameif outside
ciscoasa(config-if)# ip add 202.106.0.1 255.255.255.0
ciscoasa(config-if)# no sh
ciscoasa(config-if)# exit

ciscoasa(config)# int e0/1
ciscoasa(config-if)# nameif inside
ciscoasa(config-if)# ip add 10.0.0.2 255.255.255.252
ciscoasa(config-if)# no sh
ciscoasa(config-if)# exit

配置对外网的默认路由
ciscoasa(config)# route outside 0.0.0.0 0.0.0.0 202.106.0.2

配置对内网的静态路由
ciscoasa(config)# route inside 192.168.1.0 255.255.255.0 10.0.0.1
ciscoasa(config)# route inside 192.168.2.0 255.255.255.0 10.0.0.1

配置 动态nat  将内网俩个网段转换到 外网 202.106.0.10-202.106.0.20 的地址范围内
ciscoasa(config)# nat (inside) 1 192.168.0.0 255.255.0.0
ciscoasa(config)# global (outside) 1 202.106.0.10-202.106.0.20


其他配置

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#ip add 10.0.0.1 255.255.255.252
R1(config-if)#no sh

R1(config-if)#int f0/1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no sh

R1(config-if)#int f1/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#

R1(config-if)#exit

R1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2


R2
R2(config)#int f0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#exit
R2(config)#no ip routing
R2(config)#ip default-gateway 192.168.1.1
R2(config)#exit



R3(config)#int f0/0
R3(config-if)#ip add 192.168.2.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit

R3(config)#no ip routing
R3(config)#ip default-gateway 192.168.2.1              



R4(config)#int f0/0
R4(config-if)#ip add 202.106.0.2 255.255.255.0
R4(config-if)#no sh

R4(config-if)#int f0/1
R4(config-if)#ip add 203.0.0.1 255.255.255.0
R4(config-if)#no sh



R6(config)#int f0/0
R6(config-if)#ip add 203.0.0.2 255.255.255.0
R6(config-if)#no sh
R6(config-if)#exit
R6(config)#no ip routing

R6(config)#ip default-gateway 203.0.0.1
R6(config)#exit

R6(config)#line vty 0 4
R6(config-line)#password 123
R6(config-line)#login
R6(config-line)#exit
R6(config)#enable password 123
 


  创作不易,求关注,点赞,收藏,谢谢~ 

相关内容

热门资讯

监控摄像头接入GB28181平... 流程简介将监控摄像头的视频在网站和APP中直播,要解决的几个问题是:1&...
Windows10添加群晖磁盘... 在使用群晖NAS时,我们需要通过本地映射的方式把NAS映射成本地的一块磁盘使用。 通过...
protocol buffer... 目录 目录 什么是protocol buffer 1.protobuf 1.1安装  1.2使用...
在Word、WPS中插入AxM... 引言 我最近需要写一些文章,在排版时发现AxMath插入的公式竟然会导致行间距异常&#...
Fluent中创建监测点 1 概述某些仿真问题,需要创建监测点,用于获取空间定点的数据࿰...
educoder数据结构与算法...                                                   ...
MySQL下载和安装(Wind... 前言:刚换了一台电脑,里面所有东西都需要重新配置,习惯了所...
MFC文件操作  MFC提供了一个文件操作的基类CFile,这个类提供了一个没有缓存的二进制格式的磁盘...
有效的括号 一、题目 给定一个只包括 '(',')','{','}'...
【Ctfer训练计划】——(三... 作者名:Demo不是emo  主页面链接:主页传送门 创作初心ÿ...