How to get NetExtender VPN client on Ubuntu 13.04 working?

I've got a Ubuntu 13.04 desktop and I need to connect to a Sonicwall VPN appliance using NetExtender. TL,DR, the VPN connects fine, but then I can't reach any internet or LAN websites.

Details:

First I installed the right libraries and the most recent SUN Java (not Open JDK) using this article: 

How to get Netextender (VPN) working in Ubuntu 12.10 x64?

Once I did that, and installed the most recent NetExtender client from the My Sonicwall website, the connection succeeds.
It's configured for Tunnel All mode so all traffic is supposed to go through the VPN, except that I can't reach any internet sites or LAN sites.

I've duplicated this problem on a second Ubuntu desktop, and I see it in 12.04 also.
I can connect from Mac or Windows using the same account, so I don't think it's a problem with the Sonicwall policies or user account.


Solution 1:

Sure enough, it was a routing problem.

With the connection active, I compared the routing tables between a Mac that worked and Ubuntu that did not, and sure enough the route from my public (dynamic) IP to the gateway inside the tunnel was not there. The NetExtender logs also indicate "Error determining existing route to ssl-vpn"

To fix it, in a terminal window, do:

sudo route add -net (your-VPNs-public-ip) netmask (your-VPNs-netmask) gw (your-tunnels-gateway) dev (your-ethernet-device)

For example, mine was something like this. It took a few tries in my case as the connection kept dying and reconnecting - something to do with the Sonicwall thinking the connection wasn't active?:

sudo route add -net 1.2.3.4 netmask 255.255.255.255 gw 192.168.0.1 dev wlan0

Got the idea from here: http://ubuntuforums.org/showthread.php?t=2146122&highlight=netextender