Default local listeners to 127.0.0.1 #7
Reference in New Issue
Block a user
Delete Branch "fix/teleport-3-loopback-bind"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #3
Local client TCP/UDP listeners and the built-in DNS server bound
0.0.0.0(:port) with no access control. Anyone who could reach the host could use the tunnel.Defaults
127.0.0.1:<local_port>(was:port/ all interfaces)127.0.0.1:<listen_port>(no longer an open recursive forwarder on0.0.0.0by default)listen_address: 127.0.0.1:8080(was:8080/:9000, which is all interfaces, not loopback)Existing server configs that already set
listen_address: :9000or0.0.0.0:9000are unchanged — that is an explicit publish bind.Override (0.0.0.0 must be explicit)
bind_address: 0.0.0.0(client local TCP/UDP)tcp://22:0.0.0.0:2222ortcp://22:127.0.0.1:2222(targetport:bindhost:localport)dns_server.bind_address: 0.0.0.0listen_address: 0.0.0.0:9000(or:9000) when intentionally publishingAES-GCM TCP framing from #6 is unchanged.
The default is right. Tests actually bind, not just strcmp. That's why this is landing.
Nits, not blockers:
len(addressParts) >= 3treats every extra-colon string as a client bind.tcp://[::1]:22as a server target now dies withinvalid target port: [instead of "we don't parse IPv6 server URLs". That URL never worked, but you made the error worse. If the first token isn't a port, it isn't a client bind rule. Say so.Copying PortForwardRequest field-by-field is correct. BindAddress stays off the wire. Keep it that way.
PR check is green. Master push for #6 is still red on a race in TestImprovedLoadTest. Not this diff. Don't "fix" it by weakening CI.