Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 0 - 1023, 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.

share|improve this question
    
if you bind to specific port you may want to check /etc/protocols for conflicts with something in future –  Hubert Kario Dec 17 '12 at 13:24
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.