MRTG & proxy, some advice needed.

ponder

Honorary Master
Joined
Jan 22, 2005
Messages
98,646
Reaction score
31,306
Location
Niflheimr
Ok here's the scenario. Got a desktop & laptop both running Manjaro (so anything Arch will work here), the laptop essentially serves as my download box 24/7 for torrents, news servers, wget etc which I access via ssh/sftp.

I want to run mrtg on the laptop to monitor my download speeds etc, I also want it to act as a proxy/gateway for my desktop so all traffic from the desktop goes via the laptop. Problem is the laptop only has a single ethernet port so I'm assuming this is gonna fsck with mrtg bandwidth monitoring. Any ideas on how to get around this, maybe vlan between the two but that will still reflect on the ethernet port?

I don't want to use wireless between the two.
 
Vlans can work, then you can monitor the direct ethernet port, as well as the individual vlan ports, they show up as regular network devices on most graphing solutions like Observium automatically.

With cacti, you can then create a manual graph, where you subtract the pc vlan's traffic from the direct ethernet port, to figure out what the laptop's traffic is. One of Cacti's best features, and easiest one I can think of if you don't know how to do that yourself with mrtg.

The other option is, to create iptable rules that catch your laptop's direct traffic and exclude forwarding traffic, which you then graph in MRTG instead of the ethernet port. In actual fact, this is how most VPS solutions work to graph each VPS on a physical host individually without needing access to the OS on the VPS.
 
Thanks, that's great advice. I just remembered I have a pcmcia ethernet card somewhere so this might become a simple job, that is if I can find it :D
 
Top
Sign up to the MyBroadband newsletter
X