用 MikroTik RouterOS 輕鬆建置 OPEN VPN Server

筆記一下
RouterOS 的 OVPN Server 配置好以後,Windows 7 Client 也可以連上
但是使用 ipconfig /all 去檢查取得的 IP 時,default gateway 卻是空的
而且還是沒有走 VPN 出去
Client 配置 redirect-gateway 也沒有用
查了幾天網路上的資料,最後在 Client config 加上以下這一行才可以
route add 0.0.0.0 mask 0.0.0.0 192.168.88.1 metric 1
(以上針對用 openvpn-2.0.9-gui-1.03)

如果是安裝新版本的openvpn-install-2.3.1-I001-x86_64.exe
就可以直接用 redirect-gateway def1
再筆記一下
OpenVPN Server 的 port 設定為 1194,但是想從公網用 port 80 連上
除了在 NAT 裡面要設定 redirect 外
/ip firewall nat
add action=redirect chain=dstnat disabled=no dst-port=80 in-interface=wan1 protocol=tcp to-ports=1194
防火牆裡面兩個 port 都要開
/ip firewall filter
add action=accept chain=input comment=OpenVPN disabled=no dst-port=1194 in-interface=wan1 protocol=tcp
add action=accept chain=input comment=OpenVPN disabled=no dst-port=80 in-interface=wan1 protocol=tcp

這樣 client 的設定就可以從 port 80 連上
只是不知道這樣是不是就可以繞開 GW 的阻擋

YAWPYNG wrote:
這裡介紹 Mikro...(恕刪)

請問YAWPYNG大,我也試著用RB450G架OpenVPN Server.
但連線沒有想像順利,訊息如下:
Thu Oct 10 22:47:22 2013 OpenVPN 2.3.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [eurephia] [IPv6] built on Aug 22 2013
Enter Management Password:
Thu Oct 10 22:47:29 2013 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Thu Oct 10 22:47:29 2013 Attempting to establish TCP connection with [AF_INET]111.249.139.13:443
Thu Oct 10 22:47:30 2013 TCP connection established with [AF_INET]111.249.139.13:443
Thu Oct 10 22:47:30 2013 TCPv4_CLIENT link local: [undef]
Thu Oct 10 22:47:30 2013 TCPv4_CLIENT link remote: [AF_INET]111.249.139.13:443
Thu Oct 10 22:47:30 2013 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Oct 10 22:47:30 2013 VERIFY ERROR: could not extract CN from X509 subject string ('C=TW, ST=TW, L=Taipei, O=home, emailAddress=xxxxxxxx@yahoo.com.tw') -- note that the username length is limited to 64 characters
Thu Oct 10 22:47:30 2013 TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Thu Oct 10 22:47:30 2013 TLS Error: TLS object -> incoming plaintext read error
Thu Oct 10 22:47:30 2013 TLS Error: TLS handshake failed
Thu Oct 10 22:47:30 2013 Fatal TLS error (check_tls_errors_co), restarting
Thu Oct 10 22:47:31 2013 SIGUSR1[soft,tls-error] received, process restarting


這樣訊息是否足夠判斷問題的所在呢?

gfx wrote:
試著用RB450G架OpenVPN Server...(恕刪)


請檢查證書是否都有設好.

YAWPYNG wrote:
請檢查證書是否都有設...(恕刪)

有的,我有將證書匯入!


證書是我自己的,但連線失敗後我也改匯入您分享的證書,但結果都是相同的錯誤訊息...


YAWPYNG wrote:
請檢查證書是否都有設...(恕刪)

請問您後來上傳到我的RB450G證書是之前公開的證書嗎?

我後來又匯入了另一組證書,但連線都會出狀況,唯有您新給的證書是可以連線的
不知是否為我的製作證書過程有誤,造成RB450G無法連線的窘況

但這些證書也都另外在RT-N16 OpenVPN Server驗證使用過的,我真的不懂..

YAWPYNG wrote:
請檢查證書是否都有設...(恕刪)

請問網路openvpn教學說ROS需上傳ca.crt ca.key dh1024.pem ,
但匯入動作卻沒dh1024.pem ,這是為什麼?
一直有個疑問

set KEY_COUNTRY=TW
set KEY_PROVINCE=TW
set KEY_CITY=Taiwan
set KEY_ORG=ovpn
set KEY_EMAIL=mail@host.domain

以上這些資訊
是按照你的設定固定嗎?

還是Email 和ORG 可以自由決定?
好文, mark!



YAWPYNG wrote:
這裡介紹 MikroTik...(恕刪)
請問大大,用ovpn連入時有辦法登入winbox嗎?我連進去之後都進不了winbox。上網那些都正常😭
文章分享
評分
評分
複製連結

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