Skip to content

LiveKit ignores IP filters in v1.10+, causing massive log spam #4437

Closed

Description

@Hujgo

Describe the bug
Ever since upgrading from v1.9.12 to v1.10.0 (and v1.10.1), LiveKit is spamming the server logs with errors because it is trying to use every single internal Docker network and local IPv6 address.
When running in Docker with network_mode: host, this fills the logs with a massive wall of bind: invalid argument and failed to get external ip messages for all the internal 172.x.x.x and fe80:: addresses.

More importantly, the prober seems to completely ignore interfaces.includes or ips.excludes defined in the config file. Even when strict filters are set, it probes everything anyway and then dumps all of those unreachable virtual IPs into the final using external IPs list, causing massive ICE candidate bloat for connecting clients.

Server

  • Version: v1.10.0 and v1.10.1 (Worked perfectly in v1.9.12)
  • Environment: Docker (network_mode: host) on a Linux machine with multiple Docker bridge networks and a public dual-stack physical interface.
  • Config: use_external_ip: true with strict interfaces or ips.excludes configured.

Client

  • SDK: N/A
  • Version: N/A

To Reproduce
Steps to reproduce the behavior:

  1. Run LiveKit server v1.10.1 in Docker with network_mode: host on a machine that has several virtual Docker networks/bridges.
  2. In livekit.yaml, set use_external_ip: true and try to restrict bindings using either interfaces.includes: ["eth0"] or ips.excludes: ["fe80::/10", "172.16.0.0/12"]
  3. Start the server.
  4. Check the logs. You will see tons of STUN bind errors for fe80:: addresses and failed STUN lookups for 172.x addresses, followed by a bloated external IPs list.

Expected behavior
LiveKit should evaluate interfaces.includes and ips.excludes before the STUN prober attempts to bind and discover external IPs. Virtual networks and link-local addresses filtered out by the config should not be probed at all, and should definitely not be added to the final ICE candidate list. This is how it successfully behaved in v1.9.12

Logs v1.10.x

