# Serving on IPv6

**URL:** <https://discourse.mitmproxy.org/t/serving-on-ipv6/331>\
**Category:** help\
**Created:** [January 28, 2017, 10:53pm UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331 "2017-01-28T22:53:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hedger](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/hedger/32/106_2.png) [@hedger](https://discourse.mitmproxy.org/u/hedger)\
**Post date:** [January 28, 2017, 10:53pm UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331/1 "2017-01-28T22:53:41Z")

</div>

Hello.  
I can’t set up mitmproxy to listen on any IPv6 interface - be it a loopback or a regular interface. I tried different -b options, including “::”, “::1”. “[::]”, “[::1]” and others on Windows and Linux – with same results,  
`Error starting proxy server: gaierror(11001, 'getaddrinfo failed')`  
on Windows,  
and similar error  
`Error starting proxy server: gaierror(-9, ...`  
on Linux/FreeBSD. What am I missing?

---

<div class="post-metadata">

**Author:** ![ujjwal96](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/ujjwal96/32/111_2.png) [@ujjwal96](https://discourse.mitmproxy.org/u/ujjwal96)\
**Post date:** [January 29, 2017, 3:06pm UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331/2 "2017-01-29T15:06:57Z")

</div>

@hedger [Got error "gaierror: [Errno -2] Name or service not known" when run py.test](https://discourse.mitmproxy.org/t/got-error-gaierror-errno-2-name-or-service-not-known-when-run-py-test/129/4)  
Try this

---

<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:** [February 5, 2017, 11:34am UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331/3 "2017-02-05T11:34:35Z")

</div>

@ujjwal96: I think that’s unrelated. AFAIK the relevant code is just hardcoded to IPv4: [https://github.com/mitmproxy/mitmproxy/blob/2316c0fb74efefd76970c685b8f77f45834f1490/mitmproxy/net/tcp.py#L921](https://github.com/mitmproxy/mitmproxy/blob/2316c0fb74efefd76970c685b8f77f45834f1490/mitmproxy/net/tcp.py#L921)

This is something we should fix at some point. Feel free to open a GitHub issue for this so that it doesn’t get lost!

---

<div class="post-metadata">

**Author:** ![ujjwal96](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/ujjwal96/32/111_2.png) [@ujjwal96](https://discourse.mitmproxy.org/u/ujjwal96)\
**Post date:** [February 5, 2017, 12:54pm UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331/4 "2017-02-05T12:54:49Z")

</div>

Ah I see, I probably didn’t read the question correctly that time.  
Sure I’ll open an issue 🙂

---

<div class="post-metadata">

**Author:** ![hedger](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/hedger/32/106_2.png) [@hedger](https://discourse.mitmproxy.org/u/hedger)\
**Post date:** [February 5, 2017, 4:30pm UTC](https://discourse.mitmproxy.org/t/serving-on-ipv6/331/5 "2017-02-05T16:30:19Z")

</div>

I added support for that, [https://github.com/mitmproxy/mitmproxy/pull/1995](https://github.com/mitmproxy/mitmproxy/pull/1995)
