OpenConnect DNS Only + Google Only

I’m using 4G by China Mobile, but the DNS it provides really sucks. Changing DNS from Cellular Data on a not-jailbroken iPhone is impossible so far as I know (I tried mobileconfig but can find any working options).

The first idea is pushing DNS from a PPTP server, which I wrote: Notes: PPTP/L2TP Server on Ubuntu.
I can create two connections on my iOS, one set default route, one not. All users share a same setting from PPTPd, it’s almost impossible if I want to use a different DNS in these two connections, changing default pptp port from 1723 to others is not as easy as it is on windows.
Don’t forget that PPTP is what GF*W likes.
Continue reading “OpenConnect DNS Only + Google Only” »

OpenConnect DNS Only + Google Only by @sskaje:

Incoming search terms:

Google IP Address Ranges

Google introduces its TXT/spf records including all Google’s IP: Google IP address ranges describes ipv4 ranges. describes ipv6 ranges is currently empty.

Now we have list of IPv4 ranges, but we know google provides a public dns service, (for ipv6 2001:4860:4860::8888/2001:4860:4860::8844).
we can treat these two as and or just make it as

IP/CIDR IP Begin IP End Netmask
Google IP Address Ranges by @sskaje:

Incoming search terms:

Cisco AnyConnect Clients 3.1.05170 download

Available for OS X, Windows, Linux, but unfortunately I didn’t figure out how to use it with OpenConnect when using public key authentication.
OpenConnect Public Key Authentication
Open Connect Server Configuration (Working for iOS)
OpenConnect on Ubuntu

OCServ with AnyConnect on OSX


Continue reading “Cisco AnyConnect Clients 3.1.05170 download” »

Cisco AnyConnect Clients 3.1.05170 download by @sskaje:

Incoming search terms:

OpenConnect Public Key Authentication

Here are old articles about OpenConnect, the open source AnyConnect server:
OpenConnect on Ubuntu
Open Connect Server Configuration (Working for iOS)
Cisco AnyConnect Client for OS X/Windows/Linux (Version 3.1.05160)

This time, OCServ 0.80 on Ubuntu 14.04.
And still doesn’t work for OS X.

I was using password based authentication, but clients on iOS can not remember my password.
So now add some configurations based on “Open Connect Server Configuration (Working for iOS)“.

Create Client Certificates

Just follow the manual:
If you already have a CA based on openssl, I have another article: Generate Certificate with GnuTLS and Sign with OpenSSL.

Here is my user.tmpl:

After the pkcs12 is created like ‘Create Client Config’ in “iOS IPSec VPN Server on Ubuntu“, the mobileconfig should be also created.
Remember to leave the ‘Account‘ and ‘Group‘ BLANK in the VPN page.

Update config

Copy a new sample.config from source, edit it following Open Connect Server Configuration (Working for iOS)

Now comes the certificate authentication related changes:


I tried to use both certificate and plain, but failed.
Just keep the certificate one.

server-cert & server-key

You can add your own certificate or get it somewhere like
I got my certificates from, class 1, I got three files: ca.pem,, and my own ssl.crt:

If you don’t make these three in a right order, you’ll see errors below in syslog:

The server-key I got from startssl is encrypted, decrypt it:

Encrypted private key would result:


This ca-cert is for CLIENT certificates!

cert-user-oid & cert-group-oid

Follow the comment:


Enable this! Thanks to @simamy.

OpenConnect Public Key Authentication by @sskaje:

Incoming search terms:

Set up Port Proxy for Google

I found some ways making most of google’s services working in my working place, but not for google docs, google drive, google plus…

I got a VPS somewhere, windows 2003, which is quite easy creating a port proxy.

Make sure you have 443 port not in use.

Install IPv6

To make the portproxy work on windows 2003, IPv6 must be installed, even for a v4 to v4 proxy.

Create the portproxy

Syntax can be found here: Netsh commands for Interface Portproxy

Check if port is open

After the add operation, check if the 443 port is open using:

Delete the portproxy

Same syntax as above.

Create portproxy on Port 80

Set up Port Proxy for Google by @sskaje: