我认为双栈 ipv4 / ipv6 是必要的,nginx、apache、ssh 在 ipv4 和 ipv6 接口上都监听。但是在使用 tvheadend 之后,我发现即使它只监听 ipv6 堆栈,它也会响应 ipv4 地址……为什么?这是证明:
sudo lsof -i -P -n
tvheadend 3676 hts 33u IPv6 679854 0t0 TCP 192.168.0.8:9981->192.168.0.4:57868 (ESTABLISHED)
ipv6 堆栈使用 192.168.xx ipv4 地址...
并且在 ipv4 上没有监听:
sudo lsof -i -P -n | grep LISTEN | grep tvheadend
tvheadend 3676 hts 7u IPv6 439770 0t0 TCP *:9981 (LISTEN)
tvheadend 3676 hts 8u IPv6 439773 0t0 TCP *:9982 (LISTEN)
sudo netstat -tlnp | grep tvheadend
tcp6 0 0 :::9981 :::* LISTEN 3676/tvheadend
tcp6 0 0 :::9982 :::* LISTEN 3676/tvheadend