2026-04-08T22:54:30.852Z	INFO	livekit	routing/interfaces.go:180	using single-node routing
2026-04-08T22:54:30.934Z	INFO	livekit	rtcconfig/ip.go:206	found external IP via STUN	{"localAddr": "192.168.29.228:7882", "stunServer": "global.stun.twilio.com:3478", "externalIP": "{public_ipv4}"}
2026-04-08T22:54:30.958Z	INFO	livekit	rtcconfig/ip.go:206	found external IP via STUN	{"localAddr": "[2001:db8:2::1]:7882", "stunServer": "stun.l.google.com:19302", "externalIP": "{public_ipv6}"}
2026-04-08T22:54:30.958Z	INFO	livekit	rtcconfig/ip.go:206	found external IP via STUN	{"localAddr": "[2001:db8:3::1]:7882", "stunServer": "stun.l.google.com:19302", "externalIP": "{public_ipv6}"}
2026-04-08T22:54:30.958Z	INFO	livekit	rtcconfig/ip.go:206	found external IP via STUN	{"localAddr": "[2001:db8:1::1]:7882", "stunServer": "stun.l.google.com:19302", "externalIP": "{public_ipv6}"}
2026-04-08T22:54:30.958Z	INFO	livekit	rtcconfig/ip.go:206	found external IP via STUN	{"localAddr": "[{public_ipv6}]:7882", "stunServer": "stun.l.google.com:19302", "externalIP": "{public_ipv6}"}
2026-04-08T22:54:31.935Z	WARN	livekit	rtcconfig/ip.go:289	could not validate external IP	{"ip": "{public_ipv6}", "from": "[2001:db8:1::1]:7882", "error": "context canceled"}
2026-04-08T22:54:31.935Z	WARN	livekit	rtcconfig/ip.go:289	could not validate external IP	{"ip": "{public_ipv6}", "from": "[2001:db8:3::1]:7882", "error": "context canceled"}
2026-04-08T22:54:31.935Z	WARN	livekit	rtcconfig/ip.go:289	could not validate external IP	{"ip": "{public_ipv6}", "from": "[2001:db8:2::1]:7882", "error": "context canceled"}
2026-04-08T22:54:31.965Z	INFO	livekit	rtcconfig/webrtc_config.go:284	failed to get external ip	{"local": "2001:db8:1::1", "err": "context canceled"}
2026-04-08T22:54:31.965Z	INFO	livekit	rtcconfig/webrtc_config.go:284	failed to get external ip	{"local": "2001:db8:3::1", "err": "context canceled"}
2026-04-08T22:54:31.965Z	INFO	livekit	rtcconfig/webrtc_config.go:284	failed to get external ip	{"local": "2001:db8:2::1", "err": "context canceled"}
2026-04-08T22:54:31.965Z	INFO	livekit	rtcconfig/webrtc_config.go:102	using external IPs	{"ips": ["fe80::dc99:73ff:febe:c609/fe80::dc99:73ff:febe:c609", "fe80::b481:8eff:fef5:688b/fe80::b481:8eff:fef5:688b", "fe80::200f:b2ff:fe85:db59/fe80::200f:b2ff:fe85:db59", "172.18.0.1/172.18.0.1", "fe80::10a3:caff:fe18:6961/fe80::10a3:caff:fe18:6961", "fe80::10f1:8aff:fe05:1a13/fe80::10f1:8aff:fe05:1a13", "fe80::9cac:8fff:fe29:6532/fe80::9cac:8fff:fe29:6532", "fe80::50d3:42ff:fe03:3f8c/fe80::50d3:42ff:fe03:3f8c", "fe80::4b2:baff:feba:1a4a/fe80::4b2:baff:feba:1a4a", "fe80::8cb0:43ff:fef6:500c/fe80::8cb0:43ff:fef6:500c", "fe80::cc5b:c3ff:fe14:37d/fe80::cc5b:c3ff:fe14:37d", "fe80::8c2c:f8ff:fee7:e282/fe80::8c2c:f8ff:fee7:e282", "fe80::940b:5aff:fe7d:4c9b/fe80::940b:5aff:fe7d:4c9b", "fe80::647c:4fff:fe27:ff9c/fe80::647c:4fff:fe27:ff9c", "172.25.0.1/172.25.0.1", "fe80::f4c2:5cff:fe95:9f62/fe80::f4c2:5cff:fe95:9f62", "172.26.0.1/172.26.0.1", "fe80::dcf1:37ff:fe7f:704e/fe80::dcf1:37ff:fe7f:704e", "fe80::dc41:53ff:fe2e:39c/fe80::dc41:53ff:fe2e:39c", "172.19.0.1/172.19.0.1", "fe80::20dc:18ff:fe5f:602d/fe80::20dc:18ff:fe5f:602d", "fe80::8b2:d1ff:fe3a:bcf5/fe80::8b2:d1ff:fe3a:bcf5", "fe80::38d1:9bff:fe77:dd40/fe80::38d1:9bff:fe77:dd40", "fe80::483b:c1ff:fe44:ba41/fe80::483b:c1ff:fe44:ba41", "fe80::687f:d5ff:fe80:8df8/fe80::687f:d5ff:fe80:8df8", "fe80::882a:faff:fea7:1180/fe80::882a:faff:fea7:1180", "fe80::f4a3:94ff:fe58:9a70/fe80::f4a3:94ff:fe58:9a70", "fe80::9c1b:fcff:fe83:4f30/fe80::9c1b:fcff:fe83:4f30", "fe80::48f8:3ff:fecb:a885/fe80::48f8:3ff:fecb:a885", "fe80::50a1:8dff:fedb:5917/fe80::50a1:8dff:fedb:5917", "{public_ipv4}/192.168.29.228", "192.168.29.233/192.168.29.233", "172.24.0.1/172.24.0.1", "fe80::b42a:3fff:fe16:7e9/fe80::b42a:3fff:fe16:7e9", "fe80::9470:5ff:fe36:4597/fe80::9470:5ff:fe36:4597", "fe80::e063:59ff:feb4:67a9/fe80::e063:59ff:feb4:67a9", "fe80::74c0:d8ff:fec3:dfe3/fe80::74c0:d8ff:fec3:dfe3", "fe80::9c6a:8aff:fe79:6ce8/fe80::9c6a:8aff:fe79:6ce8", "172.23.0.1/172.23.0.1", "fe80::f02f:a3ff:fe1e:4dd9/fe80::f02f:a3ff:fe1e:4dd9", "172.22.0.1/172.22.0.1", "fe80::bc13:3dff:fe60:31b9/fe80::bc13:3dff:fe60:31b9", "fe80::dc6a:c560:9ec3:ab66/fe80::dc6a:c560:9ec3:ab66", "fe80::bc59:dcff:feeb:6e3c/fe80::bc59:dcff:feeb:6e3c", "fe80::ac3f:50ff:fe8e:3798/fe80::ac3f:50ff:fe8e:3798", "fe80::6cc3:bbff:fe04:8890/fe80::6cc3:bbff:fe04:8890", "fe80::6049:6fff:fe49:ee14/fe80::6049:6fff:fe49:ee14", "fe80::fcf3:bfff:fedc:aede/fe80::fcf3:bfff:fedc:aede", "fe80::3489:96ff:fec0:67b3/fe80::3489:96ff:fec0:67b3", "fe80::3ca8:7eff:fe02:d8fe/fe80::3ca8:7eff:fe02:d8fe", "fe80::ac38:2dff:fe0c:6c3e/fe80::ac38:2dff:fe0c:6c3e", "fe80::c62:b5ff:fe29:3cab/fe80::c62:b5ff:fe29:3cab", "2001:db8:1::1/2001:db8:1::1", "fe80::9050:33ff:fede:5f4c/fe80::9050:33ff:fede:5f4c", "172.20.0.1/172.20.0.1", "{public_ipv6}/{public_ipv6}", "172.21.0.1/172.21.0.1", "fe80::707f:9bff:fe21:485b/fe80::707f:9bff:fe21:485b", "fe80::7459:7eff:feeb:b55d/fe80::7459:7eff:feeb:b55d", "fe80::1cac:2eff:fe15:d0fd/fe80::1cac:2eff:fe15:d0fd", "fe80::9c45:f4ff:fe66:de4d/fe80::9c45:f4ff:fe66:de4d", "172.17.0.1/172.17.0.1", "2001:db8:3::1/2001:db8:3::1", "fe80::ec99:cdff:fe3f:6d51/fe80::ec99:cdff:fe3f:6d51", "fe80::c93:cdff:fe24:3742/fe80::c93:cdff:fe24:3742", "2001:db8:2::1/2001:db8:2::1"]}

