Closed KishanKishore closed 3 years ago
Hi,
Indeed --dynamic-sequential-min-port
applies only to the server listener.
An outgoing connection uses an ephemeral port on the client side (kafka proxy) when connecting to the kafka broker. TPC port range can be set globally by changing kernel parameters.
Probably you should check or change your firewall rules to filter destination and not source port for outgoing connections.
Hi, Is there a way to restrict the ports used for outgoing connections when starting the Kafka Proxy server? I am specifying the bootstrap server using the
--bootstrap-server-mapping
option and tried to use the--dynamic-listeners-disable
and--dynamic-sequential-min-port
but these options didn't seem to help. I have a firewall that blocks all outgoing connections by default and I have allowed port9092
but I get the following error:This is because the Read TCP operation is happening on a random port that is blocked.
Update 1: After reading some code I found that the
--dynamic-sequential-min-port
parameter is being used to create servers/listeners usingnet.Listen
method. So from what I understand this parameter is irrelevant to my problem. Can someone confirm ?