I connect to my work network from my home desktop through a VPN connection.

What I am trying to achieve is expose this connection on to my mobile (Android) which connects to internet through 3G network. The original VPN vendor in use by my company does not have a mobile client.

I guess, I need to setup a VPN server(such as OpenVPN having mobile client) on my desktop which will expose the connected VPN network to my work.

Can anyone tell me pointers on how to achieve it ?


For this to work, when you home PC is connected to the VPN it must still be reachable on his own LAN - some VPNs won't let you do that.

If this condition is fulfilled, and if your home PC is a Linux box, the simplest way in my opinion would be through SSH. That's what I do for my own home PC.

First of all, this is not mandatory but I always configure SSH so that it will only accept authentication through a RSA certificate - this way it would be less easy to hack into your PC by brute force password guessing, as no password would be accepted. Couple this with denydns (it's very easy to set up) and it will be reasonably safe to expose your SSH service to the Internet.

You'll have to NAT the SSH port on your firewall to point to your Linux box (default 22, but you can change it, I usually do... security though obscurity and all of that, ok, but I prefer it this way :) ).

Then, if your Internet connection at home has a dynamically assigned IP, you could sign up for a dynamic DNS service like those of dyndns.com . Many modern modem/routers support those services natively so it should be very easy to configure yours to send your own assigned public IP to the dynamic DNS service provider every time it changes. This way you'll be able to connect to your PC from anywhere through the Internet.

To connect to SSH using Android, I use the app called Connectbot, it's free and open source and works very well for me. You will have to create your RSA keys, it's very easy. For extra paranoia you may want to protect your keys with a password. Add the public key signature to the ones accepted by your SSH server (on my Ubuntu I just need to copy it in the ~/.ssh/authorized_keys file).

Then, the last trick is to use the SSH tunnels to redirect the ports you want from your mobile, through your home PC, to your destination on the other side of the VPN. I did this before and it worked for me. YMMV obviously...

Let me know if you need more detailed instructions for any of these steps.

I hope this helps!

|improve this answer|||||
  • Thanks for your detailed explanation."some VPNs won't let you do that" - This is exactly what I am trying to crack. Since I am the Admin of the machine, I should be able to achieve by modifying routing table etc. Do you know what it takes ? – Madhur Ahuja May 24 '13 at 6:57
  • I'm not sure. I guess it would depend on the VPN. You might want to post a new question with more details about yours. – MacThePenguin May 24 '13 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.