Suraj Chandran
Suraj Chandran

Reputation: 24801

Can I force some ports for listening only(mean servermdoe)

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 other port. But if a proc wants to listen on port P then its OK?

Upvotes: 0

Views: 384

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799200

/proc/sys/net/ipv4/ip_local_port_range contains the only range of IPv4 ports that the system will use to connect with.

Upvotes: 1

Related Questions