Skip to content

Bypass DPI - #7

Closed
russlank wants to merge 2 commits into
OpenVPN:masterfrom
russlank:bypass-dpi
Closed

russlank wants to merge 2 commits into
OpenVPN:masterfrom
russlank:bypass-dpi

Conversation

@russlank

@russlank russlank commented Aug 9, 2013

Copy link
Copy Markdown

Hi,

As some ISP(s) rely on Deep Packet Inspection (DPI) to identify various VPN traffic, and to block them, I have added small feature, called “bypass-dpi”. This new feature mainly gives OpenVPN the ability to masquerade the protocol by sending arbitrary, meaningless, initial packet that confuses the DPI mechanism, and allows consequent valid connection's packets to pass through, without being identified as OpenVPN traffic.

As the DPI appliances establish context for each newly established connection passing through, depending on examining known protocols’ signatures, at very early stage of connection establishment, sending such a packet makes DPI blind, and makes it classifying the protocol as unknown.

Currently implemented method works with specific OpenVPN configuration:

  • UDP protocol to be used for the connection.
  • TLS-AUTH to be specified; this will allow the server to drop the initial invalid packet, which means that the support for the feature is needed on the client side only.

I have modified the code to include this feature, and which can be enabled using “bypass-dpi” option in the configuration or at command-line.

Frankly, I made the change with the minimum effort. I think it could be implemented in better, more consistent way, by someone who has better understanding of the code.

Russlan

@kenmoini

Copy link
Copy Markdown

Have you had a chance to test this on a network with active Narus/Cisco DPI implementations? Software implementation?

@russlank

Copy link
Copy Markdown
Author

Actually, I am using it to access the services from behind Blue Coat's DPI filtering only. I am not sure if that works with what you have mentioned.

@ngharo

ngharo commented Aug 22, 2013

Copy link
Copy Markdown

I kind of have a feeling patches like this will not be merged due to the constant changing DPI techniques used by firewalls. It seems like a never ending battle.

Not that this patch isn't GREAT for users that need it, I'm just afraid it'll create a burden on OpenVPN developers if they're maintaining support for it.

I will bring it up at the next OpenVPN developer meeting to get more official input.

Thanks!

@russlank

Copy link
Copy Markdown
Author

Thanks! glad to hear that...

@01freeman

Copy link
Copy Markdown

I had been trying to compile this, but running into: "-bash: ./configure: No such file or directory".

Any chance you know what this is? Or if you could upload compiled executable for windows somewhere that would be great too.

@kenmoini

Copy link
Copy Markdown

@01freeman: Type "ls" or "dir" at the terminal to make sure you actually have a configure file. If so then odds are its a permission issue.... "chmod +x ./configure"
(All without quotation marks)

@01freeman

Copy link
Copy Markdown

@kenmoine: Thanks, looks like there is no configure script (there is configure.ac, but it does not work "./configure.ac: line 1: dnl: command not found"). After examining change again, I see config-msvc file changed. I think this means I will need to compile this on windows with msvc.

lstipakov pushed a commit to lstipakov/openvpn that referenced this pull request Feb 27, 2015
…n:clp-master to clp-master

* commit '1a84fd7a304820c9a45c4901414d35d3623cda78':
  Update changelog
  Modernize sample keys and sample configs
@shel3over

Copy link
Copy Markdown

@dsommers

Copy link
Copy Markdown
Member

The issue with both the XOR patch and this patch is exactly what has been mentioned here, DPI analysers gets better and better and these approaches - even though they can work very well now - will at some point stop working again.

In general we recommend using obfsproxy by the Tor project. This can work together with OpenVPN out of the box using SOCKS5 mode and --sock-proxy in the OpenVPN config. On the server side you also need to run obfsproxy listening to an alternative port and then tell it to proxy inbound connections to your OpenVPN server port.

The advantage with obfsproxy is that it doesn't have a purely static obfuscation - and the Tor project have the possibility to enhance the obfs protocol as well. Considering that the Tor project have far more users in the same situation, they should be able to have both the know-how and the interest in fixing issues with the obfsproxy far quicker.

The downside of this approach is that you currently must use OpenVPN in TCP mode.

For more information, see https://www.torproject.org/projects/obfsproxy.html.en

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants