【问题标题】:Checking ipv4 & ipv6 forwarding in C for Linux and FreeBSD在 C 中为 Linux 和 FreeBSD 检查 ipv4 和 ipv6 转发
【发布时间】:2011-11-28 18:25:14
【问题描述】:

我正在尝试确定是否允许转发(对于我的应用程序是必需的)。我需要检查 Linux 和 FreeBSD。可惜G叔没有返回任何结果。

【问题讨论】:

    标签: linux ipv6 freebsd forwarding ipv4


    【解决方案1】:

    您可以在 BSD 上使用 sysctl 来读取 net.inet.ip.forwarding,在 Linux 上使用 net.ipv4.ip_forward(或 net.ipv4.conf.all.forwarding,它们是同义词)和 net.ipv6.conf.all.forwarding

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-06
      • 2016-09-18
      • 1970-01-01
      • 1970-01-01
      • 2013-03-10
      • 1970-01-01
      相关资源
      最近更新 更多