Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/haproxy: unable to configure to listen on IPv6 address #540

Closed
abraxxa opened this issue Feb 1, 2018 · 15 comments
Closed

net/haproxy: unable to configure to listen on IPv6 address #540

abraxxa opened this issue Feb 1, 2018 · 15 comments
Assignees
Labels
support Community support

Comments

@abraxxa
Copy link

abraxxa commented Feb 1, 2018

When I try to configure a Public Service listening to an IPv6 address the following error is display on save:

Please provide a valid listen address, i.e. 127.0.0.1:8080 or www.example.com:443. Port range as start-end, i.e. 127.0.0.1:1220-1240

I guess this is just a validation error.
I tried both 2a01:....:1:443 as well as [2a01:.....:1]:443

OPNSense verion 18.1_1
os-haproxy plugin version: 2.4
UI URL: https://firewall.hartmaier.priv.at/ui/haproxy/#frontends

@abraxxa
Copy link
Author

abraxxa commented Feb 1, 2018

@fraenki fraenki self-assigned this Feb 2, 2018
@fraenki fraenki added the bug Production bug label Feb 2, 2018
@fraenki
Copy link
Member

fraenki commented Apr 16, 2018

@abraxxa I can't reproduce this on OPNsense 18.1.6 (anymore). Is this still not working for you in the current release? If yes, then please provide a screenshot of the error message and the values that are not working.

@fraenki
Copy link
Member

fraenki commented May 19, 2018

Closing this issue, because I can't reproduce it. Please report back how to reproduce this issue and provide a screenshot of the error.

@fraenki fraenki closed this as completed May 19, 2018
@fraenki fraenki added support Community support and removed bug Production bug labels May 19, 2018
@abraxxa
Copy link
Author

abraxxa commented May 20, 2018

Sorry for the delay, marking mails as important in the inbox isn't sufficient enough :(
I've checked it with 18.1.8 and it works now, thanks!

@fraenki
Copy link
Member

fraenki commented May 20, 2018

@abraxxa Thanks for the confirmation!

@ssbarnea
Copy link

ssbarnea commented Sep 4, 2019

Clearly something is not working even with latest 19.7. I tried to add something like [2a02:8765:d000:123::1]:443 and it refuses to add it, displaying an error message which is useless for those trying to add an IPv6 address: Please provide a valid listen address, i.e. 127.0.0.1:8080 or www.example.com:443. Port range as start-end, i.e. 127.0.0.1:1220-1240.

@mimugmail
Copy link
Member

fraenki added a commit to fraenki/plugins that referenced this issue Sep 4, 2019
@fraenki
Copy link
Member

fraenki commented Sep 4, 2019

@ssbarnea Please try this patch:

opnsense-patch -c plugins ec84327a

@fraenki fraenki reopened this Sep 4, 2019
@ssbarnea
Copy link

ssbarnea commented Sep 4, 2019

@fraenki I applied the patch, restarted all services and I did allow me add the address. Still, I think that binding to ipv6 does not work for the haproxy.

I tried running netstat -ln6 and I am unable to see anything on 80 or 443, even if I configured them as public services. I do see port 53 open and I know that unbound is working on ipv6.

@mimugmail
Copy link
Member

Can you try sockstat -6

@fraenki
Copy link
Member

fraenki commented Sep 5, 2019

@ssbarnea I don't have an IPv6 test box, but binding on local IPV6 seems to work.

root@opnsense-test:~ # sockstat -6 | grep haproxy
www      haproxy    99791 4  tcp6   ::1:8088              *:*
www      haproxy    99791 12 tcp6   ::1:8080              *:*

Your HAProxy log may reveal why it is unable to bind to a certain address. Additionally, you may want to check if there are more detailed startup messages when using the RC script to start HAProxy:

root@opnsense-test:~ # service haproxy stop
Waiting for PIDS: 99791.
root@opnsense-test:~ # service haproxy start
Starting haproxy.

@abraxxa
Copy link
Author

abraxxa commented Sep 5, 2019

For me binding haproxy to the Internet IPv6 address assigned via DHCP works as long as the static IPv6 address entered in the haproxy config is available and hasn't changed.

@fraenki
Copy link
Member

fraenki commented Sep 5, 2019

works as long as the static IPv6 address entered in the haproxy config is available and hasn't changed

True. HAProxy will even refuse to start if the configured listen address is unavailable (i.e. not configured on a local interface).

@ssbarnea
Copy link

ssbarnea commented Sep 9, 2019

I can confirm that this patches worked. Sorry that it took so long to reply. I mention that for some reason I had to add an extra rule to the firewall but that is clearly unrelated to the patch.

Thanks for fixing that!

@fraenki
Copy link
Member

fraenki commented Sep 9, 2019

@ssbarnea Thanks for testing! The patch will be included in the upcoming release 2.19 of os-haproxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Community support
Development

No branches or pull requests

4 participants