This is a discussion on Windows How do I tell if a TCP network port is open or not? within the Getting started tutorials forums, part of the Linux Getting Started category; So how do I tell if a TCP or UDP network port is open or not under UNIX or Linux ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
So how do I tell if a TCP or UDP network port is open or not under UNIX or Linux oses?
Sure iptables can be used to block or open port or to apply packet filtering. However any program can open a network port. For example if use has access to gcc / cc compiler she can open a port. So it is necessary to list open TCP or UDP ports. List open TCP port with netstat Use netstat command to list open tcp port Code:
netstat -tulpn Code:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 11960/sshd tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 3992/mysqld tcp 0 0 64.19.12.xx:80 0.0.0.0:* LISTEN 9474/lighttpd tcp 0 0 64.19.12.xx:80 0.0.0.0:* LISTEN 9474/lighttpd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1859/master tcp 0 0 64.19.12.xx:443 0.0.0.0:* LISTEN 9474/lighttpd Using telnet You can also use telnet to find out if port is open or not Code:
telnet server-ip port-no telnet localhost 80 telnet 192.168.1.111 25 Using nmap Nmap is a free security scanner which is used to evaluate the security of computers, and to discover services or open/close port numbers Code:
nmap server-ip Code:
nmap localhost Code:
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-10-10 03:52 MST Interesting ports on localhost.localdomain (127.0.0.1): (The 1656 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 53/tcp open domain 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds 902/tcp open iss-realsecure-sensor Nmap finished: 1 IP address (1 host up) scanned in 0.449 seconds Checking to see if a port is open, blocked, dropped, or filtered at the iptables or windows firewall is not simple. But with above three tools you can get list of open port quickly for both Windows and UNIX servers. Have fun |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| USB Port Blocking / Read only Acces on Windows | rajuk | Windows Xp/2000/2003 server administration | 4 | 06-08-2008 11:13 PM |
| How to open a port | fed111 | Web servers | 1 | 03-08-2008 11:26 PM |
| what's the Diff. in Windows 2003 and Windows 2000 server | kasimani | Windows Xp/2000/2003 server administration | 2 | 08-14-2007 11:05 AM |
| Howto verify linux open port | nixcraft | Getting started tutorials | 0 | 05-18-2007 01:49 AM |
| Isolate windows network? | RK | Windows Xp/2000/2003 server administration | 3 | 04-05-2006 07:53 PM |