Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there an easy way to determine if a OpenVPN tunnel has been established after connecting? I read somewhere that you can ping the "virtual adapter" on the other end of the tunnel, but I have no idea what they mean.

Edit: I forgot to mention that I am using the commandline and no GUI.

-

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Well if you are getting through the connecting part and the icon is green then the tunnel should have been established. You can also pull up the log (right click icon -> log) and see the line:

Fri Feb 17 00:44:52 2012 Initialization Sequence Completed

If you don't trust it, try connecting to something. If you are able to connect to a server on other side you are established. Or type ipconfig at the command prompt to find your default gateway on the virtual adapter interface, then ping that ip.

That said, are you using Windows 7? In windows Vista/7 you must right click and "Run as administrator" on OpenVPN, otherwise it won't be able to add routes. The icon will turn green but you won't be able to talk to remote end.

share|improve this answer
    
+1 for access something on the other side. –  MDMarra Feb 17 '12 at 9:23
    
And +1 for UAC blocking the establishment of the necessary routes. –  SmallClanger Feb 17 '12 at 11:03
    
Another clue is to hover your mouse pointer over the notification tray icon and look for the popup that reads "OpenVPN Connect - connected to..." –  joeqwerty Feb 17 '12 at 11:06
add comment

Couple of options here. If you have enabled the admin port:

telnet localhost 5001

Once connected, you'll be able to do a lot, but the two key commands are:

state and status

The state or status should be able to tell you if you are connected or not. You can also do a "state on" and "status on" which will send you information back if things change.

Also, let's say you're side of the tunnel has ip 10.0.0.5 and the other side has 10.0.0.6, from your host, trying and ping 10.0.0.6. If you get a response, you're connected and the appropriate routes, etc are in place. If not, something's wrong (And see above on the state/status).

Also, a traceroute should show both the 10.0.0.5 and 10.0.0.6.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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