PPTP隧道连接应用实例_第1页
PPTP隧道连接应用实例_第2页
PPTP隧道连接应用实例_第3页
PPTP隧道连接应用实例_第4页
PPTP隧道连接应用实例_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、pptp隧道连接应用实例以下是一个使用互联网上的加密pptp隧道连接两个企业网局域网的例子:在这个例子中有两个不同地区办公室的路由器,需要让两个办公局域网的主机之间实现互访:homeoffice 接口localhomeoffice 10.150.2.254/24接口tointernet 192.168.80.1/24remoteoffice 接口tointernet 192.168.81.1/24接口 localremoteoffice 10.150.1.254/24每个路由器连接到当地的isp,任何一个路由器可以通过互联网访问到对端的路由器。homeoffice配置在homeoffice端建

2、立pptp服务器,首先我们进入/ppp secret目录下添加客户端账号:adminhomeoffice ppp secret> add name=ex service=pptp password=123456local-address=10.0.103.1 remote-address=10.0.103.2adminhomeoffice ppp secret> print detailflags: x - disabled 0 name="ex" service=pptp caller-id="" password="123456

3、" profile=default local-address=10.0.103.1 remote-address=10.0.103.2 routes="" adminhomeoffice ppp secret>winbox操作如下:在interface pptp-server server目录下,启用pptp服务器:adminhomeoffice interface pptp-server server> set enabled=yesadminhomeoffice interface pptp-server server> print ena

4、bled: yes mtu: 1460 mru: 1460 authentication: mschap2 default-profile: defaultadminhomeoffice interface pptp-server server>winbox下配置进入ppp目录下启用pptp server:remoteoffice配置在remoteoffice路由器添加一个pptp客户:adminremoteoffice interface pptp-client> add connect-to=192.168.80.1 user=ex . password=123456 disa

5、bled=noadminremoteoffice interface pptp-client> printflags: x - disabled, r - running 0 r name="pptp-out1" mtu=1460 mru=1460 connect-to=192.168.80.1 user="ex" password="123456" profile=default add-default-route=no adminremoteoffice interface pptp-client>winbox在int

6、erface中添加pptp-client这样,一个pptp隧道就在路由器之间创建好了。这个隧道就像在ip地址为10.0.103.1及10.0.103.2的路由器之间的三层点对点连接。pptp局域网的互访pptp隧道建立完成后,仅是路由器间可以互访,但两个企业间的局域网需要通过设置路由完成连接为了在pptp隧道上互访企业间本地网络,需要添加以下路由:adminhomeoffice > ip route add dst-address=10.150.1.0/24 gateway=10.0.103.2adminremoteoffice > ip route add dst-address

7、=10.150.2.0/24 gateway=10.0.103.1或者也可以在pptp服务器(homeoffice)上通过用户配置的routes参数完成,remoteoffice还是需要在/ip route中配置路由:adminhomeoffice ppp secret> print detailflags: x - disabled 0 name="ex" service=pptp caller-id="" password="123456" profile=default local-address=10.0.103.1 r

8、emote-address=10.0.103.2 routes="" adminhomeoffice ppp secret> set 0 routes="10.150.1.0/24 10.0.103.2 1"adminhomeoffice ppp secret> print detailflags: x - disabled 0 name="ex" service=pptp caller-id="" password="123456" profile=default local-ad

9、dress=10.0.103.1 remote-address=10.0.103.2 routes="10.150.1.0/24 10.0.103.2 1" adminhomeoffice ppp secret>目的路由:10.150.1.0/24pptp的网关:10.0.103.2distance路径: 1winbox中修改routes参数测试pptp隧道连接:adminremoteoffice> /ping 10.0.103.110.0.103.1 pong: ttl=255 time=3 ms10.0.103.1 pong: ttl=255 time=3

10、ms10.0.103.1 pong: ttl=255 time=3 msping interrupted3 packets transmitted, 3 packets received, 0% packet lossround-trip min/avg/max = 3/3.0/3 ms测试通过pptp隧道到localhomeoffice接口的连接:adminremoteoffice> /ping 10.150.2.25410.150.2.254 pong: ttl=255 time=3 ms10.150.2.254 pong: ttl=255 time=3 ms10.150.2.254

11、 pong: ttl=255 time=3 msping interrupted3 packets transmitted, 3 packets received, 0% packet lossround-trip min/avg/max = 3/3.0/3 ms通过pptp隧道连接终端客户下面的例子显示了通过终端电脑与远程办公网络进行pptp加密隧道通信,如外地出差的同时,通过笔记本电脑连接会公司的网络进行远程信息管理和查询这个例子中的路由器:remoteoffice 接口tointernet 192.168.81.1/24接口office 10.150.1.254/24在pptp服务器上设

12、置用户帐号:adminremoteoffice ppp secret> add name=ex service=pptp password=123456local-address=10.150.1.254 remote-address=10.150.1.2adminremoteoffice ppp secret> print detailflags: x - disabled 0 name="ex" service=pptp caller-id="" password="123456" profile=default lo

13、cal-address=10.150.1.254 remote-address=10.150.1.2 routes="" adminremoteoffice ppp secret>启用pptp服务:adminremoteoffice interface pptp-server server> set enabled=yesadminremoteoffice interface pptp-server server> print enabled: yes mtu: 1460 mru: 1460 authentication: mschap2 default-

14、profile: defaultadminremoteoffice interface pptp-server server>在笔记本电脑访问回公司后,需要访问内部网络资源,需要配置规则才能确保通常,有两种方法:局域网连接方法1:代理arp必须在'office'接口上启用,这样可以通过代理arp访问,但有个缺点是内外的dhcp服务可能会受到影响:adminremoteoffice interface ethernet> set office arp=proxy-arpadminremoteoffice interface ethernet> printflag

15、s: x - disabled, r - running # name mtu mac-address arp 0 r tointernet 1500 00:30:4f:0b:7b:c1 enabled 1 r office 1500 00:30:4f:06:62:12 proxy-arpadminremoteoffice interface ethernet>在winbox中进入interface目录下,选择office接口设置arp为proxy-arp局域网连接方法2:通过nat设置masquerade,规则要求对所有来访数据进行伪装,这样保证内外网通过转换通信adminremoteoffice /ip firewall nat> add chain=srcn

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论