返回列表 發帖

Great Firewall 全面封殺 OpenVPN ?!

本帖最後由 tomlee0101 於 2013-1-16 20:02 編輯

Original article :
https://www.facebook.com/notes/% ... 7/10150993099683078


(網絡行動組) 以obfsproxy解決中國2012年12月針對OpenVPN之網絡封鎖增強.
毋忘六四寫於 2012年12月12日9:37 ·
文:

網絡行動組

積極籌備中的自由網絡研究中心(NIL)

[問題概況]

多得偉大團結無私的執政集團,以及曾入選中國網民眼中二十大嘔心人物的北京郵電大學方濱興校長,2012年12月,GFW針對OpenVPN進行網絡封鎖,經一番追查和考究,最終發現封鎖技術建基於OpenVPN PKI模式下TLS Handshake過程的特徵。我們一直依賴OpenVPN突破網絡封鎖的國內人員亦深受影響,以我們一直的認知,以為OpenVPN並沒有特徵可言,但事實是,TLS Handshake還是會有特徵。



【應對方法】

解決方法1(消極):

「斬腳趾避沙蟲」,改用中古年代的Static-Key模式避過TLS Handshake過程,缺點是:

‧只能一個埠對應一個Client

‧一個Client就要有一個OpenVPN Instance



解決方法2(進取):

另一種比較進取的解決方法是要求OpenVPN社群建立為TLS Handshake過程進行加密的機制

透過TLS-Auth的Static-Key來進行,也是一個不錯的選擇



解決方法3(折騰):

以Obfsproxy模糊TLS Handshake過程,缺點是:

1. 效能上有小量Overhead

2. 不支援UDP...

3. Android手機似乎未有Obfsproxy客戶端...



以下是「解決方法3」的實作過程



【安裝obfsproxy】

#於伺服器和客戶端雙方安裝obfsproxy

$cd /usr/bin/

$sudo git clone https://git.torproject.org/obfsproxy.git

$cd obfsproxy

$./autogen.sh && ./configure && make

$sudo make install

#視窗用戶可下載Windows Obfsproxy Tor Browser Bundle

#https://www.torproject.org/dist/ ... 6-alpha-2_en-US.exe



【伺服器obfs 設置】

$sudo obfsproxy --log-min-severity=info obfs2 --shared-secret="Neverf0rget8964" --dest=127.0.0.1:1194 server 0.0.0.0:689

#基於Obfsproxy限制,OpenVPN 伺服器所用的1194埠是指TCP1194,而非UDP1194



【客戶端obfs 設置】

$obfsproxy --log-min-severity=info obfs2 --shared-secret="Neverf0rget8964" socks 127.0.0.1:689



【伺服器Sample Init Script】

#! /bin/sh

### BEGIN INIT INFO

#Provides:          ObfsProxy Init Script for OpenVPN

# Default-Start:     3 5

# Default-Stop:      0 1 2 6

# Short-Description: Fuck GFW

# Description:       ObfsProxy Daemon for OpenVPN

### END INIT INFO

PIDFILE=/var/run/obfsproxy.pid

PATH=/usr/bin:/sbin

DESC="ObfsProxy Daemon for OpenVPN"

NAME=obfsproxy

DAEMON=/usr/bin/obfsproxy/obfsproxy

DAEMON_ARGS="--log-min-severity=info obfs2 --shared-secret=Neverf0rget8964 --dest=127.0.0.1:8080 server 0.0.0.0:689"

TIMEOUT=30

SCRIPTNAME=/etc/init.d/obfsproxy

case "$1" in start)

echo -n "Starting ObfsProxy Daemon for OpenVPN"

start-stop-daemon -b --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS

;;

stop)

echo -n "Shutting down ObfsProxy Daemon for OpenVPN"

start-stop-daemon --stop --quiet --retry=QUIT/$TIMEOUT/TERM/5/KILL/5 --pidfile $PIDFILE --name $NAME

;;

esac




【客戶端ovpn 更改】

-remote openvpnserver.com 1194

+remote openvpnserver.com 689

+socks-proxy 127.0.0.1 689



【NAT】

伺服器端無須再就TCP 1194進行Static PAT,相反TCP 689要做NAT Mapping。



【結論】

方校長這次還玩得真有點過火

----------------------------------------

[方濱興]
中國郵電大學校長。中國網路封鎖防火長城(GFW)總設計師,因此被網民戲稱為“中國防火牆之父”。方濱興曾在接受《環球時報》英文版採訪時稱在自己的家用電腦上有6個VPN(虛擬私人網路)用以測試防火長城。被問到防火長城是如何運作的時候,他說那是“國家機密”。文章發表後民憤強烈。去年在武漢大學演講時,遭學生扔鞋抗議,在網路上引起一片叫好。

------------------------------------------

