Web Hosting Talk







View Full Version : Ports


iamdave
02-09-2002, 05:37 AM
Can someone please tell me which ports need to be left open in order for a server to function correctly?
I am trying to install PMFIrewall, is this a good choice?

cheesysticks
02-09-2002, 05:41 AM
80 for standard http
21 for ftp

depends upon what type of server / services you have for other ports, mail, time etc

Tim Greer
02-09-2002, 05:46 AM
Originally posted by iamdave
Can someone please tell me which ports need to be left open in order for a server to function correctly?
I am trying to install PMFIrewall, is this a good choice?

Hi,

Sorry that I'm not familiar with that firewall tool you're using, but the ports you should have open, depend upon what you run. For example, port 80 is the web server (usually). Port 443 is the port for SSL on the web server (usually). Port 110 is usually for POP3 email, port 25 is usually for SMTP, port 21 is usually for FTP, port 23 is usually for telnet, port 22 is usually for SSH, and port 53 is usually for named/your name server service, if you run one. It all depends on what you are running, and if it's on the common port (which I'll assume it is). That should be okay and maybe even a little more than you need. Be attentive to the facts that you might only be sending stuff out for SMTP, for example, unless you have something implemented to allow email relaying (in which case you want to make sure no one can send email through it without being authenticated and allowed to), or if you run a tunneled service, or something else that requires a different port. You can usually see most or all by typing in "netstat" (if you run the proper platform that it's supported on) to see what ports are running what, or are open, or are listening, etc. A good idea, is to reference some data sheets on what services run on what ports, if you aren't sure of or don't know what you're doing yet. It's always good to get familiar with the system and now what you want or need or not, and why. You can also refer to a file such a /etc/services to see a list of ports and what services are associated with them, for example.

cheesysticks
02-09-2002, 05:49 AM
You may need dns aswell... 53

ssl 443

at all depends on what your running.

priyadi
02-09-2002, 10:00 AM
Note that if you block everything except port 21 for FTP, you need to use passive FTP transfer. The standard FTP port transfer mode need another open port for data transfer, assigned randomly by the FTP server. (CMIIW)