Configure netconf ssh to work with both IPv4 and IPv6

I am using confd version 6.3. I’m trying to set it up to be able to ssh with netconf over ipv4 and ipv6. My related configuration looks as follows:

  <netconf>
    <enabled>true</enabled>
    <transport>
      <ssh>
        <enabled>true</enabled>
        <ip>::</ip>
        <port>2022</port>
      </ssh>

      <!-- NETCONF over TCP is not standardized, but it can be useful
           during development in order to use e.g. netcat for scripting.
      -->
      <tcp>
        <enabled>true</enabled>
        <ip>127.0.0.1</ip>
        <port>2023</port>
      </tcp>
    </transport>
    ....
</netconf>

Which result in

root@0eeefd5ae80c:/shared# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
...
tcp6       0      0 :::2022                 :::*                    LISTEN     

When I change ip to 0.0.0.0 then it listens over ipv4. But I am not able to set both ipv4 and ipv6. Is it even possible?

Yes, of course. Have a look at extraIpPorts in the confd.conf(5) man page, it allows you to configure both “0.0.0.0” and “::”.

Superb!

Works fine, thank you very much!