@arduarn. At least, your solution compile. I had to change one more variable type in a function definition to make it compile on a DUE.
With the DUE, I don't have the bug to print localIp().
Still, I can't establish a connection with the example webpage given, neither telnet...