vnstat-server icon indicating copy to clipboard operation
vnstat-server copied to clipboard

packet filtering option

Open mabra opened this issue 1 year ago • 3 comments

Hello! It would be nice to take packet filtering (tcp-dump/pcap alike) into the server. I had to get rid of that 'vnstat' what I have been using from debian repositorsy. In ISP/hosting scenarios, there is often only one interface, where you'll get data from your 'neigbour servers' in the same LAN (and sadly other traffic too), while you have to pay only for the traffic leaving your box over the gateway. At least that mentioned 'vnstat' became worthless for me, because of the missing for filtering. Just my thoughts.

mabra avatar Nov 02 '24 11:11 mabra

The server works by fetching the data that vnstat stores in the database and then providing them to the client over HTTP. but it seems vnstat doesn't store enough data for this feature. All that it stores are statistics about your usage only by year, month, day, etc. without any information that can be used in filtering. Unfortunately, I cannot implement it without implementing it in vnstat first, because in the end, This is a server for vnstat that allows you to share your vnstat data over HTTP. But Anyway, I'm planning to build an alternative for vnstat because I see it's missing important features. but I don't know when I will have some free time to build it.

hulxv avatar Nov 14 '24 13:11 hulxv

Hey @mabra, how are you? I hope you are fine

I have a plan to make an alternative to vnstat with more advanced features and use eBPF that will enable us to have more control over the packets instead of vnstat's old way. I believe this new structure will enable us to address your needs effectively. Can you tell me more about your use cases and what you do with some clearer examples? I want to consider this feature in my plan.

Thanks for your time.

hulxv avatar Jun 07 '25 19:06 hulxv

Hi, thanks for asking, fine. I used it on a VPS to measure my network capacity (limit per month). The problem I had was, that the network interface has been part of a /24 network and I got all the broadcasts counted (and headdache about my iptables rules ....). This was a multiple of my used ip-traffic, so it was worthless for me. Hope, this gives a hint. Regards, Manfred

mabra avatar Jun 09 '25 05:06 mabra