• 41

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


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

好文,
推一下.
終於有頭緒,恭喜大大,賀喜大大,該篇可收藏與珍藏阿!

gfx wrote:
我的N16是掛在有線...(恕刪)
請問可否幫忙看看android端無法連線原因?

router端log:
May 13 10:54:48 daemon.notice openvpn[28612]: MULTI: multi_create_instance called
May 13 10:54:48 daemon.notice openvpn[28612]: Re-using SSL/TLS context
May 13 10:54:48 daemon.notice openvpn[28612]: LZO compression initialized
May 13 10:54:48 daemon.notice openvpn[28612]: Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
May 13 10:54:48 daemon.notice openvpn[28612]: Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
May 13 10:54:48 daemon.notice openvpn[28612]: TCP connection established with 202.155.201.180:52375
May 13 10:54:48 daemon.notice openvpn[28612]: Socket Buffers: R=[131072->131072] S=[131072->131072]
May 13 10:54:48 daemon.notice openvpn[28612]: TCPv4_SERVER link local: [undef]
May 13 10:54:48 daemon.notice openvpn[28612]: TCPv4_SERVER link remote: xxxxxxxxxxxxx
May 13 10:54:48 daemon.notice openvpn[28612]: xxxxxxxxxxx TLS: Initial packet from xxxxxxxxxxx, sid=70bbb55c dc34efa6
May 13 10:54:48 daemon.err openvpn[28612]: xxxxxxxxxxx TLS_ERROR: BIO read tls_read_plaintext error: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
May 13 10:54:48 daemon.err openvpn[28612]: xxxxxxxxxxx TLS Error: TLS object -> incoming plaintext read error
May 13 10:54:48 daemon.err openvpn[28612]: xxxxxxxxxxx TLS Error: TLS handshake failed
May 13 10:54:48 daemon.err openvpn[28612]: xxxxxxxxxxx Fatal TLS error (check_tls_errors_co), restarting
May 13 10:54:48 daemon.notice openvpn[28612]: xxxxxxxxxxx SIGUSR1[soft,tls-error] received, client-instance restarting
May 13 10:54:48 daemon.notice openvpn[28612]: TCP/UDP: Closing socket


android端log:
TCP rev EOF
Transport Error: Transport error on 'xxxxxxxxx:NETWORK_EOF_ERROR
Client terminated, restarting in 2....
EVENT:RECONNECTING
LZO-ASYM int swap=0 asym=0
EVENT:RESOLVE
Contacting xxxxxxxx:443 via TCP
EVENT:WAIT
Connecting to yyyyyyyy:443(xxxxxxxx) via TCPv4
EVENT:CONNECTING
Tunnel Options:V4,dev-type tun,link mtu=544,tun-mtu 1500,proto TCPv4_CLIENT,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client
Peer Info:IV_GUI_VER=net.openvpn.connect.android 1.1.13-53
IV_VER=3.0
IV_PLAT=android
IV_NCP=1
IV_LZO=1

阿早知道我的N16就不要賣掉了@@a

lagmon wrote:
請問可否幫忙看看an...(恕刪)

您是使用"OpenVPN Connect"這套App嗎?
我試過Android或iOS只有這套可連接Tomato OpenVPN, 其它的都會顯示失敗.
我正是使用這個APP,無論如何都連不上

另外我使用LAPTOP連線時如果撥號是用IP進行的話大概每15分鐘連接會重啟一次

如果用ddns撥號的話則重啟過後客戶端log會提示
RESOLVE: Cannot resolve host address: xxxxxxxxxxxx: [NO_DATA] The requested name is valid but does not have an IP address

就是說如果我用域名撥號15分鐘就斷線了

但是我撥號成功的時候是可以成功PING到DDNS的域名並解析出IP,並且流量也是走在VPN隧道裡面。請問有沒有什麼方法能夠解決?

lagmon wrote:
我正是使用這個APP...(恕刪)

我手機client.ovpn設定給您參考,看您能否正常連線.
client
dev tun
remote 144.X.X.X 443
proto tcp
comp-lzo
redirect-gateway

<ca>
WordPad開啟ca.crt,然後將文字複製至此
</ca>

<cert>
WordPad開啟client.crt,然後將文字複製至此
</cert>

<key>
WordPad開啟client.key,然後將文字複製至此
</key>

gfx wrote:
我手機client....(恕刪)


經測試也是同樣原因無法連線

ulimie wrote:
先確定 Route, Basic/Time 設定正確。
OpenVPN 運作正常與否跟系統時間是否正確有絕對關係。
所以, 在下認為比較可能的方嚮應該是往前追 RB-450G 的設定。
是不是這樣, 只需把 N16 放在最前面看是否可運作, 就很清楚了。
由於在下沒有, 而且不是很瞭解 RB-450G, 所以無法提供解決方案。


viper2000 wrote:
今天遇斷電只好把RT-N16重開機了(只有重開機,沒清NVRAM)
所以重開機後,NTP問題一樣擺爛在那.

我用Telnet進入了RT-N16後台,試Ping蕃茄的台灣NTP伺服器.
Ping的到台灣NTP伺服器,但用命令卻無法掛上,會顯示錯誤.
換成亞洲的NTP伺服器也是如此.

靈光一閃突然想到RB450G內建NTP Server,所以試掛看看.
沒想到竟給我掛成了

雖然不知道原因,但至少知道時間設定好,OpenVPN Server也才可用...哈哈

今天手機OpenVPN Connection又無故無法上線,回家查詢RT-N16(Tomato)又發現Clock未更新,
導致連帶影響了OpenVPN連線.

但這次Clock更新錯誤卻是Tomato自己引起的,在設定Clock地方最下面多了個封鎖的ip,
也就是Tomato自己把設定的NTP Server給封鎖掉,Clock當然更新失敗.

把封鎖的ip給刪除,Tomato時間則又正常更新,OpenVPN也恢復正常了.

但我納悶為何Tomato自己封鎖NTP Server,是判定被攻擊嗎?
我想取消封鎖NTP Server的功能,因為3個月來已有兩次相同的問題影響了OpenVPN連線,
感覺很厭煩呀!

gfx wrote:
但這次Clock更新錯誤卻是Tomato自己引起的,在設定Clock地方最下面多了個封鎖的ip,
也就是Tomato自己把設定的NTP Server給封鎖掉,Clock當然更新失敗.

沒碰過, 沒見過這情形。
清 NVRAM 看看?
  • 41
內文搜尋
X
評分
評分
複製連結
請輸入您要前往的頁數(1 ~ 41)
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?