OpenVPN反封杀的方法 :
http://igfw.net/archives/12526
http://igfw.net/archives/12556
https://community.openvpn.net/openvpn/wiki/TrafficObfuscation
https://www.gsea.com.cn/blog/top ... r-openvpn/#more-748
http://changblog.com/1724
http://igfw.net/archives/12583   L2TP、PPTP被搞死教你如何搭建抗干扰OpenVPN
xxGFW 2012年12月3日04:39 responded "按这个教程做了一遍,确实能用。但是实际情况是tls-auth下UDP989依然撞墙,TCP3389畅通。"
-------------------------------------------
10.12月6日,VPN服务商Astrill通知客户,近期GFW升级之后具备了侦测、辨别和阻断各种类型的VPN连接之功能,解决方案将在近期发布


---------------------------------------------
翻墙观察 2012年12月
http://up2mist.org/zh-hans/2013/ ... 5%B9%B412%E6%9C%88/

-------------------------------------------------
GFW封锁OpenVPN 与 加密流分类的学术论文
一篇有方校长署名的一篇综述文章“网络流量分类研究进展与展望”,其中介绍了流量分类面临的挑战与技术手段,部分内容似乎与最近封锁OpenVPN有关:
http://chinadigitaltimes.net/chinese/2012/11/gfw封锁openvpn-与-加密流分类的学术论文/
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

本帖最後由 tomlee0101 於 2013-1-4 09:56 編輯
回復  tomlee0101

唔怪得我部Synology個OpenVPN一路都connect唔到啦! 唔知Synology可唔可以裝到obfsproxy ...
雯雯 發表於 2013-1-3 20:24



   

Can anyone who suddenly failed in OpenVPN connection  try below ?

"解決方法2(進取):
另一種比較進取的解決方法是..TLS Handshake過程進行加密的機制
透過TLS-Auth的Static-Key來進行,也是一個不錯的選擇"

TOP

本帖最後由 tomlee0101 於 2013-1-4 12:47 編輯

My thread

OPENVPN 用 certificate 設定分享 : DD-WRT server,DD-WRT client, Windows, Android
http://www.telecom-cafe.com/foru ... &extra=page%3D1

Added configurations for TLS-Auth..

TOP

本帖最後由 tomlee0101 於 2013-1-4 12:55 編輯
下面這些不同種類的 VPN 有沒有這個 “露餡”TLS HandShake 呢 ???
(1) SSL VPN  (使用 https://www.XXXXXX.com 來 Login 破網翻墻的 VPN)

(2) SSTP VPN (最新款的 Microsoft 標準的 VPN, 要 Window 7 内纔有這個功能的 VPN), MikroTik 的 Soft-Router 内建有這個 SSTP VPN Server 的功能的。

(3) L2TP VPN  (在 MikroTik / PfSense 和他某些 Soft-Router 也内建有這個 L2TP VPN Server 的功能的。)

homeinns 發表於 2013-1-4 11:24


I hope to know as well..

Will share with all of you if I find some clue..

In the mean time, I just hope someone can prove/test the below suggested resolution

"解決方法2(進取):
另一種比較進取的解決方法是..TLS Handshake過程進行加密的機制
透過TLS-Auth的Static-Key來進行,也是一個不錯的選擇"



Otherwise, may have to spend some time to study/test the following scenario for using OpenVPN with static Key
1) [DD-WRT OpenVPN client with static key]<---->[DD-WRT OpenVPN server with static key]
Possible ? If so, how to configure at the DD-WRT OpenVPN client ?

2) [CM 7.2 OpenVPN client with static key]<---->[DD-WRT OpenVPN server with static key]
Possible ? If so, how to configure at CM 7.2 OpenVPN client ?

TOP

本帖最後由 tomlee0101 於 2013-1-4 16:11 編輯
是否指无需ID与password的静态key?
lttliang 發表於 2013-1-4 14:46


I believe so.... There was no detailed explanation at the original article.

I think the suggested resolution is referring to the field  "TLS Auth Key " at DD-WRT OpenVPN configuration screen.

I had tried the corresponding configration / OpenVPN connection and routing etc. successfully, but I could not prove/test if it can resolve GFW針對OpenVPN霎那間的 TLS HandShake 露餡, 而引致進行的網絡封殺..

TOP

回復  lttliang

lttliang兄, 可否指教一下ipip tunnel?
雯雯 發表於 2013-1-4 15:42



   x2 ..  

   interested as well...

TOP

我去請教 Google 老師, Key-Word = ipip tunnel
但 Google 老師提供下面這些極爲高深的回復, 我看不懂。
...
homeinns 發表於 2013-1-4 15:53


TOP

本帖最後由 tomlee0101 於 2013-1-5 00:45 編輯
改port number呢?
角色 發表於 2013-1-3 20:48



   

May possibly work for a few days..

这次openvpn也受影响严重,即使是自己VPS搭建的OpenVPN在正常使用一段时间后可也能就会被封锁端口,然后切换OpenVPN为其他端口连接时又恢复正常,不过使用一段时间还可能被封锁,所以说其应该是根据某些特征封锁,并且GFW应该有自动学习和记忆功能。

Source article :
http://igfw.net/archives/12526

TOP

返回列表