Logs v1.9.12

2026-04-08T22:37:40.292Z	INFO	livekit	routing/interfaces.go:180	using single-node routing
2026-04-08T22:37:40.367Z	INFO	livekit	rtcconfig/ip.go:195	found external IP via STUN	{"localAddr": "192.168.29.228:7882", "stunServer": "global.stun.twilio.com:3478", "externalIP": "{public_ipv4}"}
2026-04-08T22:37:41.369Z	INFO	livekit	rtcconfig/webrtc_config.go:102	using external IPs	{"ips": ["172.25.0.1/172.25.0.1", "172.24.0.1/172.24.0.1", "172.20.0.1/172.20.0.1", "172.19.0.1/172.19.0.1", "{public_ipv4}/192.168.29.228", "192.168.29.233/192.168.29.233", "172.22.0.1/172.22.0.1", "172.18.0.1/172.18.0.1", "172.26.0.1/172.26.0.1", "172.21.0.1/172.21.0.1", "172.23.0.1/172.23.0.1", "172.17.0.1/172.17.0.1"]}

Additional context
For now, I have rolled back to v1.9.12 where the IP filtering works as expected and keeps the candidate list clean

Activity

  1. cnderrauber commented on Apr 9, 2026

    @cnderrauber
    Contributor

    @Hujgo could you test #4440 to see if it address this issue?

  2. Hujgo commented on Apr 9, 2026

    @Hujgo
    Author

    Yep, it works! Thank you so much for the quick fix!

  3. added a commit that references this issue on Apr 10, 2026
    5dc4e90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions