/* Linux Slackware */
Nmap shows the following ports open on the gateway.
21/tcp ftp
22/tcp ssh
23/tcp telnet
25/tcp smtp
37/tcp time
80/tcp http
113/tcp auth
515/tcp printer
587/tcp submission
1024/tcp kdm
6000/tcp x11
-------------------------------
i would like to close as... (10 Replies)
hi all
1) how to determine available ports in a box (solaris)
do i have to go for a netstat on all the ports?
2) how to block a particular port for a particular type of connection.
Any help would be greatly appreciated
Thanks (7 Replies)
Hello,
I have a number of Solaris 8 Sun servers that have open ports that I cannot identify. I see some with 1012-1020 (which are reserved ports according to the IANA. Lsof does not identify these. One server has all these on and one server just has 1017.
*.1023 ... (3 Replies)
Hello,
I have a number of Solaris 8 Sun servers that have open ports that I cannot identify. I see some with 1013-1023 (which are reserved ports according to the IANA. Lsof does not identify these. I rebooted the server and they went off, but this morning I saw they were all back on again. Any... (1 Reply)
hi guys,
may i know the exact steps to open a port in solaris.i have some rough idea - which is adding the port number in /etc/services.
but i am not sure the correct conventions, steps or any other steps.
kindly advise.thanks guys ! (1 Reply)
just a quick question:
a. whats the simplest command to check open port and the corresponding services?
example:
bash-2.05# netstat -an | grep LISTEN
*.199 *.* 0 0 49152 0 LISTEN
*.8989 *.* 0 0 49152 ... (1 Reply)
Hi,
I have read some forum theads about the open and close ports. some points are clear and it is not working on my machine or something am i missing?
I have commented out a port /etc/services, one application uses
then when i use the telnet <hostname> <port_blocked> it shows connected..... (1 Reply)
Hi. I need to add code to my KSH script to automatically assign an open port number from a pre-defined range to an Oracle listener.
Should I use:
lsof -i
or
netstat -vatn
or something else?
Thanks. (9 Replies)
Discussion started by: user052009
9 Replies
LEARN ABOUT NETBSD
sockstat
SOCKSTAT(1) BSD General Commands Manual SOCKSTAT(1)NAME
sockstat -- list open sockets
SYNOPSIS
sockstat [-46clnu] [-f address_family] [-p ports]
DESCRIPTION
The sockstat command lists open Internet or UNIX domain sockets.
The following options are available:
-4 Show AF_INET (IPv4) sockets.
-6 Show AF_INET6 (IPv6) sockets.
-c Show connected sockets.
-f address_family
Limit listed sockets to those of the specified address_family. The following address families are recognized: inet, for AF_INET;
inet6, for AF_INET6; and local or unix, for AF_LOCAL.
-l Show listening sockets.
-n Numeric output only. No attempt will be made to look up symbolic names for addresses and ports.
-p ports Only show Internet sockets if either the local or foreign port number is on the specified list. The ports argument is a comma-
separated list of port numbers and ranges specified as first and last port separated by a dash.
-u Show AF_LOCAL (UNIX) sockets.
If neither -4, -6, nor -u are specified, sockstat will list sockets in all three domains.
If neither -c nor -l are specified, sockstat will list both listening and connected sockets, as well as those sockets that are in neither
state.
The information listed for each socket is:
USER The user who owns the socket.
COMMAND The command which holds the socket.
PID The process ID of the command which holds the socket.
FD The file descriptor number of the socket.
PROTO The transport protocol associated with the socket for Internet sockets, or the type of socket (stream, seqpacket or data-
gram) for UNIX sockets.
LOCAL ADDRESS For Internet sockets, this is the address to which the local end of the socket is bound (see getsockname(2)). For bound
UNIX sockets, it is the socket's filename or ``-''.
FOREIGN ADDRESS The address to which the foreign end of the socket is bound (see getpeername(2)) or ``-'' for unconnected UNIX sockets.
SEE ALSO fstat(1), netstat(1), inet(4), inet6(4), unix(4)HISTORY
The sockstat command appeared in FreeBSD 3.1. It was then rewritten for NetBSD 3.0.
AUTHORS
This version of the sockstat command was written by Andrew Brown <atatat@NetBSD.org>. This manual page was written by Dag-Erling Smorgrav
<des@FreeBSD.org> and was adapted to match the NetBSD implementation by Andrew Brown <atatat@NetBSD.org>.
BSD July 14, 2006 BSD