What's new

Traffic Monitoring on VPN Tunnels?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Charles Wilkinson

Occasional Visitor
Hi Guys,

I've just migrated to Merlin from DD-WRT and am so far loving it :)

Just wondering if there is a way to enable traffic monitoring on established VPN tunnels?

I've managed to set up an OpenVPN client connection and am routing based on policy rules, but it would be great to monitor that traffic.

Any ideas?

Thanks,
Charlie
 
If anyone even knows what binary/daemon is doing the logging I can dig around the docs...

I'm betting that I just need to invoke it for the tun11 interface, I just don't know where to look....
 
Still working on this...
Looks like the data is probably read from /proc/net/dev but I still can't figure out what program is doing it and if/where I can alter its configuration to include tun11 data.
 
Thanks for taking the time to reply - much appreciated :)

Good question and yes, you're right about the OpenVPN stats of course.

What I was hoping for was a way to show the tun11 interface as a tab in the traffic monitoring graphs in the web GUI.

Its certainly not a showstopper but would be handy for me...

Many Thanks,
Charlie
 
Thanks for taking the time to reply - much appreciated :)

Good question and yes, you're right about the OpenVPN stats of course.

What I was hoping for was a way to show the tun11 interface as a tab in the traffic monitoring graphs in the web GUI.

Its certainly not a showstopper but would be handy for me...

Many Thanks,
Charlie

That would require a fair amount of changes to the code to accomplish, and a portion of this is no longer open-sourced (the part that access the BCM5301x switch counters).
 
Ok, no worries - thanks for the info.

I may look into other ways to visualise the data - It appears that /proc/net/dev is keeping track of the bytes sent/received on tun11 so maybe I can find a daemon or script that will scrape the data from there... Hmm

A quick Googling throws up this possibility: https://openvz.org/Traffic_accounting_through_proc

Will reply here if I ever find an approach.

Thanks again,
Charlie
 
For anyone who finds this thread and wants to see current bandwidth usage (in and out) on a tunnel interface you can use nload:

http://linux.die.net/man/1/nload

You need to install it using opkg install nload

Then you can run it like this: nload -u M
Use arrow keys to switch between connections.

Or you can choose just to show tun11 data: nload -u M devices tun11
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top