Quantcast
Channel: Admins Goodies » port
Viewing all articles
Browse latest Browse all 10

Port forwarding on Ubuntu – what are the minimum and maximum port numbers to use?

$
0
0

Question

I’m using rinetd on Ubuntu as a port forwarding server. I’m running this on EC2. I need to know which ports are available for me to use for port forwarding.

I know that the privileged ports are 01023, so that means I can start at 1024, correct?

Does that also mean that I can use up to 65535?

Please remember, this question is specific to Ubuntu.

Asked by David Winter

Answer

This question is actually specific to Linux.

If you’re on EC2, you presumably are root inside your VM. Therefore you can use any port you want to accept connections to.

Outgoing ports are usually allocated dynamically; the range which the system uses is configured in /proc/sys/net/ipv4/ip_local_port_range. But the application is free to bind to any specific local port when connecting out.

Answered by Matthias Urlichs

Viewing all articles
Browse latest Browse all 10

Trending Articles