# Can mitmproxy be used to drop traffic to specific destinations

**URL:** <https://discourse.mitmproxy.org/t/can-mitmproxy-be-used-to-drop-traffic-to-specific-destinations/207>\
**Category:** help\
**Created:** [October 18, 2016, 7:27pm UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-be-used-to-drop-traffic-to-specific-destinations/207 "2016-10-18T19:27:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![garthoid](https://avatars.discourse-cdn.com/v4/letter/g/3ab097/32.png) [@garthoid](https://discourse.mitmproxy.org/u/garthoid)\
**Post date:** [October 18, 2016, 7:27pm UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-be-used-to-drop-traffic-to-specific-destinations/207/1 "2016-10-18T19:27:21Z")

</div>

So I am a mitmproxy newb and I have an awkward network situation. I am considering if mitmproxy can help. However a search in docs and forums so far has not been conclusive.

My use case is that I wish to drop traffic

The version I am using is v0.15 (its what the version of ubuntu supports).

I see from other discussions for this version that I want a limit filter (l) however its not clear to me the syntax for the filter exactly. An example would be great. I am familiar with regex so I am comfortable with the domain/ip regex I need. However its not clear to me exactly how that would be entered at the prompt. Using [http://docs.mitmproxy.org/en/stable/features/filters.html](http://docs.mitmproxy.org/en/stable/features/filters.html) as a guide I am guessing I would enter ~hq host:regex at the Limit: prompt.

But it does not appear to help.

Suggestions?

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [October 23, 2016, 4:47am UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-be-used-to-drop-traffic-to-specific-destinations/207/2 "2016-10-23T04:47:47Z")

</div>

0.15 is pretty old - I would recommend using the [latest stable](http://docs.mitmproxy.org/en/stable/install.html) in any case. 🙂

There are a couple of examples on the docs page you linked to - what’s the condition you want to filter on?

---

<div class="post-metadata">

**Author:** ![garthoid](https://avatars.discourse-cdn.com/v4/letter/g/3ab097/32.png) [@garthoid](https://discourse.mitmproxy.org/u/garthoid)\
**Post date:** [October 23, 2016, 1:55pm UTC](https://discourse.mitmproxy.org/t/can-mitmproxy-be-used-to-drop-traffic-to-specific-destinations/207/3 "2016-10-23T13:55:40Z")

</div>

By filter do you mean - to not display on screen when it arrives at the proxy? I wish to drop the request from being sent on which I gather from testing is not a feature that MITMPROXY provides.
