Z-Way Webserver IPV6 support

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
webster1501
Posts: 1
Joined: 07 Nov 2016 11:50

Z-Way Webserver IPV6 support

Post 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
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Z-Way Webserver IPV6 support

Post by PoltoS »

You can use "addr:port" instead of port.
harre
Posts: 95
Joined: 24 Nov 2020 02:22

Re: Z-Way Webserver IPV6 support

Post 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?
harre
Posts: 95
Joined: 24 Nov 2020 02:22

Re: Z-Way Webserver IPV6 support

Post 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
Post Reply