LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-10-2015, 09:56 PM   #1
asker1
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
binding before Connect


i'm new to ubuntu and networking

Is there a method in Linux to check how many ephemeral ports are left available? I've problem with "Address already in use" errors as a result of running out of ephemeral ports
is this point can help >
Set tcp_tw_reuse sysctl to enable reusing of TIME_WAIT sockets.


Notice :
port is 6703 >> problem with that port
i used command
Code:
 netstat -ntape
and got
Code:
tcp        0      0 0.0.0.0:6703            0.0.0.0:*               LISTEN      1000       22776       2621/java
then used this command with PID of PORT = 2621
Code:
 lsof -P -w -n -p 2621 -a -i
and got
Code:
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    2621 user   76u  IPv4  18906      0t0  TCP 127.0.0.1:50036->127.0.0.1:2181 (ESTABLISHED)
java    2621 user   83u  IPv4  22773      0t0  TCP 127.0.0.1:56733->127.0.0.1:3773 (ESTABLISHED)
java    2621 user   86u  IPv4  22776      0t0  TCP *:6703 (LISTEN)
is there problem here ?
 
Old 12-11-2015, 03:47 AM   #2
murugesan
Member
 
Registered: May 2003
Posts: 161

Rep: Reputation: 28
As per the given output from netstat and lsof:
the port number 6703 is in use by java which is running operating system.
lsof tells the process which is using that port number.
Also one more possibility for your information:
Assume one system having the following:
1. only one ethernet card
2. Default OS installed is Windows(example Windows 7 only having ip1)
3. That Windows 7 is running 5 vmplayer.exe (assume that system is having much disk space)
4. Each vmplayer.exe is running different Operating system
Example:
1. vmplayer.exe Linux hostname1 ip2
2. vmplayer.exe Linux hostname2 ip3
3. vmplayer.exe Windows XP hostname3 ip4
4. vmplayer.exe Sun_Solaris hostname4 ip5
5. vmplayer.exe Linux hostname5 ip6
In that case one system having one ethernet card can run same java program to run on same port number in each Operating System.
That count will increase when increasing more eth/bond network cards.

Also related to get ip address for ethernet card eth0:
$ /sbin/ip -f inet addr show dev eth0

Last edited by murugesan; 12-11-2015 at 03:49 AM.
 
Old 12-11-2015, 07:51 AM   #3
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by murugesan View Post
In that case one system having one ethernet card can run same java program to run on same port number in each Operating System.
That count will increase when increasing more eth/bond network cards.

Also related to get ip address for ethernet card eth0:
$ /sbin/ip -f inet addr show dev eth0
i got that 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
is that mean i have 2 ethernet?
 
Old 12-12-2015, 08:11 AM   #4
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Rep: Reputation: Disabled
can anyone help > ?
 
  


Reply

Tags
ipv4, networking, security


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SCTP: connect() hangs when previously binding to more than 2 IP addresses george77 Linux - Networking 0 03-17-2010 08:56 AM
binding port mokku Linux - Newbie 4 11-10-2007 06:51 PM
LDAP not binding shane200_ SUSE / openSUSE 1 08-09-2005 11:56 AM
binding a socket blackzone Programming 1 12-21-2004 07:46 AM
help! binding problems toadeny Linux - Networking 3 09-18-2003 09:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration