Outgoing port on gRPC Java client

28 views
Skip to first unread message

deepakag...@gmail.com

unread,
Sep 19, 2017, 11:48:31 PM9/19/17
to grpc.io
Hi,
   I am having a gRPC Java client which connects to a remote gRPC server on a specified port.
My client is deployed on a machine which is behind a firewall, and i need to provide the port list 
to customer which needs to be open for gRPC communication between server and client.

So i have following questions 
1) how does the gRPC Java client select the outgoing TCP port?? What are the default ports is any??
2) Can my application explicitly pass the out going ports when i connect to server?

I am using gRPC version 1.0.1, and http2 over TLS1.2

Thanks & Regards,
Deepak

Eric Anderson

unread,
Sep 20, 2017, 11:49:20 AM9/20/17
to deepakag...@gmail.com, grpc.io
On Tue, Sep 19, 2017 at 8:48 PM, <deepakag...@gmail.com> wrote:
1) how does the gRPC Java client select the outgoing TCP port?? What are the default ports is any??

Like virtually every other TCP client, the OS selects an unused port in the OS's ephemeral range.

2) Can my application explicitly pass the out going ports when i connect to server?

No, that's not currently supported.

I'd suggest the firewall be configured based on the src address and dest address+port, and not specify the src port. There would be virtually no change in the security provided, unless you were hoping to use a port less than 1024.
Reply all
Reply to author
Forward
0 new messages