Jump to content

Does anyone know any OSs or software I could install on a raspberry pi that will let me log traffic usage by IP?

 

My hope is that I can use a raspberry pi and use the routers DNS to redirect to it (or something) and then I can log traffic usage going out. I do not need to see URLs, but it would be nice. The goal is to have a small portable device I can plug into an existing router that someone is having slow internet/connection issues with and can see if something is wrong with the WAN link or if they really are using up their bandwidth. 

 

Does anyone have suggestions? I know pihole exists but cant remember if it will log that stuff over 24hrs

 

Thanks!

 

Breaking things 1 day at a time

Link to post
Share on other sites

Sounds like you'd want something like Squid (a web proxy).

 

DNS (like Pi-hole) won't work in your scenario since web traffic doesn't go through the DNS. A DNS is like a phone book. You use it to look up a number (or in the case of a DNS, the IP adress) and once you got the number, you can make calls without checking with the phonebook (or DNS) again.

 

Please note that Squid would require configuration on the clients (set it as the web proxy), it is easily bypassed, not all programs might use it (requires setting proxy settings in each individual program unless they support automatic proxy detection), and it doesn't have a built in monitoring tool.

 

 

 

I have a feeling GNU/Linux should have some built in tools that could be used to do what you want to do but I can't think of it right now.

 

Edit: Found a better way of doing it. It probably works without having to install third party programs as well, but it will require a lot of configuration and more GNU/Linux experience than I got.

 

1) Get a Raspberry Pi with an Ethernet port, and get a USB network dongle.

2) Bridge those two networking interfaces.

3) Get a bandwidth monitoring service like iftop.

4) ???

5) Profit.

 

 

Edit 2:

I wrote that edit and thought "surely someone must have done this before", Googled "reddit raspberry pi network performance monitor" and found someone who had done exactly what I described above, and he even posted a setup script for it!

 

GitHub - mr-canoehead/network_performance_monitor: Network Performance Monitor - a portable tool for troubleshooting performance issues with home networks

 

This looks like it is exactly what you need, and it should be easy to install too.

Link to post
Share on other sites

51 minutes ago, LAwLz said:

Sounds like you'd want something like Squid (a web proxy).

 

DNS (like Pi-hole) won't work in your scenario since web traffic doesn't go through the DNS. A DNS is like a phone book. You use it to look up a number (or in the case of a DNS, the IP adress) and once you got the number, you can make calls without checking with the phonebook (or DNS) again.

 

Please note that Squid would require configuration on the clients (set it as the web proxy), it is easily bypassed, not all programs might use it (requires setting proxy settings in each individual program unless they support automatic proxy detection), and it doesn't have a built in monitoring tool.

 

 

 

I have a feeling GNU/Linux should have some built in tools that could be used to do what you want to do but I can't think of it right now.

 

Edit: Found a better way of doing it. It probably works without having to install third party programs as well, but it will require a lot of configuration and more GNU/Linux experience than I got.

 

1) Get a Raspberry Pi with an Ethernet port, and get a USB network dongle.

2) Bridge those two networking interfaces.

3) Get a bandwidth monitoring service like iftop.

4) ???

5) Profit.

 

 

Edit 2:

I wrote that edit and thought "surely someone must have done this before", Googled "reddit raspberry pi network performance monitor" and found someone who had done exactly what I described above, and he even posted a setup script for it!

 

GitHub - mr-canoehead/network_performance_monitor: Network Performance Monitor - a portable tool for troubleshooting performance issues with home networks

 

This looks like it is exactly what you need, and it should be easy to install too.

I will check it out. Thank you!

 

 

Breaking things 1 day at a time

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×