Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Ratio of ipv4 to ipv6 traffic thru WAN
« previous
next »
Print
Pages: [
1
]
Author
Topic: Ratio of ipv4 to ipv6 traffic thru WAN (Read 1126 times)
PacketChomper
Newbie
Posts: 7
Karma: 1
Ratio of ipv4 to ipv6 traffic thru WAN
«
on:
July 17, 2022, 12:49:05 pm »
I'm looking for an easy way to capture the ratio of ipv4 traffic vs ipv6 traffic. Ultimately I want to plot these values over time to watch the trend.
At first I thought I was on to something useful when I found Firewall->Diagnostics->Statistics->Interfaces.
But oddly, the packet counts and the bytes counts are the same values. Not sure whether this is a bug or a limitation of the particular NICs on this platform. See attached image (if I attached it correctly).
Then I thought I could makes some firewall rules with "Pass,not quick, no state" for each of the v4/v6 in/out combinations on the WAN interface, but a) the Insights display showed very low counts and b) it's not clear to me how many of the default rules are passing the traffic before it gets to those "counter" rules.
So, any suggestions on how I can get packet and bytes counts in and out of the WAN interface for both protocols?
PS. I did have a fairly extensive search around the forum and the net, and nothing obvious showed up.
Logged
bartjsmit
Hero Member
Posts: 2018
Karma: 194
Re: Ratio of ipv4 to ipv6 traffic thru WAN
«
Reply #1 on:
July 17, 2022, 01:56:44 pm »
You can run a pi-hole for your DNS. It gives a breakdown between A and AAAA lookups and has an API:
https://pypi.org/project/PiHole-api/
Bart...
Logged
PacketChomper
Newbie
Posts: 7
Karma: 1
Re: Ratio of ipv4 to ipv6 traffic thru WAN
«
Reply #2 on:
July 17, 2022, 03:14:44 pm »
Quote from: bartjsmit on July 17, 2022, 01:56:44 pm
You can run a pi-hole for your DNS. It gives a breakdown between A and AAAA lookups
Thanks for the suggestion Bart, I probably should have been clearer that I need to know the ratios in terms of packets and bytes in
and
out.
Counting DNS queries is going to be too much of an approximation since one A query might result in a 1GB youtube video while another AAAA query might be a 1KB tweet. DNS queries also don't tell me anything about outbound vs inbound ratios, e.g.
So, good idea, but I really am after byte and packet counts in both directions for both protocols.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Ratio of ipv4 to ipv6 traffic thru WAN