04-10-2006
Here...
Let clarify it for you. There are two sets of ports to address: open ports on your computer and open ports on other computers on the network.
As you work on UNIX type system (Linux) your ports are divided broadly into two categories:
a. Well known ports (these are ports below 1024) that only root owned processes can utilize. These are normally some services (daemons) run (such as ftp, telnet, ssh and so on). (There is also one more “registered” category but it is not to mention here).
b. So called ephemeral ports. These ports are temporary ports assigned to handle sessions by TCP.
To list ports that your computer may accept connection see “/etc/services” file.
To see all ongoing connections to any port on your computer use “netstat -a”
To figure out open ports on other computers on the network you may wish to use nmap, however nmap is a PROHIBITED tool in many companies and it WILL alarm intrusion detection system. So think twice before use it.
Get “UNIX Essentials and Core” DVD course it explains all of it.
I hope it helps.
Last edited by amro1; 04-10-2006 at 12:38 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If I execute
mypath=`cygpath -w ../`
echo $mypath
I get
d:\unix\nextVersion\script
OK, d:\unix\nextVersion\script is the correct windows version of the path, but it is in absolute form. I would prefer it if cygpath left it in relative form, i.e.
echo $mypath
should output
..\
... (0 Replies)
Discussion started by: fabulous2
0 Replies
2. UNIX for Dummies Questions & Answers
Hi,
what is the unix command to get the list of all open ports in unix?
Thank you in advance (1 Reply)
Discussion started by: zainab
1 Replies
3. AIX
I want to know list of userdefined ports available in aix .Suppose I want to run a process at port 20 .using netstat i could able to find out that no process is listening at that 20 .Still I am not able to bring my process up at port 20.
Thanks
kittu (1 Reply)
Discussion started by: kittu1979
1 Replies
4. Solaris
Hello,
One of our developers is asking for a command/script in Solaris similar to "netstat -anp" in Linux. He gave this output as an example:
root@xxx:~# netstat -anp | grep LISTEN
tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 16082/nsrexecd
tcp 0 ... (7 Replies)
Discussion started by: vimes
7 Replies
5. Shell Programming and Scripting
suppose i ahve a shell script Nsdnet.sh inside a directory /dialp/Release/bin
another file nsdnet_file.csv is under the same directory. Now in the shell script i have call a java file, which reads the csvfile from the commandline.
Now when i run the file as
$ ./Nsdnet.sh ./nsdnet_file.csv
then... (5 Replies)
Discussion started by: priyanka3006
5 Replies
6. Solaris
Hi,
I have 2 queries:
a) Is it possible that a port no., not defined in /etc/services, be used by an application.
b) how do i find the list of ports is being currently used on my Solaris box(if entry not made into /etc/services) I donot have "lsof" installed on my box. (3 Replies)
Discussion started by: EmbedUX
3 Replies
7. Shell Programming and Scripting
Hi,
I'm in need of a script that can monitor a list of 12 ports.. If one of the ports isn't in listening mode then email me..
The list of ports are 26401 - 26412.. (6 Replies)
Discussion started by: eclipseagent
6 Replies
8. Shell Programming and Scripting
HOw can I create a tar file with relative paths
find . -depth -print | xargs tar -cvf /tmp/file.tar ?
Thanks to all who answer (1 Reply)
Discussion started by: BeefStu
1 Replies
9. UNIX for Dummies Questions & Answers
How do i list the running process and also view the ports they are listening to at the same time? (3 Replies)
Discussion started by: mena
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Could anyone help me with the following questions about relative addressing.
The questions are:
1) Enter below the command to copy the file basics.pptto the folder outline, using relative addressing.
2) Enter below to move the file .secrets.doc to the folder Day1 using relative addressing.... (1 Reply)
Discussion started by: ml123
1 Replies
LEARN ABOUT NETBSD
rfc6056
RFC6056(7) BSD Miscellaneous Information Manual RFC6056(7)
NAME
rfc6056 -- port randomization algorithms
DESCRIPTION
The rfc6056 algorithms are used in order to randomize the port allocation of outgoing UDP packets, in order to provide protection from a
series of ``blind'' attacks based on the attacker's ability to guess the sequence of ephemeral ports associated with outgoing packets. For
more information consult RFC 6056.
The individual algorithms are described below:
The RFC 6056 algorithms
The following algorithms are available:
bsd This is the default NetBSD port selection algorithm, which starts from anonportmax and proceeds decreasingly through the avail-
able ephemeral ports.
random_start Select ports randomly from the available ephemeral ports. In case a collision with a local port is detected, the algorithm
proceeds decreasingly through the sequence of ephemeral ports until a free port is found. Note that the random port selection
algorithms are not guaranteed to find a free port.
random_pick Select ports randomly from the available ephemeral ports. In case a collision with a local port is detected the algorithm
tries selecting a new port randomly until a free port is found.
hash Select ports using a md5(3) hash of the local address, the foreign address, and the foreign port. Note that in the case of a
bind(2) call some of this information might be unavailable and the port selection is delayed until the time of a connect(2)
call, performed either explicitly or up calling sendto(2).
doublehash Select ports using a md5(3) hash of the local address, foreign address, and foreign port coupled with a md5(3) hash of the same
components obtained using a separate table that is associated with a subset of all outgoing connections. The same considera-
tions regarding late connection as in the case of hash apply.
randinc Use random increments in order to select the next port.
SYSCTL CONTROLS
The following sysctl controls are available for selecting the default port randomization algorithm:
sysctl name Type Changeable
net.inet.udp.rfc6056.available string no
net.inet.udp.rfc6056.selected string yes
net.inet6.udp6.rfc6056.available string no
net.inet6.udp6.rfc6056.selected string yes
SOCKET OPTIONS
The socket option UDP_RFC6056ALGO at the IPPROTO_UDP level can be used with a string argument specifying the algorithm's name in order to
select the port randomization algorithm for a specific socket. For more info see setsockopt(2).
SEE ALSO
setsockopt(2), sysctl(3), sysctl(7)
HISTORY
The rfc6056 algorithms first appeared in NetBSD 6.0.
BSD
August 25, 2011 BSD