znc / znc-docker

https://hub.docker.com/_/znc/
49 stars 29 forks source link

Cant enable IPv6 listener #19

Closed cwchristerw closed 5 years ago

cwchristerw commented 5 years ago

Does container have IPv6 address? YES docker exec -it znc ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN qlen 1000
    link/ether 00:23:24:3e:d4:86 brd ff:ff:ff:ff:ff:ff
4: docker-local: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
    link/ether 02:42:42:f5:51:07 brd ff:ff:ff:ff:ff:ff
    inet 10.254.1.1/24 brd 10.254.1.255 scope global docker-local
       valid_lft forever preferred_lft forever
    inet6 fd80:deaf:1::1/64 scope global tentative 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link tentative 
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
    link/ether 02:42:7c:0d:10:80 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fd80:deaf::1/64 scope global tentative 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link tentative 
       valid_lft forever preferred_lft forever
6: yggdrasil: <POINTOPOINT,UP,LOWER_UP> mtu 65535 qdisc fq_codel state UNKNOWN qlen 500
    link/[65534] 
    inet6 DEDUCTED scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::f444:3a6a:f546:c3f4/64 scope link 
       valid_lft forever preferred_lft forever
7: hyperboria: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1304 qdisc fq_codel state UNKNOWN qlen 500
    link/[65534] 
    inet6 DEDUCTED scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::4887:da7e:aed6:6b67/64 scope link 
       valid_lft forever preferred_lft forever
8: wlx107b44562531: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 10:7b:44:56:25:31 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.41/24 brd 192.168.1.255 scope global dynamic wlx107b44562531
       valid_lft 61669sec preferred_lft 61669sec
    inet6 DEDUCTED scope global secondary dynamic 
       valid_lft 398sec preferred_lft 198sec
    inet6 DEDUCTED scope global dynamic 
       valid_lft 398sec preferred_lft 198sec
    inet6 fe80::1bb5:553f:1593:7f8f/64 scope link 
       valid_lft forever preferred_lft forever

ZNC.CONF: Removed all users for security

// WARNING
//
// Do NOT edit this file while ZNC is running!
// Use webadmin or *controlpanel instead.
//
// Altering this file by hand will forfeit all support.
//
// But if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.
// Also check https://wiki.znc.in/Configuration

AnonIPLimit = 10
AuthOnlyViaModule = false
ConfigWriteDelay = 0
ConnectDelay = 5
HideVersion = true
LoadModule = webadmin
LoadModule = adminlog
LoadModule = chansaver
LoadModule = lastseen
MaxBufferSize = 1500
ProtectWebSessions = true
SSLCertFile = /znc-data/znc.pem
SSLDHParamFile = /znc-data/znc.pem
SSLKeyFile = /znc-data/znc.pem
ServerThrottle = 30
Skin = dark-clouds
StatusPrefix = *
Version = 1.7.1

<Listener listener0>
    AllowIRC = true
    AllowWeb = true
    IPv4 = false
    IPv6 = true
    Port = 6697
    SSL = true
    URIPrefix = /
</Listener>

LOG

Checking for list of available modules... 
Opening config [/znc-data/configs/znc.conf]... 
Loading global module [webadmin]... 
Loading global module [adminlog]... 
Loading global module [chansaver]... 
Loading global module [lastseen]... 
Binding to port [+6697] using ipv6... [ IPv6 is not enabled ]
Unrecoverable config error.
cwchristerw commented 5 years ago

Cause znc-docker/slim/Dockerfile : Line 10

# musl silently doesn't support AI_ADDRCONFIG yet, and ZNC doesn't support Happy Eyeballs yet.
# Together they cause very slow connection. So for now IPv6 is disabled here.
ARG CMAKEFLAGS="-DCMAKE_INSTALL_PREFIX=/opt/znc -DWANT_CYRUS=YES -DWANT_PERL=YES -DWANT_PYTHON=YES -DWANT_IPV6=NO"
ARG MAKEFLAGS=""
DarthGandalf commented 5 years ago

As you already noticed, it's blocked on znc/znc#1571

Gunni commented 5 years ago

I just upgraded from I just upgraded from ZNC_VERSION=1.6.5 sha256:ab8809efa81a0080671430cde2fa0727dceb8c988371061a95e2088061f139a4 to the latest one, and my setup is now broken.

My listener is IPv6 only and no, i will not go back to IPv4, and i have 0% need for happy eyeballs, my znc server only has a AAAA record.

Please at least allow ipv6.

Until then, downgrading for a more sane build.

DarthGandalf commented 5 years ago

@Gunni the problem is that we have a single flag which disables IPv6 everywhere. This ticket is about connection between client and ZNC, while znc/znc#1571 is about connection between ZNC and server. Theoretically they are unrelated, but currently we have no way to have IPv6 on one but not another.

DarthGandalf commented 5 years ago

Because socket refactoring takes so long, I'd accept a temporary way to disable only one side of it for now. Would you be willing to write a patch?