Page 1 of 1
Z-Way Webserver IPV6 support
Posted: 07 Nov 2016 11:58
by webster1501
Hello,
I am looking for a way how to bring the Z-Way Webserver to listen on a specific IPV6 port.
I found a line in the Automation/Webserver.js file where you can determine the port, but this seems to be only working for IPV4 ?
<<ws = new WebServer(8083, function(req)>>
Any idea ?
Best regards
Thomas
Re: Z-Way Webserver IPV6 support
Posted: 06 Jan 2017 18:44
by PoltoS
You can use "addr:port" instead of port.
Re: Z-Way Webserver IPV6 support
Posted: 11 Oct 2021 03:48
by harre
PoltoS wrote: ↑06 Jan 2017 18:44
You can use "addr:port" instead of port.
How do you mean I should change it to listen on all IPv6-adresses on host?
Re: Z-Way Webserver IPV6 support
Posted: 12 Oct 2021 02:26
by harre
I solved it by using the program socat in a systemd service unit.
My solution exposes port 18083 on IPv6 and I'm successfully able to access it from IPv6 using that port.
create file
/lib/systemd/system/z-way-ipv6-listen.service with the following content:
Code: Select all
[Unit]
Description=Adds a IPv6 listen port for z-way
After=multi-user.target
After=network-online.target
Wants=network-online.target
[Service]
Type=idle
ExecStart=socat TCP6-LISTEN:18083,fork,reuseaddr TCP4:127.0.0.1:8083
Restart=always
[Install]
WantedBy=multi-user.target
And then enable the service with:
Code: Select all
sudo systemctl daemon-reload
sudo systemctl enable --now z-way-ipv6-listen.service