Page 1 of 3
IPv6 support on Domoticz
Posted: Friday 26 June 2015 7:47
by tlpeter
Is there IPv6 support on Domoticz?
Enabling IPv6 seems to be easy (not sure if this is possible in the current image) on Rasbpian.
At the moment ARIN is running out of IPv4 addresses in a couple of weeks.
At the moment not implementing IPv6 means getting behind.
I have XS4all as internet provider (Dutch provider) and i have a /48 so i can provide my PI as IPv6 address (and test)
Re: IPv6 support on Domoticz
Posted: Friday 26 June 2015 10:01
by MacJL
+1
I'm using IPv6 for years. I've activaed it on raspbian. The Rasberry has a valid IPv6 address. The IPv6 adress works well with SSH, but domoticz doesn't listen on tcp6 stack, as ssh do :
pi@domoticzpi ~ $ netstat -ln | egrep "22|8080"
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
Re: IPv6 support on Domoticz
Posted: Friday 26 June 2015 11:10
by Thomasdc
I dont see the benefits for IPv6 for your home network?
that 'the internet' (WAN side) goes on IPv6 is understandeble..
But in your home netwerk (LAN-side) you can still use ipv4.
inst it so that there is much more data on your netwerk when you use IPv6? --> network overhead
so for an LAN netwerk, in my opinion, is it better to use IPv4
(and its much easier to remember IPv4 ip addresses

Re: IPv6 support on Domoticz
Posted: Friday 26 June 2015 11:16
by MacJL
Thomasdc wrote:I dont see the benefits for IPv6 for your home network?
that 'the internet' (WAN side) goes on IPv6 is understandeble..
But in your home netwerk (LAN-side) you can still use ipv4.
If your local computer is IPv4 only, it can't connect to an IPv6 only server.
Thomasdc wrote:
inst it so that there is much more data on your netwerk when you use IPv6? --> network overhead
so for an LAN netwerk, in my opinion, is it better to use IPv4
TCP has more network overhead than UDP. Do you use exclusively UDP ?
Thomasdc wrote:(and its much easier to remember IPv4 ip addresses

DNS are much more easier to remember, and works with IPv6.
Re: IPv6 support on Domoticz
Posted: Friday 26 June 2015 12:53
by tlpeter
Remote access over IPv6 is a good example.
You should not really be worried of being hacked as fast as with IPv4 plus you should also use a firewall.
Using IPv6 on an internal network, why not?
My PC's have both and IPv6 is used first and then IPv4.
Google and facebook are reachable by IPv6 and when i visit those sites then IPv6 is used.
It is a matter of time before IPv4 addresses run out, in fact the ARIN region is running out very soon (this month is the prediction)
Re: IPv6 support on Domoticz
Posted: Saturday 27 June 2015 9:06
by gizmocuz
Thomasdc wrote:I dont see the benefits for IPv6 for your home network?
that 'the internet' (WAN side) goes on IPv6 is understandeble..
But in your home netwerk (LAN-side) you can still use ipv4.
+1 makes total sense
Re: IPv6 support on Domoticz
Posted: Saturday 27 June 2015 9:20
by tlpeter
I am sorry but then you do not understand the matter at all.
IPv6 solves a lot problem that are now fixed with workarounds.
Why not implement it and let the user make the choice?
In the near feature more and more equipment will get an external IP address.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 13:42
by gizmocuz
tlpeter wrote:I am sorry but then you do not understand the matter at all.
IPv6 solves a lot problem that are now fixed with workarounds.
Why not implement it and let the user make the choice?
In the near feature more and more equipment will get an external IP address.
let me be a bit clear:
- many hardware only supports IPV4
- its impossible for (me) to remember IPV6 addresses
- internally in your home network, you can keep using the private IPV4 address range
if you have a good router, it will support IPV6 to your ISP
if you have a good router, you are able to forward specific ports still to internal private IPV4 addresses
and they said it 10 years ago already that IPV4 will run out...
thats why most ISP's these days wont provide a fixed ip address
So yes, i understand this correctly, and no, nothing to worry about in your internal DMZ which can still be IPV4 of course !
But, you might ask the question, OK, inside i understand, how about domoticz connecting to an external TCP device that is using an IPV6 address
(For example a slave domoticz system)
... That at the moment is not yet possible....
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 13:50
by tlpeter
Hi Gizmo,
I understand you too, don't get me wrong
There is no need to remember those ip addresses (impossible task) that if where hostnames come in.
I now can connect by using the hostname instead of ip address.
All that is needed is adding the possibility to enter ipv6 addresses.
Of course it will take some years before ipv4 will be gone but it won't take that long anymore.
Is it an option to enable ipv6 in the image for now?
This is very easy.
I have installed it and it uses dhcp for ipv6
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 13:55
by pepijn
Easy. sudo modprobe ipv6 will enable it immediately. If you want it to automatically be enabled at boot, just add ipv6 on a line by itself at the end of /etc/modules.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 13:58
by tlpeter
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 14:37
by chimit
So, the wonders of using Boost as a platform.
I just did a successful ip0v6 test with a 1-line (!) patch of the code.
I will send it to Gizmocuz so he can add it to the new development version.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 15:13
by gizmocuz
from #2605, the domoticz webserver also listens on IPV6 addresses (big thanks to chimit!)
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 15:22
by gizmocuz
patch reverted.... need more time to check, internal network addresses where not recognized anymore
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 15:31
by tlpeter
I had that indeed and i could not connect to the IPv4 address anymore.
I needed to do a hard reset (pull the power) and start it again.
I will upgrade again

Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 16:17
by chimit
Sorry. We need some more time everything to test before committing.
Even though the IPv4 address does work for me.
We will get back.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 19:59
by chimit
Is there any demand for IPv6 to begin with at the moment?
I've got code patches for the built in webservers, as well as de Remote Domoticz server & client.
But before integrating them in the SVN code this needs to be tested thoroughly.
So if you (want to) see IPv6 support in Domoticz, and want to help out with testing, please PM me.
== Rene
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 20:31
by tlpeter
It depends on what needs to be tested but I can run IPv6 only when needed to test.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 21:21
by MacJL
I can test IPv6 with apache reverse proxy to domoticz, Direct access, and domoticz remote server.
Re: IPv6 support on Domoticz
Posted: Sunday 28 June 2015 21:44
by chimit
Attached is a zip file with two patches.
ipv6patch1.diff is the patch that enables webserver and remote domoticz server ipv6 functionality.
It also includes code to have the local address ipv4 recognized as "Local Lan" address. If you put an IPv6 address there it still doesn't work (known issue).
This patch was developed on a Raspberry so your mileage may vary trying to compile it on another platform.
dc_client_ipv6_patch1.diff is the client-side remote domoticz server patch. Unlike other parts of Domoticz, unfortunately, this is a non-Boost based implementation.
But after applying this patch, you can enter an IPv6 address when you set up a remote domoticz server in "Add Hardware".
This patch was developed on a Windows machine.
To apply a patch, checkout the latest Domoticz SVN version (see wiki) and copy the .diff file(s) in the domoticz folder.
Then type "patch -p0 < name_of_patch.diff" for each of the files.
Best is to apply both patches at the same time. And then re-compile.
On Windows, I do this in a Cygwin session.
If you want to go back to the original code, you can always go back with: "svn revert -R ." from within the domoticz folder.
This will revert any and all changes that you made into the code since last checkout.
Things to test:
- Functionality of IPv4 and IPv6 servers and clients (http & https).
- On a mixed IPv4 and IPv6 system
- On an IPv6 only system
- On an IPv4 only system (so we make sure it also still works for the majority of the users)
- Local LAN configuration settings
- Other things that you may think of that might affect functionality.
This patch was only made today so still fresh. For sure there will be issues that you will find. I am interested to know those.
== Rene