sshconfdnetconf

Set both ipv4 and ipv6 for confd netconf ssh connection


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>


Solution

  • It turned out that it is possible to use a parameter that is not described in manifest. So in order to do that can be used:

    ...
      <netconf>
        <enabled>true</enabled>
        <transport>
          <ssh>
            <enabled>true</enabled>
            <ip>0.0.0.0</ip>
            <port>2022</port>
            <extraIpPorts>:::830</extraIpPorts>
          </ssh>
      </netconf>
    ...