How to copy OpenVPN Connect logfiles?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

How to copy OpenVPN Connect logfiles?

Post by BobAGI » Wed May 07, 2014 7:37 pm

I am trying to debug a connection/usage problem for my OpenVPN server against an OpenVPN Connect app running on a Samsung Galaxy S4Mini.
I can connect fine but the phone cannot reach the Internet while connected. But I can FTP to the VPN server, so some form of communication is on-going.
However it seems like the phone can only reach the OpenVPN server, not the Internet nor the resources on the server's local network (my NAS for example)...

To analyze this I need to be able to check the client logfile but I find no way to save it to somewhere I can access it.
Is there some hidden command that enables me to save the logfile somewhere in the "open" on my phone's file system?
If not, how can one check the logfile????
Looking at it via the log viewer while connected is not enough, I need to be able to do text searches through the file.
I have looked on both my phone memory and the external SDcard file systems without luck!

And while I am asking about the app:
Key file handling
I have put ovpn key files on my phone and imported them to the app.
Can I remove the files afterwards or are they still needed by the app after import?

BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

Re: How to copy OpenVPN Connect logfiles?

Post by BobAGI » Wed May 07, 2014 8:38 pm

Well,
I have been reading the HOWTO from the top and I now understand a bit more so I have changed the server.conf line:
push "route 192.168.0.150 255.255.255.0"
to
push "route 192.168.0.0 255.255.255.0"

because I did not understand that the left item should be a network rather than a specific address.

But when I read the part "Including multiple machines on the server side when using a routed VPN" I reached a full stop when i got to here:
Next, you must set up a route on the server-side LAN gateway to route the VPN client subnet (10.8.0.0/24) to the OpenVPN server (this is only necessary if the OpenVPN server and the LAN gateway are different machines).
Make sure that you've enabled IP and TUN/TAP forwarding on the OpenVPN server machine.
There is no explicit description on how this is to be done, no server.conf entries to change or such, so I am none the wiser. :(

Edit:
I think it has to do with the iptables commands as they are spread in several places in the tutorials I have read including the OpenVPN HOWTO.
But I do not know where to put these commands (obviously I am not supposed to enter them manually every time the VPN server reboots...).
For example this from the HOWTO:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
is supposed to be entered somewhere into a file, but the HOWTO fails to mention where and in what order (if it matters).
/Edit

I started to look at the client log (available in a menu on the OpenVPN Connect app while the connection is established) and it looked pretty big.
So I wanted to get it as a file rather than looking at it through a phone window.
Hence I created this thread....
So do you know how the logfile can be saved to disk and examined using a regular editor?

Concerning my server side configuration struggles I have already created another thread for this (which you have kindly commented in).

betta21
OpenVpn Newbie
Posts: 2
Joined: Fri May 09, 2014 9:44 am

Re: How to copy OpenVPN Connect logfiles?

Post by betta21 » Fri May 09, 2014 9:48 am

I'm agree with you dude :)

BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

Re: How to copy OpenVPN Connect logfiles?

Post by BobAGI » Mon May 12, 2014 8:12 am

Please anyone that KNOWS:
Is there any way to reach the Android App "OpenVPN Connect" logfiles so they can be examined properly????
I know that one can activate the"Show log file" command in the App menu to view part of the logfile in the small phone window, but it makes no sense to me to do thta in order to debug a connection problem!
The proper way would be to access the logfile directly (or making a copy of it) with an editor capable of comparing and searching for stuff.

So my original question remains UNANSWERED:
"How to copy OpenVPN Connect logfiles?"

Please......

Post Reply