LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-25-2008, 06:43 PM   #1
jfroot
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
Cannot bind to any port between 59873 and 60000


Here's something I've never experienced before and just cropped up on one of our new servers.

For some reason I cannot bind any listening process to any port between 59872 and 60001.

I'll use nc for an example:

# nc -l 59872
.. works and listens ...

# nc -l 59873
nc: Address already in use

... < all ports in between> ...

# nc -l 60000
nc: Address already in use

So the obvious thing to check is netstat -nap.. Nothing on any of those ports listed. Next.. lsof.. also shows nothing on those ports listed.

So I thought maybe some trojan has taken over half my ports.. so I ran multiple trojan checkers from write protected media and no results. This box is not even on the net so trojaning is unlikely.

SeLinux is disabled also.

Now I'm at a loss.. does anyone have any ideas? Is it some kernel thing holding onto some high ports for outgoing use?

BOX is: Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Kernel: 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 07:18:46 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Any help would be greatly appreciated.

--
Jeremy
 
Old 07-25-2008, 07:15 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
$ bc
60001-59873
128

That's a very conspicuous number.

cat /proc/sys/net/ipv4/ip_local_port_range

Last edited by Mr. C.; 07-25-2008 at 07:16 PM.
 
Old 07-26-2008, 01:02 AM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Yea, that's not right and I would definitely be worried. Use tcpdump and see what traffic is passing on those ports.

But honestly, I would take that machine off the network, review the logs, check system binaries, etc...

-twantrd
 
Old 07-28-2008, 10:45 AM   #4
jfroot
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
# cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000

This seems to be what RedHat is setting by defult these days.

I still haven't made any headway on this.. what a crazy problem.

Running a clean version of tcpdump shows no traffic on any of those high ports either.

--
J


Quote:
Originally Posted by Mr. C. View Post
$ bc
60001-59873
128

That's a very conspicuous number.

cat /proc/sys/net/ipv4/ip_local_port_range
 
Old 07-28-2008, 12:12 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Yup, those are the ephemeral ports I see too.

My thinking has been that the kernel is reserving those ports for certain use. I'm not up to speed on the candidates for this though. Perhaps post your quick question on the linux kernel mailing list. You're almost sure to get an answer there.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I bind to a serial port using BIND Socket API?? venkat_p257 Linux - General 2 12-04-2007 05:49 AM
LXer: BLAG 60000 Beta Screenshots LXer Syndicated Linux News 0 01-04-2007 08:54 PM
BLAG 60000 Beta Screenshots lqsh Linux - News 0 01-04-2007 07:52 AM
using bind to redirect to port setiDude Linux - Networking 8 11-17-2004 01:35 AM
Bind Port dvong3 Linux - Networking 2 05-14-2004 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration