IPv6 :: (all interfaces) not working

21 December 2014, 21:48
I want to run Hiawatha on port 80 on all IPv6 interfaces.
However, when I try to do this, I get a "listen(http(s)): Address already in use" error, and the server ends up not running at all.

The relevant section of the config file is:
Binding {
Port = 80
Interface =
# MaxKeepAlive = 30
# TimeForRequest = 3,20

Binding {
Port = 80
Interface = ::

It can bind to ::1 (IPv6 localhost), and if I specify any other specific IPv6 addresses in the config file, it'll bind to those without a problem, but that isn't a solution since those IPs change each time I reboot.

Bonus question: I know that port forwarding isn't needed with IPv6. But how do I access my server from the internet via IPv6?

Hiawatha version: 9.9
Operating System: Ubuntu 14.04.1 LTS
15 June 2015, 15:37
The problem is that binding :: (all IPv6 addresses) ALSO binds all IPv4 addresses.

This is probably not a good software behavior. It also makes AccessLists problematic since you have to prefix all IPv4 addresses with ::ffff: as they have been bound as IPv6 addresses
15 June 2015, 15:39
To clarify, I can bind :: if I take out the bind. (But doing it this way causes the IPv4 addresses to have the ::ffff: prefix.)
Hugo Leisink
15 June 2015, 18:43
I'm afraid I can't fix this. This is the way Linux works. All I do is use the bind() system call. My advice is to use a separate binding for each interface and per IP version.
This topic has been closed.