Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Internet service providers are gradually chipping away at net neutrality and imposing bandwidth limits. Most users will need to trust their ISP to report accurate bandwidth consumption rates, and most will not be able to control the traffic generated by many devices on their home network.

I'd like to have a fine level of control over the data leaving my network and coming into it, view reports about attempted traffic, create comprehensive logs, and easily configure the service to permit or deny acceptable types of traffic or devices.

I'd like to be able to configure this service or application on a virtual machine running Ubuntu server on my network.

enter image description here

For example, I'd like to identify the connections and type of data a PS3, Xbox, Wii generates when attempting to download an update, deny or permit on my schedule, yet always allow online gaming traffic. I'd also like to block particular network chatter to certain advertisement servers or other CDNs. I've seen plug-ins for Firefox that re-write html to avoid downloading bulky video advertisements. It would be awesome to do that for all devices.

Many years ago I tinkered with IP tables, firewalls, and proxies on Ubuntu. Yet, I either didn't learn enough or simply don't recall that any of them by themselves provided a good comprehensive solution to this impending problem. They especially aren't geared for lay users. I'd like a little advice about where things are now. Should I use a combination of all three or is there a better or easier solution?

share|improve this question

migrated from May 22 '11 at 0:52

This question came from our site for system and network administrators.

Questions about home setups are not allowed on SF, please read the FAQ. – Chris S May 22 '11 at 0:49

Unless documented, you're going to have to sniff a boatload of traffic to determine activity/ports/protocols for each device, especially the "black box" devices like the gaming systems.

And this will be a full-time job -- one update could come down that completely changes the pattern of network activity and thus breaking your system. It's a full time job. Trust me, I spend many hours a month monitoring and adjusting rules, tuning alerts, etc. for a secure data center with only a half dozen hosts.

share|improve this answer
Thanks, I hadn't thought of it like that. I hoped that I could watch logs, see the requests, block and permit with a few regular expressions and tweak as new issues arose. – Michael Prescott May 22 '11 at 1:25

Once you have a box setup you can also use Etherape to get a visual representation of traffic and connection end-points. You can filter by host and protocol too.

share|improve this answer
 [ local network/wireless/hubs/PS3/etc ]---[firewall]--->to internet

Stick a linux host with two interfaces as a firewall between your local network and the internet. You then have full monitoring and control over all traffic. (Yes, two interfaces is not strictly necessary, but it is a lot simpler to set up and think about).

You will want to use iptables to control (permit, deny) traffic, and you will also need to use iptables to MASQUERADE (NAT) all of the local traffic to the (presumably) single IP address given to the firewall by your ISP. The firewall will also need to have ip forwarding turned on.

pcap and the linux interface statistics will be your tool to monitor what is going on. MRTG is a good tool to generate pretty graphs of bandwidth usage, but if you want to know who is generating the traffic, using tcpdump or one of the pcap statistics aggregation tools is your best bet.

There are tons of tutorials on getting a setup like this working. I should have provided all of the necessary keywords to get you going.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .