[分享]用兩台ASUS RT-N16(Tomato)建置兩地同網段的VPN


rallyspeed wrote:
看起來似乎已經翻牆成功,但又不像是rontzong兄您說的那樣子...
但您別誤會唷,小弟沒有在challenge您的意思,只是希望了解是不是小弟還是有哪邊設定錯誤,所以翻牆成功只是暫時的假象???...(恕刪)


有成功達到您要翻牆的需求就好,恭喜您成功了.

小弟當初建構VPN環境只是為了橋接異地的網路設備,並不是為了翻牆,
翻牆是剛好有網友提問,小弟順道做了一些測試,後來就沒有再深入研究了..

兄台,有成功的經驗在這裡和大家分享,教學相長,大家都更上一層樓.
Mobile01就是需要像您一樣,願意分享心得的人.
rallyspeed wrote:
小弟現在被搞得非常混亂...


因為我使用金鑰的方式,所以一開始沒加入此討論。 分享我的經驗如下:

當使用redirect-gateway,實體網路卡的gateway會消失,網路都由家裡RT-N16(192.168.1.103)出去。



用#redirect-gateway(沒整個轉向,但已經接上家裡VPN),兩個gateway都存在。



此時要用route定義走那個gateway。



以上圖而言,一般(0.0.0.0)走17......254(Metric 1)。 但我有route 23.32.*、31.13.*等繞過家裡(192.168.1.103)。

所以到底走哪一條路,看route print應該可以明瞭。 以上是我的經驗。
linshengchih wrote:
當使用redirect-gateway,實體網路卡的gateway會消失,網路都由家裡RT-N16(192.168.1.103)出去。

#redirect-gateway(沒整個轉向,但已經接上家裡VPN),兩個gateway都存在。
此時要用route定義走那個gateway。...(恕刪)


在 '*.ovpn' 檔中,敍述#redirect-gateway, '' 是 '註解' 的意思,
不想讓該列指令指行時可以用這個方式 '遮住' 它.
就像c語言裡寫註解是 '/*' , Linux裡寫註解是 '' 一樣.
所以,#redirect-gateway,有寫等於沒寫,沒作用.

當一個LAN裡存在2個以上的Gateway時,是可以透過改變 'Default Gateway' 或 'Route Table'
去指定要傳送到外網封包的閘道出口,您的情況就是這個道理.
rontzong wrote:
在 '*.ovpn'...(恕刪)

小弟今兒個來到了對岸...
驗證了真的翻牆成功~~ 呵呵呵
真的比之前的PPTP穩多了!
真的是拜各位先進不吝分享所賜啊~~~
甘溫啊~~XD
請問有沒有試過tomato連其他設備untanlge的openvpn呢?小弟想試tun的openvpn但無耐不知道為啥tomato的openvpn無法啟用!有先進可以指點一二??
OpenVPN我想學習使用一個Server對多個Clients,
將VPN Server的Authorization Mode改為TLS.

憑證及金鑰檔案製作步驟卡在7~9


三個視窗最後都是Country Name <2 letter code> [TW]:
代表指令還沒跑完,請問是要輸入什麼?
需要多個Client端時就執行
build-key client1
build-key client2
build-key client3
  .
  .
結尾多個Client是怎麼代入到步驟7~9

麻煩再請釋疑,謝謝!!



gfx wrote:
三個視窗最後都是Country Name <2 letter code> [TW]:
代表指令還沒跑完,請問是要輸入什麼?...(恕刪)


中括號 '[TW]' 內的是 'default' 值,不想改變它就直接按 Enter 進行下一步,
大部份的步驟您都可以這樣處理,但有些地方不行.

iamleont兄,在本討論串第212樓已有說明,請參考.
我在憑證及金鑰檔案製作步驟8,內容為:
C:\Program Files\OpenVPN\easy-rsa>build-key-server server
Loading 'screen' into random state - done
Generating a 1024 bit RSA private key
........++++++
...........................++++++
writing new private key to 'keys\server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [TW]:
State or Province Name (full name) [TW]:
Locality Name (eg, city) [Taipei]:
Organization Name (eg, company) [home]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address [xxxxxxxx@yahoo.com.tw]:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from openssl.cnf
Loading 'screen' into random state - done
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'TW'
stateOrProvinceName :PRINTABLE:'TW'
localityName :PRINTABLE:'Taipei'
organizationName :PRINTABLE:'home'
emailAddress :IA5STRING:'xxxxxxxx@yahoo.com.tw'
The commonName field needed to be supplied and was missing
找不到 C:\Program Files\OpenVPN\easy-rsa\keys\*.old

結果生成的server.crt內容竟空無一物!?


結果Server Certificate欄也只好跟著空白...


這樣的OpenVPN Server可以用嗎? 似乎不行...
另外步驟9生成Client.crt也都是空白憑證,怎麼回事呢?

gfx wrote:
我在憑證及金鑰檔案製...(恕刪)


您前一樓 blockquote 內容的第19、20列,其內容 default 是空白,
不可只按 Enter 跳過它,得 Key in 一些字串才行。
rontzong wrote:
您前一樓 block...(恕刪)
謝謝,
我已經弄懂您為何要我看212樓的用意了.
關閉廣告
文章分享
評分
評分
複製連結
請輸入您要前往的頁數(1 ~ 41)

今日熱門文章 網友點擊推薦!