最喜歡的解釋是這段, 沒有資訊背景的人也聽的懂
以日常生活的例子來比喻,虛擬私人網路就像:甲公司某部門的A想寄信去乙公司某部門的B。A已知B的地址及部門,但公司與公司之間的信不能註明部門名稱。於是,A請自己的秘書把指定B所屬部門的信(A可以選擇是否以密碼與B通訊)放在寄去乙公司地址的大信封中。當乙公司的秘書收到從甲公司寄到乙公司的信件後,該秘書便會把放在該大信封內的指定部門信件以公司內部郵件方式寄給B。同樣地,B會以同樣的方式回信給A。
VPN 設定
http://sofree.cc/vpn/
http://icc.web.ym.edu.tw/ezcatfiles/b032/img/img/856/VPN_Win7.pdf
如果遇到無法連線成功, 有可能是使用 L2TP 連線, window7 預設不開啟, 那可以 Smart VPN Client 來幫你開啟, 開啟後需要重新開機
http://www.draytek.com/user/SupportDLUtility.php
另外 L2TP 如果是使用預設金鑰的模式, 可以參考這篇設定
http://www.hideipvpn.com/2010/03/howto-windows-7-ipsecl2tp-vpn-setup-tutorial/
這是連線前的 routing table
===========================================================================
介面清單
10...1c 6f 65 21 74 2b ......Realtek PCIe GBE Family Controller
19...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
20...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
1...........................Software Loopback Interface 1
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
11...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
29...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================
IPv4 路由表
===========================================================================
使用中的路由:
網路目的地 網路遮罩 閘道 介面 計量
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 20
127.0.0.0 255.0.0.0 在連結上 127.0.0.1 306
127.0.0.1 255.255.255.255 在連結上 127.0.0.1 306
127.255.255.255 255.255.255.255 在連結上 127.0.0.1 306
192.168.1.0 255.255.255.0 在連結上 192.168.1.2 276
192.168.1.2 255.255.255.255 在連結上 192.168.1.2 276
192.168.1.255 255.255.255.255 在連結上 192.168.1.2 276
192.168.65.0 255.255.255.0 在連結上 192.168.65.1 276
192.168.65.1 255.255.255.255 在連結上 192.168.65.1 276
192.168.65.255 255.255.255.255 在連結上 192.168.65.1 276
D:\>tracert -d www.google.com
在上限 30 個躍點上
追蹤 www.l.google.com [74.125.31.103] 的路由:
1 <1 ms <1 ms <1 ms 192.168.1.1
2 16 ms 17 ms 17 ms 168.95.98.254
3 * 16 ms 16 ms 168.95.85.42
4 18 ms 18 ms 19 ms 211.22.226.1
5 18 ms 18 ms 18 ms 209.85.243.26
6 38 ms 18 ms 18 ms 209.85.250.103
8 28 ms 40 ms 32 ms 209.85.241.166
9 28 ms 31 ms 32 ms 72.14.203.103
這是連線後的 routing table, 可以發現多了一個 VPN 介面 (172.16.1.102)
routing table 也預設都從這個新介面出去 (0.0.0.0 => 172.16.1.102)
連結 VPN Server (60.251.132.28) 則設定成從原來的閘道 192.168.1.1 出去
===========================================================================
介面清單
28...........................VPN 連線
10...1c 6f 65 21 74 2b ......Realtek PCIe GBE Family Controller
19...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
20...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
1...........................Software Loopback Interface 1
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
11...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
29...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
===========================================================================
IPv4 路由表
===========================================================================
使用中的路由:
網路目的地 網路遮罩 閘道 介面 計量
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 4245
0.0.0.0 0.0.0.0 在連結上 172.16.1.102 21
60.251.132.28 255.255.255.255 192.168.1.1 192.168.1.2 4246
127.0.0.0 255.0.0.0 在連結上 127.0.0.1 4531
127.0.0.1 255.255.255.255 在連結上 127.0.0.1 4531
127.255.255.255 255.255.255.255 在連結上 127.0.0.1 4531
172.16.1.102 255.255.255.255 在連結上 172.16.1.102 276
192.168.1.0 255.255.255.0 在連結上 192.168.1.2 4501
192.168.1.2 255.255.255.255 在連結上 192.168.1.2 4501
192.168.1.255 255.255.255.255 在連結上 192.168.1.2 4501
192.168.65.0 255.255.255.0 在連結上 192.168.65.1 4501
192.168.65.1 255.255.255.255 在連結上 192.168.65.1 4501
192.168.65.255 255.255.255.255 在連結上 192.168.65.1 4501
D:\>ipconfig
Windows IP 設定
PPP 介面卡 VPN 連線:
連線特定 DNS 尾碼 . . . . . . . . :
IPv4 位址 . . . . . . . . . . . . : 172.16.1.102
子網路遮罩 . . . . . . . . . . . .: 255.255.255.255
預設閘道 . . . . . . . . . . . . .: 0.0.0.0
D:\>tracert -d www.google.com
在上限 30 個躍點上
追蹤 www.l.google.com [72.14.203.103] 的路由:
1 23 ms 23 ms 23 ms 172.16.1.3
2 25 ms 23 ms 23 ms 10.8.0.1
3 34 ms 32 ms 32 ms 60.251.132.254
4 28 ms 31 ms 40 ms 168.95.211.74
5 34 ms 32 ms 31 ms 211.22.226.1
6 34 ms 31 ms 32 ms 209.85.243.26
7 33 ms 32 ms 31 ms 209.85.250.103
8 28 ms 40 ms 32 ms 209.85.241.166
9 28 ms 31 ms 32 ms 72.14.203.103
D:\>tracert -d 60.251.132.28
在上限 30 個躍點上追蹤 60.251.132.28 的路由
1 <1 ms <1 ms <1 ms 192.168.1.1
2 26 ms 17 ms 37 ms 168.95.98.254
3 * * 16 ms 168.95.85.42
4 17 ms 19 ms 17 ms 168.95.209.73
5 19 ms 23 ms 24 ms 60.251.132.28
6 27 ms 24 ms 24 ms 60.251.132.28
不過其實 tracert 出來的結果讓我有點意外, 或者說和我猜的不一樣, 原以為他應該要透過 192.168.1.1 先連到 60.251.132.28, 再連到 172.16.1.102, 最後再連到 google.com
但結果卻沒有顯示連到 172.16.1.102 這段, 我想是因為 VPN 是架在 Layer 2 的服務, 送到 172.16.1.3 的封包, 應該都會被 VPN Client 轉包過, 然後送到 VPN Server, 所以 ping 這個服務並不知道自己送的東西曾經被轉包過, 也自然無法顯示出這段路徑
Reference:
http://zh.wikipedia.org/wiki/%E8%99%9B%E6%93%AC%E7%A7%81%E4%BA%BA%E7%B6%B2%E8%B7%AF
http://avp.toko.edu.tw/docs/class/3/VPN%20%E8%99%9B%E6%93%AC%E7%A7%81%E6%9C%89%E7%B6%B2%E8%B7%AF%E6%8A%80%E8%A1%93%E6%A6%82%E8%AA%AA(%E7%AA%84%E9%A0%BB).pdf http://life.different.idv.tw/scottwu/37.htm
http://www.cc.ntu.edu.tw/chinese/epaper/20070620_1004.htm
http://technet.microsoft.com/zh-tw/library/cc737500(v=ws.10).aspx
沒有留言:
張貼留言