Jens Simmoleit escribió:
What is the command to check which PORT is currently use in my Linux Server...? Best Regards, SKLIM --Hi, your question is not clear. But I think this may be of help. To find the kernel version do: uname -a To find what distribution you are using do: cat /etc/issue to find what version a package is do: apt-cache info <packagename> or apt-cache policy <packagename> -KevOr is it he wants to know the open ports? In that case I would suggest nmap. $su -c "apt-get install nmap" $su -c "nmap -p 1-65535 YourIPaddress" --I guess he might be looking for netstat homer:~# netstat -an Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN tcp 0 0 192.168.0.15:139 192.168.0.112:2103 ESTABLISHED tcp 0 0 192.168.0.15:139 192.168.0.7:1059 ESTABLISHED tcp 0 180 192.168.0.15:22 192.168.0.136:1302 ESTABLISHED tcp 0 0 192.168.0.15:139 192.168.0.26:1348 ESTABLISHED tcp 0 0 192.168.0.15:139 192.168.0.121:1026 ESTABLISHED udp 0 0 0.0.0.0:32768 0.0.0.0:* udp 0 0 127.0.0.1:32775 0.0.0.0:* udp 0 0 192.168.0.15:137 0.0.0.0:* udp 0 0 0.0.0.0:137 0.0.0.0:* udp 0 0 0.0.0.0:9 0.0.0.0:* udp 0 0 192.168.0.15:138 0.0.0.0:* udp 0 0 0.0.0.0:138 0.0.0.0:* udp 0 0 127.0.0.1:37264 0.0.0.0:* udp 0 0 127.0.0.1:37395 0.0.0.0:* udp 0 0 0.0.0.0:789 0.0.0.0:* udp 0 0 127.0.0.1:37402 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 6 [ ] DGRAM 238 /dev/log unix 2 [ ACC ] STREAM LISTENING 17920 /dev/printer unix 2 [ ] DGRAM 17919 unix 2 [ ] DGRAM 482 unix 2 [ ] DGRAM 480 unix 2 [ ] DGRAM 273 Greets Simmel
Or for nmap, that says what server is in each port: $ nmap localhostStarting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2004-04-30 13:10 CEST
Interesting ports on localhost (127.0.0.1): (The 1640 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 9/tcp open discard 13/tcp open daytime 22/tcp open ssh 37/tcp open time 80/tcp open http 111/tcp open rpcbind 113/tcp open auth 139/tcp open netbios-ssn 443/tcp open https 445/tcp open microsoft-ds 515/tcp open printer 759/tcp open con 899/tcp open unknown 3306/tcp open mysql 5432/tcp open postgres 6001/tcp open X11:1 8000/tcp open http-alt Nmap run completed -- 1 IP address (1 host up) scanned in 0.423 seconds -- -- In TUX I trust -- kronoss: Linux Registered User: #333765 Web Page: http://www.kronoss.org Location: Teruel Linux agatha 2.6.3 #1 Sat Feb 28 15:12:59 CET 2004 i686 GNU/Linux