BSD Newsletter.com
   Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?
Advertisement: The OpenBSD PF Packet Filter Book: PF for NetBSD, FreeBSD, DragonFly and OpenBSD

BSD Links
·New Links
·Advocacy
·Drivers
·Events
·Flavours
·FAQs
·Guides
·Programming
·Security
·Software
·User Groups

This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Determine_which_TCP_or_UDP_ports_are_open_on_a_system.html.

Determine which TCP or UDP ports are open on a system

Concept

Be able to use the utilities found on BSD systems as well as third-party programs to determine which ports are open on a system and which ports are being seen through a firewall.

Introduction

netstat: show network status

services: service name database

fstat: identify active files

sockstat: list open sockets

nmap: network exploration tool and security scanner

lsof: list open files

Determine which ports are open on a system:

Locally:

netstat -an
sockstat -cl

Remotely: nmap hostname or IP

Using sockstat:

sockstat -cl

Examples

Practice Exercises

More information

netstat(1), services(5) and fstat(1); sockstat(1) and third-party nmap and lsof



Front | Information | Lists | Newsfeeds