I'm trying to get around a very restrictive firewall that blocks everything besides ports 80 and 443 and apparently even does DPI to block VPNs. For that matter I'm trying to obfuscate OpenVPN traffic using obfsproxy. Here's my setup:
Server
obfsproxy obfs2 --dest=127.0.0.1:16080 --shared-secret=[secret] server 0.0.0.0:3389
running.
lsof -i :3389
shows
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
obfsproxy 1341 root 3u IPv4 14396 0t0 TCP *:3389 (LISTEN)
OpenVPN Server is running on TCP 16080, Access Server console is accessible and everything looks ok.
Client
Edit: obfsproxy is the python version obtained through pip
.
sudo obfsproxy obfs2 --shared-secret=[secret] socks 127.0.0.1:443
running in a terminal window in OSX 10.9.5.
Trying to connect using 'Tunnelblick' with the following client.ovpn:
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
pull
remote [Server-IP] 3389 tcp
route [Server-IP] 255.255.255.255 net_gateway
socks-proxy-retry
socks-proxy 127.0.0.1 443
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
auth-user-pass
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
# Certs...
The Problem
Tunnelblick keeps trying to connect and the obfsproxy shell on the client side keeps printing the following line during that time: 2015-01-30 15:52:42,508 [ERROR] Invalid SOCKS command: '3'
. So, at least on Client side the obfsproxy seems to be found by Tunnelblick, but that's as far as I come with this. How can I solve this or at least get more debugging information?
Update
The obfsproxy client also prints 2015-01-30 15:39:36,431 [ERROR] Invalid SOCKS version: '71'
on the first line after startup. This seems to be created in the following python script: http://pydoc.net/Python/obfsproxy/0.2.7/obfsproxy.network.socks5/. Obfsproxy seems to require Socks5. I'm trying to figure out how to get my VPN client to talk Socks5, so far I can't find any more info on how to force a version.
Update 2
Viscosity client has a bit more log output, it prints recv_socks_reply: Socks proxy returned bad reply
. It also doesn't lead to the invalid version
error in obfsproxy, however it still can't connect, obfsproxy prints invalid socks command 3
. Also, I've tried with an older obfsproxy binary that's bundled with torbrowser OSX distribution (2.4.6 alpha 2), which I assume is not the python version. Same behaviour in Viscosity, proxy returned bad reply
.