当前位置:网站首页>ASA如何配置端口映射及PAT
ASA如何配置端口映射及PAT
2022-06-25 22:11:00 【XMWS_IT】
实验拓扑图
实验目标
把R1的telnet服务(端口23)映射到ASA1的外网口G0口的端口12345,使外网可以访问它;配置PAT使内网可以访问公网。
实验步骤
1.基本配置
R1:(模拟一台PC)
int f0/0
ip add 192.168.10.1 255.255.255.0
no sh
no ip routing
ip default-gateway 192.168.10.254
line vty 0 4
password cisco
login
enable password cisc
ASA1:
int g0
nameif outside
ip add 202.100.1.1 255.255.255.0
no sh
int g1
nameif inside
ip add 192.168.10.254 255.255.255.0
no s
2.在ASA1上配置映射R1的telnet服务(端口23):
ASA1:
#object network outside_telnet_inside - - - - - - - -新建一个名字叫“outside_telnet_inside”的网络对象
#host 192.168.10.1 - - - - - - - - -定义网络对象的地址,也可以是一个网段
# nat (inside,outside) static interface service tcp 23 12345 - - - - - 把所定义的地址的23端口映射到外网口的端口12345,注意,参数“static”用打问号的方式是不会显示的,但是可以TAB出来。
#access-list 100 permit tcp any host 192.168.10.1 eq 23 - - - - - - -写ACL允许外网访问内网特定地址的端口23,注意,与旧版IOS不同的是,这里允许访问的地址并不是外网口的地址,而是要映射出去的内网的真实地址。
#access-group 100 in interface outside - - - - - - - 把ACL应用在外网
3.在ASA1上配置PAT使内网可以访问外网:
#object network inside
#subnet 192.168.10.0 255.255.255.0
#nat (inside,outside) dynamic interface - - - - - - - - -把内网网段192.168.10.0/24做PAT,注意,与“static”一样,“dynamic”也是“?”不出来的,但是可以Tab出来。
验证:
PAT:
R1上:
端口映射:
Internet 上:
边栏推荐
- PHP interprocess pass file descriptor
- Sword finger offer 48 Longest substring without duplicate characters
- STEP7主站与远程I/O组网_过路老熊_新浪博客
- 说说单例模式!
- SSM integrated learning notes (mainly ideas)
- Talk about how to hot restart a spoole or PHP cli process
- Hand made pl-2303hx USB to TTL level serial port circuit_ Old bear passing by_ Sina blog
- Bit Compressor [蓝桥杯题目训练]
- Object类常用方法
- JS中的原型链面试题--Foo和 getName
猜你喜欢
寻找翻转数组的最小值[抽象二分]
数组常用的一些操作方法
DPVS-FullNAT模式管理篇
SSM integrated learning notes (mainly ideas)
Circuit de fabrication manuelle d'un port série de niveau USB à TTL pour PL - 2303hx Old bear passing Sina blog
postman如何测试需要登录的接口
Line height for small use
社交网络可视化第三方库igraph的安装
Hand made pl-2303hx USB to TTL level serial port circuit_ Old bear passing by_ Sina blog
iomanip头文件在实战中的作用
随机推荐
iomanip头文件在实战中的作用
猕猴桃酵素的功效_过路老熊_新浪博客
Stream in PHP socket communication_ Understanding of select method
WINCC与STEP7的仿真连接_过路老熊_新浪博客
Number array de duplication in JS
Px4 multi computer simulation (gazebo)
How to configure SQL Server 2008 Manager_ Old bear passing by_ Sina blog
Common problems encountered when creating and publishing packages using NPM
Static keyword explanation
Studio5k v28安装及破解_过路老熊_新浪博客
IDEA常用快捷键
Talk about the copy on write mechanism of PHP variables or parameters
在step7中实现模拟量数值与工程量数值之间的转换_过路老熊_新浪博客
谈一谈PHP变量或参数的Copy On Write机制
社交网络可视化第三方库igraph的安装
西门子S7-200PLC和丹佛斯变频器的通讯协议改造_过路老熊_新浪博客
line-height小用
MySQL version upgrade + data migration
支付宝支付接口沙箱环境测试以及整合到一个ssm电商项目中
One article explains R & D efficiency! Your concerns are