# Bind(Listen) IPv4 --\> server (backend) conncet ipv6

**URL:** <https://discourse.haproxy.org/t/bind-listen-ipv4-server-backend-conncet-ipv6/1318>\
**Category:** Help!\
**Created:** [June 15, 2017, 9:59am UTC](https://discourse.haproxy.org/t/bind-listen-ipv4-server-backend-conncet-ipv6/1318 "2017-06-15T09:59:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amir](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@amir](https://discourse.haproxy.org/u/amir)\
**Post date:** [June 15, 2017, 9:59am UTC](https://discourse.haproxy.org/t/bind-listen-ipv4-server-backend-conncet-ipv6/1318/1 "2017-06-15T09:59:17Z")

</div>

Hi,  
I would like to configure HAProxy for HTTP Listener to listen on ipv4  
I would like the resolver to query the DNS for servername and to get the server IPV6  
I would like HAProxy to connect to the resolved ip via ipv6  
is it supported by HAproxy 1.6.3 ?  
Can someone show sample of configuration ?

if i will add to the server line resolve-prefer ipv6 , it will query the resolver for ipv6 and connect to the server via ipv6 no matter that the bind is ip v4 ?

example  
server s1 [app1.domain.com:80](http://app1.domain.com:80) resolvers mydns resolve-prefer ipv6

Thanks  
Amir

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [June 15, 2017, 10:11am UTC](https://discourse.haproxy.org/t/bind-listen-ipv4-server-backend-conncet-ipv6/1318/2 "2017-06-15T10:11:46Z")

</div>

> [@amir](#):
>
> if i will add to the server line resolve-prefer ipv6 , it will query the resolver for ipv6 and connect to the server via ipv6 no matter that the bind is ip v4 ?

Yes. The address-family of the frontend configuration is completely irrelevant to the backend’s; so yes, you configuration should be fine.
