外网Telnet虚拟机,及nat配置等
环境整体是使用GNS3,通过cloud真实连接到虚拟机
cloud1 | nginx主机 |
---|---|
cloud2 | nginx主机https连接 |
cloud3 | Internet测试主机 |
下面贴每个网络设备配置,特别注意,公司网关路由和Internet路由其的配置
配置这里就不解释了,主要注意下,公司网关路由的NAT配置,着实难受些
- ESW3交换机
ESW3#sh run
Building configuration...
Current configuration : 2364 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname ESW3
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
--More--
*Mar 1 02:06:32.867: %SYS-5-CONFIG_I: Configured from console no ip cefe
no ip domain lookup
vtp file nvram:vlan.dat
interface FastEthernet1/0
switchport access vlan 3
duplex full
speed 100
!
interface FastEthernet1/1
duplex full
speed 100
!
interface FastEthernet1/2
duplex full
speed 100
!
interface FastEthernet1/3
duplex full
speed 100
!
interface FastEthernet1/4
duplex full
speed 100
!
interface FastEthernet1/5
switchport access vlan 4
duplex full
speed 100
!
interface FastEthernet1/6
duplex full
speed 100
!
interface FastEthernet1/7
duplex full
speed 100
!
interface FastEthernet1/8
duplex full
speed 100
!
interface FastEthernet1/9
duplex full
speed 100
!
interface FastEthernet1/10
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/11
duplex full
speed 100
!
interface FastEthernet1/12
duplex full
speed 100
!
interface FastEthernet1/13
duplex full
speed 100
!
interface FastEthernet1/14
duplex full
speed 100
!
interface FastEthernet1/15
duplex full
speed 100
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
interface Vlan4
ip address 192.168.4.10 255.255.255.0
!
ip default-gateway 192.168.4.1
no ip http server
no ip http secure-server
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
password cisco
login
!
!
end
- ESW1配置
sw1#sh run
Building configuration...
Current configuration : 2244 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname sw1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
vtp file nvram:vlan.dat
interface FastEthernet1/0
switchport access vlan 2
duplex full
speed 100
!
interface FastEthernet1/1
duplex full
speed 100
!
interface FastEthernet1/2
duplex full
speed 100
!
interface FastEthernet1/3
duplex full
speed 100
!
interface FastEthernet1/4
duplex full
speed 100
!
interface FastEthernet1/5
switchport access vlan 2
duplex full
speed 100
!
interface FastEthernet1/6
duplex full
speed 100
!
interface FastEthernet1/7
duplex full
speed 100
!
interface FastEthernet1/8
duplex full
speed 100
!
interface FastEthernet1/9
duplex full
speed 100
!
interface FastEthernet1/10
duplex full
speed 100
!
interface FastEthernet1/11
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/12
duplex full
speed 100
!
interface FastEthernet1/13
duplex full
speed 100
!
interface FastEthernet1/14
duplex full
speed 100
!
interface FastEthernet1/15
duplex full
speed 100
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
no ip http server
no ip http secure-server
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
login
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
- ESW2
ESW2#sh run
Building configuration...
Current configuration : 2427 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname ESW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
vtp file nvram:vlan.dat
interface FastEthernet1/0
duplex full
speed 100
!
interface FastEthernet1/1
duplex full
speed 100
!
interface FastEthernet1/2
duplex full
speed 100
!
interface FastEthernet1/3
duplex full
speed 100
!
interface FastEthernet1/4
duplex full
speed 100
!
interface FastEthernet1/5
duplex full
speed 100
!
interface FastEthernet1/6
duplex full
speed 100
!
interface FastEthernet1/7
duplex full
speed 100
!
interface FastEthernet1/8
duplex full
speed 100
!
interface FastEthernet1/9
duplex full
speed 100
!
interface FastEthernet1/10
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/11
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/12
duplex full
speed 100
!
interface FastEthernet1/13
duplex full
speed 100
!
interface FastEthernet1/14
duplex full
speed 100
!
interface FastEthernet1/15
no switchport
ip address 10.0.0.1 255.255.255.252
duplex full
speed 100
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
!
interface Vlan4
ip address 192.168.4.1 255.255.255.0
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 10.0.0.2
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
end
- 公司网关路由
R1#sh run
Building configuration...
Current configuration : 1534 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 11.0.0.1 255.255.255.252
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 11.0.0.2
ip route 192.168.2.0 255.255.255.0 10.0.0.1
ip route 192.168.3.0 255.255.255.0 10.0.0.1
ip route 192.168.4.0 255.255.255.0 10.0.0.1
!
ip nat pool dynami 207.38.18.1 207.38.18.5 netmask 255.255.255.248
ip nat inside source list 3 pool dynami
ip nat inside source list 4 interface FastEthernet1/0 overload
ip nat inside source static tcp 192.168.4.10 23 interface FastEthernet1/0 23
ip nat inside source static tcp 192.168.2.2 80 145.52.23.6 80 extendable
ip nat inside source static tcp 192.168.2.3 443 145.52.23.6 443 extendable
!
access-list 3 permit 192.168.3.0 0.0.0.255
access-list 4 permit 192.168.4.0 0.0.0.255
no cdp log mismatch duplex
!
!
control-plane
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
- internet路由
isp#sh ru
*Mar 1 01:57:39.243: %SYS-5-CONFIG_I: Configured from console by console
isp#sh run
Building configuration...
Current configuration : 947 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname isp
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
interface FastEthernet0/0
ip address 172.16.0.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 11.0.0.2 255.255.255.252
duplex auto
speed auto
!
no ip http server
no ip http secure-server
!
ip route 145.52.23.0 255.255.255.248 11.0.0.1
ip route 192.168.4.0 255.255.255.0 11.0.0.1
ip route 207.38.18.0 255.255.255.248 11.0.0.1
no cdp log mismatch duplex
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
!
end
外网Telnet虚拟机,及nat配置等的更多相关文章
- VMware NAT端口映射外网访问虚拟机linux
本文目的: 一. SSH连接 二. 访问HTTP VMware Workstation提供了两种虚拟机上网方式,一种bridge,一种NAT,bridge可以获得公网地址,而NAT只能是内网地址了. ...
- VMware NAT端口映射外网访问虚拟机linux可能会出现的错误总结
博主因为做实验报告的缘故,尝试以NAT的方式从外网远程连接到虚拟机的linux操作系统:https://www.cnblogs.com/jluzhsai/p/3656760.html,本文主要举出在此 ...
- 外网访问虚拟机搭建的web服务
凌晨了,就简单写个一定可行的思路吧,有时间了再补上. 设置虚拟机为桥接模式,当然NAT也行,只是我嫌NAT麻烦 设置路由器,将虚拟机端口映射到外网
- Aliyun搭建svn服务器外网访问报错权限配置失败错误
搭建完后所有的配置如下 [root@iZuf655czz7lmtn8v15tsjZ conf]# pwd /home/SVN/conf [root@iZuf655czz7lmtn8v15tsjZ co ...
- 虚拟机上的centos连不了外网,吧原来的配置信息改成如下就行(删除了一些多余的信息,变化:原来的ONBOOT的值是no)
DEVICE=eth1BOOTPROTO=dhcpHWADDR=08:00:27:67:be:98ONBOOT=yes
- 虚拟机中的centos在nat模式下连不上外网
这两天需要配置ftp服务器,可是虚拟机在nat模式下死活连不上外网,主机能够通过该ssh与虚拟机进行连接,虚拟机也能ping同一网段主机的IP地址,但就是ping不通外网, 开始我是这样配置的: 主机 ...
- 配置多层NAT和端口映射实现外网访问内网
配置多层NAT和端口映射实现外网访问内网 背景和原理 通过配置NAT可以实现内网中不能直接访问外网的主机通过NAT代理访问内网,配置方法这里不再赘述(前文有介绍).本文以两层的NAT代理做模拟,通过端 ...
- 外网主机访问虚拟机下的web服务器(NAT端口转发)
主机:系统win7,ip地址172.18.186.210 虚拟机:VMware Workstation 7,虚拟机下安装了Centos操作系统,ip地址是192.168.202.128,部署了LAMP ...
- 配置NAT回流导致外网解析到了内网IP
单位有3个域名,用量很大,2014年开始本人研究部署了Bind+DLZ +Mysql的三机智能多链路DNS,非常好用,优点是: 1.使用Mysql管理记录,配置.管理.查询方便. 2.自动判断运营商, ...
随机推荐
- Hadoop记录-部署hadoop环境shell实现
#!/bin/bash menu() { echo "---欢迎使用hadoop部署管理程序---" echo "# 1.初始化Linux环境" echo &q ...
- 基于docker构建flink大数据处理平台
https://www.cnblogs.com/1ssqq1lxr/p/10417005.html 由于公司业务需求,需要搭建一套实时处理数据平台,基于多方面调研选择了Flink. 初始化Swarm环 ...
- Spring Cloud 如何实现服务间的调用 4.2.3
如果存在多个服务时,要怎么通过注册中心来实现服务之间的调用呢?接下来将通过一个用户和订单之间的调用案例,来演示Eureka Server中服务之间的调用. 搭建订单服务工程 在父工程xcservi ...
- systemctl service
一.systemctl常用命令 systemctl list-units ##列出当前系统服务的状态 systemctl list-unit-files ##列出服务 ...
- 用anaconda保证64位和32位的python共存
conda info # 查看当前工作平台 set CONDA_FORCE_32BIT=1 # 切换到32位 set CONDA_FORCE_32BIT=0 # 切换到64位 conda create ...
- Linux 指令表
Linux简介(了解) Linux介绍 Linux是类UNIX计算机的统称 Linux操作系统的内核也是Linux Linux是由芬兰大学生Linux Torvalds于1991年编写的 Linux这 ...
- 软件素材---C/C++格式化显示当前时间--标准函数strftime
函数原型:size_t strftime (char* ptr, size_t maxsize, const char* format,const struct tm* timeptr ); 头文件: ...
- 使用jetpack 4.2.2对jetson tx2进行刷机
一.前言 加班加点几天今天终于成功刷机,记录一下成功的一些过程,以方便同样卡住的朋友参考. 延续官网教程[1]中对设备的叫法,pc机称为host,tx2称为target. 二.过程 1. host相关 ...
- Python3实现自动查询成绩(主要使用的包有Tesseract-OCR、PIL、execjs、pytesseract、BeautifulSoup)
前提:本文仅作为技术训练,不可利用技术做非法的事. 某考试的成绩查询页面如下:查询成绩需要的数据有准考证号或者身份证.考生姓名.验证码.现在使用python来实现自动查询指定人员的考试成绩(不知道准考 ...
- [SQL SERVER] - 还原数据库备份(SQL脚本),抛出 "System.OutOfMemoryException" 异常之解决
背景 在 Microsoft SQL Server 2016 的查询窗体中,直接还原备份数据库的 SQL 脚本(99MB),抛出 Cannot execute script 异常: 原因 相关资料说: ...