本帖最後由 solexkey 於 2016-10-10 11:32 編輯

雯雯 發表於 2016-10-9 20:25


當時OpenConnect 試用 ID/Password authentication 時,一work咗之後即時跳去改用certificate用到而家
當時ID/Password authentication點整到work,有D細節真喺唔記咗

今晚用個testing router從零開始去make it work again,Recall番D嘢,相信揾到你個問題

1) OpenWRT version 依舊15.05, 跟住
      opkg update
      opkg install ocserv
      opkg install luci-app-ocserv   
      opkg install luci-app-ddns

2)  最大問題喺 ocserv luci 介面所create嘅 ID/Password 喺save响 /var/etc/ocpasswd, 而唔喺一般sample所講所指嘅/etc/ocserv/ocpasswd

3)  所以OpenConnect server 如果用 ID/Password authentication, configuraion template 嘅 第一句要喺
      auth = "plain[/var/etc/ocpasswd]"
      template其他內容可以参考茶室嗰邊tomleehk嗰template sample,可以改番fit你嗰邊network environment嘅parameter,應該有D parameter喺用cert先有用,不過慳時間我都喺成個攞哂同改,跟住成個paste番落去replace原本嗰template

4)  Modify firewall rules via LUCI (Network/Firewall/Custom Rules)
      iptables -I INPUT -p tcp --dport 443 -j ACCEPT
      iptables -I INPUT -p udp --dport 443 -j ACCEPT
      iptables -I FORWARD -i vpns+ -s 192.168.60.0/24 -j ACCEPT
      iptables -I INPUT -i vpns+ -s 192.168.60.0/24 -j ACCEPT
     可以改番fit你嗰邊network environment嘅parameter

5) OpenConnect server LUCI 個介面, Routing Table嗰到, 記得delete 192.168.1.0條entry,
     如果唔喺,就算connect到之後都番唔到牆

6)其他D setting(OpenWRT,DDNS,或者 OpenConnect)好普通,應該難你唔到

7) 試吓行    /etc/init.d/ocserv start,  無error message嘅話就重啟OpenWRT

8) 重啟OpenWRT之後, check 吓ocserv 喺process 到如果正常自動startup到,再make sure DDNS, system date/time喺正常update到嘅話,就可以試吓用client connect,正常應該先出message話話個server喺untrusted,跟住問你攞ID,password,連到之後跟住睇吓番唔番到牆

親測喺work嘅
祝你好運,有問題歡迎随時揾我

TOP

當時OpenConnect 試用 ID/Password authentication 時,一work咗之後即時跳去改用certificate用到而家
當 ...
solexkey 發表於 2016-10-10 01:08


得o左! Thank you師兄!

TOP

小弟早排係buffalo G300NH router DD-wrt 裝咗optware + openconnect server, 搞咗一輪終於起到個openconne ...
upi 發表於 2016-10-9 16:00


都多謝您! 不過因為整site to site要用新D version既ocserv.

TOP

本帖最後由 solexkey 於 2016-10-10 23:01 編輯
得o左! Thank you師兄!
雯雯 發表於 2016-10-10 22:52



TOP

[img][/img]

我個vps 半年來唯一一次郁動就系網ss server.... 而家無啦啦比hosting 公司話我個server  攻擊人=0="

d code 有無問題?

我用同時有裝系其他公司既vps 同 nas ..都無事..
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

[/img]

我個vps 半年來唯一一次郁動就系網ss server.... 而家無啦啦比hosting 公司話我個server  攻擊人=0 ...
神田傲 發表於 2016-10-11 09:43


用邊個port?

TOP

solexkey 發表於 2016-10-10 22:59


今朝做o左個speedtest, Debian OpenConnect VPN server快過OpenWRT.

TOP

本帖最後由 solexkey 於 2016-10-11 11:43 編輯
今朝做o左個speedtest, Debian OpenConnect VPN server快過OpenWRT.
雯雯 發表於 2016-10-11 10:25


咁幾好呀..

我用router 上OpenWRT其實主要喺因為零成本,慳電費

如果debian都可以零成本,慳電費咁就要認真研究一吓

TOP

咁幾好呀..

我用router 上OpenWRT其實主要喺因為零成本,慳電費

如果debian都可以零成本,慳電費咁就要認 ...
solexkey 發表於 2016-10-11 11:39


speed相差2-3倍, 可以考慮用低功耗X86.

TOP

speed相差2-3倍, 可以考慮用低功耗X86.
雯雯 發表於 2016-10-11 11:55


咁利害 !

你嘅debian hardware喺用乜嘢 ?

TOP