Ports: Difference between revisions

From Hackepedia
Jump to navigationJump to search
NhzSg4 (talk | contribs)
mNo edit summary
m Reverted edits by NhzSg4 (Talk); changed back to last version by Hawson
Line 1: Line 1:
[[http://wc1.worldcrossing.com/WebX/.1de609f2 meridia]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=168 celexa online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=214 cingular ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=145 cheap xenical]] [[http://wc1.worldcrossing.com/WebX/.1de60a25 free samsung ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=207 buy xanax]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=212 free verizon ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=135 cheap ultracet]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=215 free sagem ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609f9 norco online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=360 free qwest ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=137 cheap valium]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=209 online xenical]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=352 cheap paxil]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=97 lipitor online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=228 order ultram]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=104 free motorola ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=204 ortho online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=193 cheap meridia]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=133 tracfone ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a22 cheap phentermine]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=201 free nextel ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=179 fioricet online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=185 hydrocodone online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=192 lortab online]] [[http://wc1.worldcrossing.com/WebX/.1de60a0a online vicodin]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=220 free real ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=105 free mp3 ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=217 free mono ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=170 cingular ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=206 qwest ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=188 levitra online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=194 cheap diethylpropion]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=212 propecia online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=214 cheap zanaflex]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=80 cool ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=113 cheap paxil]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=234 free sprint ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=181 free ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=87 flexeril online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=100 cheap lortab]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=237 free samsung ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=233 sonyericsson ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=175 cyclobenzaprine online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=119 punk ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=218 free qwest ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=349 vicodin online]] [[http://wc1.worldcrossing.com/WebX/.1de609fe qwest ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=225 free kyocera ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=174 cyclobenzaprine online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=186 jazz ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=171 cheap clomid]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=144 cheap xanax]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=236 free tracfone ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=180 flexeril online]] [[http://wc1.worldcrossing.com/WebX/.1de609f3 free midi ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a2c but ultram]] [[http://wc1.worldcrossing.com/WebX/.1de60a34 free sony ericsson ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a0d wwe ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=207 real ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=110 nokia ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=220 punk ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=203 funny ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=173 free cool ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609eb free funny ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=83 didrex online]] [[http://wc1.worldcrossing.com/WebX/.1de60a21 buy paxil]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=172 lorazepam]] [[http://wc1.worldcrossing.com/WebX/.1de60a1a mtv ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=71 alprazolam online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=190 cheap pharmacy online]] [[http://wc1.worldcrossing.com/WebX/.1de60a03 free sony ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=201 free free ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a0b cheap vigrx]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=211 polyphonic ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=358 mp3 ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a23 polyphonic ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=213 free polyphonic ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=150 order tramadol]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=163 adipex online]] [[http://wc1.worldcrossing.com/WebX/.1de60a2b but ultracet]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=219 viagra online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=82 diazepam online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=185 cheap zoloft]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=192 but vigrx]] [[http://wc1.worldcrossing.com/WebX/.1de60a1f cheap lisinopril]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=114 pharmacy online online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=75 celexa online]] [[http://wc1.worldcrossing.com/WebX/.1de60a05 free sprint ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609e4 clonazepam online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=353 levitra]] [[http://wc1.worldcrossing.com/WebX/.1de60a27 but sildenafil]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=140 vicodin online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=337 xanax]] [[http://wc1.worldcrossing.com/WebX/.1de60a2d valium online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=206 pharmacy online online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=126 cheap sildenafil]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=174 wellbutrin online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=160 cheap adipex]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=221 order vicodin]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=143 wwe ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=70 free alltel ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=230 verizon ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=102 free midi ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=118 prozac online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=189 but lipitor]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=218 sony ericsson ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=232 sony ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=161 albuterol online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=161 cheap viagra]] [[http://wc1.worldcrossing.com/WebX/.1de609e1 cheap carisoprodol]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=128 free sony ericsson ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a24 cheap propecia]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=200 nexium]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=191 lorazepam online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=197 cheap flexeril]] [[http://wc1.worldcrossing.com/WebX/.1de60a07 tracfone ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=182 cheap clomid]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=205 paxil online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=208 motorola ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=216 zyban online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=120 free qwest ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=109 nextel ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=79 clonazepam online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=211 music ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=226 cheap tramadol]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=333 cheap soma]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=81 buy cyclobenzaprine]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=332 order tramadol]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=160 ativan online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=68 buy adipex]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=108 cheap nexium]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=167 clonazepam online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=90 cheap hgh]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=132 tenuate online]] [[http://wc1.worldcrossing.com/WebX/.1de60a32 zoloft]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=223 free midi ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=166 alprazolam online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=72 ambien online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=241 free sony ericsson ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=184 cheap lisinopril]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=194 midi ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=74 carisoprodol online]] [[http://wc1.worldcrossing.com/WebX/.1de609f8 nokia ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=182 free funny ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=176 cheap didrex]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=196 buy hgh]] [[http://wc1.worldcrossing.com/WebX/.1de60a10 cheap didrex]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=129 free sony ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=339 cheap ultram]] [[http://wc1.worldcrossing.com/WebX/.1de609ec hgh online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=85 free ericsson ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=156 fioricet online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=76 online cialis]] [[http://wc1.worldcrossing.com/WebX/.1de60a1e cheap flexeril]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=336 carisoprodol online]] [[http://wc1.worldcrossing.com/WebX/.1de609ff free real ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=198 hoodia online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=165 ambien]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=186 cheap lipitor]] [[http://wc1.worldcrossing.com/WebX/.1de609fa online pharmacy]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=88 free ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=146 buy zanaflex]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=153 phentermine online]] [[http://wc1.worldcrossing.com/WebX/.1de60a11 diethylpropion online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=240 buy soma]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=210 sprint ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609e7 diazepam online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=125 free sharp ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=170 hydrocodone online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=347 adipex online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=155 buy xanax]] [[http://wc1.worldcrossing.com/WebX/.1de609e3 cheap clomid]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=356 tracfone ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=222 free sharp ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=98 lisinopril online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=223 wellbutrin online]] [[http://wc1.worldcrossing.com/WebX/.1de60a15 kyocera ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=362 motorola ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=115 phentermine online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=215 buy zoloft]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=167 cheap carisoprodol]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=164 buy alprazolam]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=177 diethylpropion online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=200 nokia ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=69 cheap albuterol]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=357 free funny ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=334 cheap valium]] [[http://wc1.worldcrossing.com/WebX/.1de60a29 buy tramadol]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=338 fioricet online]] [[http://wc1.worldcrossing.com/WebX/.1de60a09 cheap viagra]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=124 free samsung ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=198 mtv ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=164 norco online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=199 free music ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=166 ativan online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=188 tenuate online]] [[http://wc1.worldcrossing.com/WebX/.1de60a17 lipitor online]] [[http://wc1.worldcrossing.com/WebX/.1de60a12 ericsson ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=151 soma online]] Ports are identifiers of protocols that work on the transport layer (layer 4) of the [[OSI]] model.  [[TCP]] and [[UDP]] are transport layer protocols that have ports.  In [[TCP]] and [[UDP]] a port is represented by a 16 bit unsigned integer.  Thus, the  possible port range is 0 through 65535.  Port 0 is illegal and no service resides on it.
Ports are identifiers of protocols that work on the transport layer (layer 4) of the [[OSI]] model.  [[TCP]] and [[UDP]] are transport layer protocols that have ports.  In [[TCP]] and [[UDP]] a port is represented by a 16 bit unsigned integer.  Thus, the  possible port range is 0 through 65535.  Port 0 is illegal and no service resides on it.


Say you want to know what is running on port 80 of your machine. The first hint would be to look in the file /etc/services as well as [http://www.iana.org/assignments/port-numbers IANAs list] to get an idea of what typically runs on that port.  
Say you want to know what is running on port 80 of your machine. The first hint would be to look in the file /etc/services as well as [http://www.iana.org/assignments/port-numbers IANAs list] to get an idea of what typically runs on that port.  

Revision as of 10:49, 13 July 2007

Ports are identifiers of protocols that work on the transport layer (layer 4) of the OSI model. TCP and UDP are transport layer protocols that have ports. In TCP and UDP a port is represented by a 16 bit unsigned integer. Thus, the possible port range is 0 through 65535. Port 0 is illegal and no service resides on it.

Say you want to know what is running on port 80 of your machine. The first hint would be to look in the file /etc/services as well as IANAs list to get an idea of what typically runs on that port.

http             80/tcp    www www-http #World Wide Web HTTP
http             80/udp    www www-http #World Wide Web HTTP

looks like it's the port typically used for the www. Now we can try netstat to actually see what is listening, not just what should be there.

# netstat -an | grep LISTEN
httpd     30161 root   17u  IPv4     5106       TCP *:http (LISTEN)

however I prefer the flexibility of lsof which I install on all of my machines.

# lsof -i:80
COMMAND   PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
httpd     447 root   17u  IPv4 0xc15f6534      0t0  TCP www.example.com:http (LISTEN)
httpd   73819  www   17u  IPv4 0xc15f6534      0t0  TCP www.example.com:http (LISTEN)

will show you exactly what is listening on this port, in this case "httpd". I will now look up the manual for httpd which tells me this is Apache on this particular server.

This will give you a unique alphabetical summary listing of the applications currently listening on a port on your system:

# lsof -i | awk '{print $1}' | sort -u

If you want to see ports on your machine are open to the general public, which is often how computers are broken into, you can try Yashy's self port scan. You don't want to see any ports open, or listening, unless you've intentionally started that process for the public to connect to.

For every open port you find, you must determine if that service actually needs to run. If so, check if it actually needs to be available remotely, instead of only on the local machine.

For example, if you're running mysql, you may see port 3306 listening. If mysql is on the same machine as your webserver, which is what you're using it for, you should configure mysqld to only listen on 127.0.0.1 (localhost), and not on your external IP address. You might see you have port 143 (imap) enabled which is only for machines on your 192.168.* network. If this is the case, configure your imapd to only listen on your 192.168.* interface, not the public facing one. The only ports you should see open to the public, are applications you intend for the public to access.

See the "Ending a process" part of the process page for help in ending an unwanted process.

Worse case scenario you have an application listening externally that you don't want the public to access (I can't think of a possible situation for this, but I write this just in case), make sure you have it blocked by your firewall


Solaris 10

# lsof -i

to see what you have running. All ports are now controlled out of:

# svcs

which will give you a long list of services running ("online") or not. You may want to pipe this output through less.

When I did "lsof -i" I saw that rpcbind was running which I don't want, so I found the svcs name by running:

# svcs | grep rpc
online          23:43:56   svc:/network/rpc/bind:default
uninitialized   23:43:44   svc:/network/rpc/gss:default

and several more uninitialized services. I only want to stop the online one:

# svcadm disable svc:/network/rpc/bind:default

and back to a prompt I go. I run "lsof -i" once more to confirm it's stopped, and it is. Both the svcs and svcadm Manual are worth reading if you're using them for the first time.

Linux (Red Hat and spawn)

 # chkconfig --list| grep on

will show a list of all services that are enabled, and at which runlevels. Workstations by default use of runlevel 5 (multiuser, with networking and X). Servers typically are found in runlevel 3 (multiuser, with networking), but sometimes 5 as well.

Disabling services is simple. For example, to shut down httpd:

 # service httpd off
 # chkconfig --level 345 httpd off

The first command shuts down the running webserver, while the second alters the boot configuration so it will not start automatically next time the system is rebooted.

FreeBSD

To see all listening sockets using TCP/IPv4:

$ sockstat -4l

To see all connected sockets using IPv4 or IPv6:

# sockstat -c