I am a using dd-wrt router and trying to get some per-user metrics, I was wondering about filtering only ESTABLISHED connections or include NEW and RELATED, I have read a lot about this last two, but I am still not sure about considering it part of used bandwidth...

Well, first check the following script: http://pastebin.com/TERtu4hT

Let us say I am not excluding any state, I want to get all of them, what happened is:

  1. We have UPnP activated;
  2. Skype uses UPnP;
  3. This machine opened TCP and UDP ports for Skype over UPnP;
  4. The machine is now offline;
  5. There is still requests from remote users to connect to this machine over UDP port;
  6. Sometimes I receive NEW state connections, which conntrack says is UNREPLIED, but iptabless still consider its bandwidth;
  7. All other states: ESTABLISHED, RELATED, INVALID and UNTRACKED, remains zero or unchanged;

The result could be seen here: http://pastebin.com/0vS0jLwv

What should I do? Considering only ESTABLISHED connections would solve, but is it the correct metrics? Or there is any way to iptables ignore UNREPLIED packages?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.