Showing posts with label OpenVPN. Show all posts
Showing posts with label OpenVPN. Show all posts

Wednesday, August 29, 2012

OpenVPN tunneling...revisited

A while back I finally got OpenVPN working, mostly it took the installation of version 2 of IPCop as my router software.

I could log into the VPN on my server remotely...but I didn't have access to my network or anything else.

I put that project on the back burner until tonight, when I found out my ObiHai110 was having issues and I was going to remotely admin it...over the VPN...

Very long story with much rebooting and Googling/OpenVPN forums reading...

I was missing a command on my server, the command that tells the OpenVPN software to route my home network traffic actually to the home network. For example, the 192.168.x.x number for a networked security cam should be routed to the home network...and to make networking easier, I have my home non routeable IP address to a hopefully offbeat number...

Anywho, because I am not home, I can't edit the server settings, but I can edit the client. So drumroll please...

...the missing line was

route 192.168.x.0 255.255.255.0

(where x is in the home network IP address...normally they default to "1" as in 'route 192.168.1.0 255.255.255.0' your mileage may vary)

I also have the line '--script-security 2', but I am not sure it is necessary for adding that command.

Now the correct way to do this would to have a 'push' command on the server, so as the client is logging in, this is automatically set (in case you change the numbers on the server at some point)

But this will work for me. I can access all my shared drives, and networked devices now.


As a side note, for some reason Win7 removed the popup bubble tool tips from the taskbar icons...the unintended consequences of that caused the OpenVPN context menu (right click on taskbar icon) to not pop up...that headache took a couple of hours by itself.

the registry setting that cause that is...

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"EnableBalloonTips"=dword:00000000

I simply deleted the setting, but apparently you can set it to "2".

Good luck!

Monday, June 1, 2009

OpenVPN and Verizon Westell DSL router

Depending on what you think I mean by the title...it works.

No I am not using OpenVPN on the Verizon router...but I am able to via a WiFi connection through the router.

I know...you are thinking 'well duh, that is what it is for' and you would be right.

HOWEVER,

My home network has been on the 192.168.1.x address group since forever (sometime in the late 90's). Most of my hardware has static IP addresses to make my life easier when trying to remote administer them (printers, webcams, NASs). So if I wanted to change the network address to a 162 or a 10 it would be a major PITA.

Fast forward to today. I just got Verizon DSL hooked up at my 'satellite work site'. It is $18 a month for the slower than 1mps connection...but that is all I need. With the current deal it comes with their Westell 7500 WiFi router.

I set it up with the defaults, enabled the WPA security, and jointed the internets. Next test was to start up OpenVPN and access my home network.

Well it would log in after a while, but a little bit after that the web access on this end would drop. Skype stayed connected, email still worked, but no HTTP:.

The one person who has read this blog probably can figure out the problem. The default IP address on the router and its network is 192.168.1.1. My home IP address is 192.168.1.x. When OpenVPN logs in, it tunnels my 192.168.1.x laptop IP to a virtual 10.x.x.x and then the router puts it back on the home network and routes that virtual 10.x address to a network address 192.168.1.x.

The conflict is that the computer doesn't know where to look...home network or internet (remember I used port 80 for the VPN).

The fix is shorter than the problem...I simply changed the IP address of the Verizon router...and the DHCP list...and shut the router down, and restarted it.

So let that be a lesson to you...have your home network on some obscure ip address so you don't get conflicts.

But it works great now.

Sunday, May 10, 2009

OpenVPN tunneling revisited

Well first I used the default standard VPN tunneling port...it was blocked.

Then I tried to use port 443 (SSH)...it was also blocked.

So finally I set the VPN to port 80 (HTTP)...that one worked! Only drawback is I have a webserver that can only use port 80...well I simply have my router...route a different port to that machine...and that worked fine.

Sunday, April 12, 2009

IPcop, OpenVPN and the internets-revisited

Back a few months ago I had sucessfully loaded and ran OpenVPN on my IPcop router, and was able to access my home network securely from where ever I wanted to...

Well it died at some point...I am not sure what combination of things killed it, but essentially I was blocked from using it.

By default (and only choice in the version I installed) the OpenVPN plugin to IPcop sets you up with a UDP port 1194...which is the official universal VPN port apparently. Also apparently the various providers I had been using decided to block either the UDP or the 1194 or both.

I couldn't enable TCP on the version of OpenVPN (ZERINA) I had installed. I decided to put my openvpn connection onto the 443 secure port via TCP...so I had to reinstall Zerina.

A handy tool I used to remind me of the procedures is this video. A quick little flash thing that walks you through the commands.

Once I deleted the old version of openvpn I had, and installed the new one...and went back and rebuilt certificates, reinstall client data, (set the TCP and 443), etc...(previously documented)

I sucessfully connected (again) via tether through my cellphone to my home network.

Thursday, November 20, 2008

OpenVPN IPCop and Vista

Long story short...it works...pretty well.

Actually fairly simply.

Ok for those scratching their heads...By having IPCop as my router on my home network, and OpenVPN running on my laptop, I am able to create a secure tunnel between my laptop anywhere in the world, and my home network. I can browse files, etc. through a secure tube.

First I followed this instruction. (and the info in these 5 pages)
...the IPCop setup matched what I had done previously but had not worked...
...The OpenVPN GUI looked like the solution...so I installed it...it logged into my IPCop router...but I couldn't connect to the network...
...Log entry={ERROR: Windows route add command failed [adaptive]: returned error code 1}

Second, I found this post that said I just needed to install the latest version of OpenVPN...
...ah...the latest version of OpenVPN INCLUDES the GUI now...
...and I made sure I ran the program as administrator...
...but I still couldn't connect to my network...
...Log entry={ROUTE: route addition failed using CreateIpForwardEntry:}

Third, I found this other post that added two lines to the end of the {VPN-TO-IPCop.ovpn} file generated during the first instruction.
route-method exe
route-delay 2
Those two lines fixed my problem.

So using my laptop tethered to my HTC Touch, I was able to access my home network.

Note at the top I said it works...it does...but I cannot browse the network...it is probably normal, but unexpected...however I can map a network drive by adding the IP address {192.168.1.x} and browse the shares there and connect to then...from that point they are like any mapped network shares.

Interesting note...since I can access all the IP addresses on my network...all my IP devices (cameras, printer, NAS) can my administered using the same stored URLs I would use at home...in fact, I can print on the home printer this way. (as long as you use the IP address to access the computer...and not the automatic printer install I originally used)