hzqim
V2EX  ›  问与答

绑定 公网 ip 和绑定 0.0.0.0 有区别吗?

  •  
  •   hzqim · Mar 20, 2015 · 3767 views
    This topic created in 4263 days ago, the information mentioned may be changed or developed.
    Linux 下某程序
    绑定 127.0.0.1 只能本机访问
    绑定 192.168.1.* 只能局域网内访问

    绑定 公网IP 所有终端都可以访问
    绑定 0.0.0.0 好像也是如此。

    那么绑定公网 IP 和绑定 0.0.0.0 有区别吗?

    请指导,谢谢。
    6 replies  •  2015-03-20 14:43:31 +08:00
    yanest
    yanest
    Mar 20, 2015❤️1
    1
    多个公网IP的话就有
    onlyice
    onlyice
    Mar 20, 2015❤️1
    2
    有区别。绑定 0.0.0.0 表示绑在所有网络接口上。比如你的环回接口(127.0.0.1)
    andybest
    andybest
    Mar 20, 2015❤️1
    3
    绑定 公网IP 仅用局域网 IP 无法访问的吧?
    xenme
    xenme
    Mar 20, 2015❤️1
    4
    同 @andybest ,我也有这个疑问,绑定在公网IP,怎么会LAN也可以访问呢?
    qingh
    qingh
    Mar 20, 2015❤️2
    5
    0.0.0.0是监听所有的存在网络接口上的所有IP地址。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1238 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 17:34 · PVG 01:34 · LAX 09:34 · JFK 12:34
    ♥ Do have faith in what you're doing.