【问题标题】:Set both ipv4 and ipv6 for confd netconf ssh connection为 confd netconf ssh 连接设置 ipv4 和 ipv6
【发布时间】:2019-11-28 06:47:13
【问题描述】:

我使用的是 confd 6.3 版。我正在尝试将其设置为能够通过 ipv4 和 ipv6 使用 netconf 进行 ssh。我的相关配置如下:

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

导致

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     

当我将 ip 更改为 0.0.0.0 时,它会通过 ipv4 进行侦听。但我无法同时设置 ipv4 和 ipv6。有没有可能>

【问题讨论】:

  • 哈哈,很好,我收到了一个减号,但没有评论,没有人能够回答我的问题。

标签: ssh confd netconf


【解决方案1】:

原来可以使用manifest中没有描述的参数。所以为了做到这一点,可以使用:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-05
    • 2010-12-09
    • 2020-09-18
    • 2012-07-12
    • 1970-01-01
    • 2021-11-08
    • 2012-09-10
    相关资源
    最近更新 更多