Total Pageviews

Saturday, 18 November 2017

obfsproxy-openvpn

Bash script to setup openvpn with obfsproxy to defeat censorship.

ISP in highly authorian regimes can easily detect and block standard VPN traffic.This bash script automatically install OpenVPN and Obfsproxy to obsfucate openvpn traffic making it very difficult to detect and block openvpn traffic.At the time of this writing, this method successfully bypasses current firewalls and internet filters.

Prerequisits

This bash script is compatible with Centos 7 / RHEL 7.x OS.

Installation

You will need to have root previleges to execute the script on your server
Run the following after having logined as a user with admin privileges to execute the script
curl -so openvpn_obfsproxy.sh -L https://raw.githubusercontent.com/khavishbhundoo/obfsproxy-openvpn/master/openvpn_obfsproxy.sh && sudo bash openvpn_obfsproxy.sh
Check the video for a live demo of the installation
After the execution is complete , download the scrambled-client.ovpn file.

Usage

This section will consist of detailed instructions on how to connect to the VPN.

Windows

1.Download and Install the latest version of OpenVPN
2.Copy the file scrambled-client.ovpn to C:\Program Files\OpenVPN\config directory
3.Install Obfsproxy
You would need to install latest python 2.7.x and then run the following commands in cmd
cd C:\Python27\Scripts
pip install --upgrade pip
pip install obfsproxy
obfsproxy.exe --log-min-severity info obfs3 socks 127.0.0.1:1050
Now you can launch OpenVPN and connect to your vpn
Important: before connecting to this server you always need to enter the following commands in the Command Prompt:
cd C:\Python27\Scripts
obfsproxy.exe --log-min-severity info obfs3 socks 127.0.0.1:1050
The Command Prompt window should remain open or else your vpn connection will be closed

Linux

1.Install EPEL repository
yum -y install epel-release
2.Install latest OpenVPN
yum -y install openvpn
3.Install obfsproxy
You would need to install latest python 2.7.x and then run the following commands
pip install --upgrade pip
pip install obfsproxy
obfsproxy --log-min-severity info obfs3 socks 127.0.0.1:1050

Firewall rules for Cloud Platforms

If your server is actually a VM instance on cloud platforms like Google Compute Engine(GCE) or Amazon EC2 you need to add a firewall rule manually as well.
The following tcp ports should be open : 443 , 21194
IP forwarding should be ON
Below is how it should be if you are on GCE
firewall

Video

https://www.youtube.com/watch?v=TVCSlfjnVTM

from https://github.com/khavishbhundoo/obfsproxy-openvpn

No comments:

Post a Comment