In linux is there a way to tell the system that never give a port for client connection, but instead allocate it only for requests for listening(server).
That is, given a port P, If a proc wants to connect to host X then dont give the port P, give some oth开发者_开发知识库er port. But if a proc wants to listen on port P then its OK?
/proc/sys/net/ipv4/ip_local_port_range
contains the only range of IPv4 ports that the system will use to connect with.
精彩评论