osx - OS X limiting bandwith

08
2014-07
  • dash1e

    I'm doing some test with bandwidth limiting on my Mac (OS X 10.9.3), and I have this unexpected behavior if I use the loopback interface.

    I create a limited pipe

    ipfw pipe 1 config bw 10KByte
    

    and I add two rules on it

    ipfw add 1 pipe 1 dst-port 8080 via lo0
    ipfw add 1 pipe 1 src-port 8080 via lo0
    

    So any traffic to and from localhost:8080 should be limited. But in real what I see is that the download to the browser is limited (and so slow) but the upload to the web server is fast (and not limited).

    If I use a real interface (for example en0) instead of lo0 everything works fine.

    Any suggestion or explanation?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    osx - Limit programs that can connect to the internet on OS X
  • asdf

    I got a 3G modem and a sim card. I have a 100MB day limit and although I mostly use firefox and thunderbird and I take care, sometimes it seems that something is using bandwidth but i do not know exactly what program.

    How could i tell OS X that only firefox and thunderbird can connect to the internet? so I avoid checking if the rest of the applications connect to the inrenet


  • Related Answers
  • James

    OS X has an IPFW firewall, so you might be able to configure this to your needs.

    A more user friendly solution would be Little Snitch, which has a free version (prompts every three hours) if you don't want to buy it.

  • MDMarra

    Little Snitch can do it.

  • diciu

    To get a list of processes that have open connections, you can use:

    sudo lsof | grep -i tcp | grep ESTABLISHED