Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can I reserve a port in Linux

Posted on 2011-09-28
6
Medium Priority
?
1,312 Views
Last Modified: 2012-05-12
Can I reserve a port for a application so other application should ignore it?

Let me tell you the scenerio:
On few Linux server an application is not listening on port 1002 because we are mounting 50+ nfs shares through the fstab file and one remote connection is using this port.

netstat -natp | grep "1002"
tcp        0      0 xx.xx.xx.xx:1002            xx.xx.xx.xx:2049            ESTABLISHED -

Could anybody suggest me a way through remote nfs share can ignore the 1002 so that my application work perfectly.

0
Comment
Question by:upanwar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Expert Comment

by:savone
ID: 36718025
I am guessing you can start the application BEFORE you mount the nfs shares and that should do it.

0
 
LVL 12

Author Comment

by:upanwar
ID: 36718071
Hey savone,

Thanks for your reply. While rebooting It will read the fstab file fisrt and then will start the services for selected run level.

Any other way to reserve port. I guess I can define in /etc/services but will it work? Have anybody tried before?

0
 
LVL 8

Expert Comment

by:eager
ID: 36816098
Do you need all NFS mounts to happen at boot-up?  If not, you might look at using automount to mount the NFS file systems when you access them.  See info on "autofs".  
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 35

Accepted Solution

by:
Duncan Roe earned 1500 total points
ID: 37005562
You cannot do this. Ports above 1000 are up for grabs, and assigned sequentially. Either make your application privileged so it can use a port below 1000 or have it use a much higher port number. Many high port numbers are in fact reserved - see assigned numbers but for the most part you can ignore these.
0
 
LVL 12

Author Comment

by:upanwar
ID: 37006128
Hi Duncan,

I already gave it a try... but I will try it again and let you know... the way you suggested is something what which I was looking.

I appriciate it.

0
 
LVL 12

Author Closing Comment

by:upanwar
ID: 37466283
This solution given me a idea but I couldn't implement it. I have opened a case with HP for the same.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question