Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why shouldn't I run my non-web server software on port 80?

Considering there are so many draconian firewalls in the world, is there any reason I shouldn't run server software on port 80 to guarantee greatest possible accessibility? It seems that the most common firewall exception is to allow outbound connections on port 80. I understand that any sort of packet inspection would still block my non-HTTP traffic but if that is the case I'm sure the firewall wouldn't have any other open outgoing ports anyway.

If the server already has a webserver on port 80 is it possible to use some sort of virtual host listening on port 80 (i.e. myDomain.com:80 and myApp.myDomain.com:80 on the same machine)?

like image 625
Luke Avatar asked Dec 18 '08 02:12

Luke


2 Answers

If you need to do this, why not just wrap your network comms code with a SOAP interface or an HTTPHandler?

Then your packets will conform to HTTP, you'll get through firewalls and everyone's happy?

It will be much easier than resolving all the installation and operations issues you'll get from multi-purposing port 80.

like image 122
WOPR Avatar answered Nov 15 '22 07:11

WOPR


I can think of two reasons: first, if you're doing it to get around a company firewall you'll be in violation of security policy and second, you'll be using a reserved port for a protocol that it isn't registered for which could cause significant confusion to clients trying to interact with your system (like, Google, for instance) and significant headaches for your application when they do.

EDIT On Unix systems low numbered ports require privileged accounts to run. This would be another reason to avoid doing it in that environment as your application may need higher privileges than otherwise required.

like image 30
tvanfosson Avatar answered Nov 15 '22 08:11

tvanfosson