i'm using communication based on ZeroMq and NetMQ (same problem in both projects)
I have applications running behind fire walls,
on the server side its easy to define which ports to open for inbound traffic,
however on the client side it seems that i am able only to specify the target (a.k.a server) address and port.
Is it possible to define which port will be used for outbound traffic on the client app.
for example (in NetMQ)
using (NetMQContext ctx = NetMQContext.Create())
{
using (NetMQSocket snapshot = ctx.CreateSocket(ZmqSocketType.Dealer))
{
// connect to remote address, no place to specify outbound port
snapshot.Connect("192.168.1.10:5555");
}
}
In a simple communication scenario we have a Server and a Client
server is running on machine A (192.168.1.10) - and listening on port 5555
Client is running on machine B (192.168.1.9) - and is initiating communication to server (A)
if we look at the communication info on the client we would see that the system allocated port XXXXX (for example 51234) and its outbound to 192.168.1.10:5555
in most cases the XXXXX port is allocated by the system ( a free port), however in some extreme cases the XXXXX port needs to be a specific port (due to extreme security environment)