Are there good alternative HTTP ports rather than port 80?
Many ISPs block port 80 (HTTP) and port 25 (SMTP), as well as some other ports to home users. Typically, their response to this is that these protocols are "business related" or something along those lines. I assume this is the case for you.
Port 80 is the standard for HTTP. When you typer superuser.com
into your browser's address bar, it assuming two things:
- Since you left the protocol out, it assumes HTTP (http://superuser.com)
- Since you left the port out, it assumes port 80, based on the HTTP assumption (http://superuser.com:80)
Since port 80 is not an option, you need to find an alternative port. There is no official HTTP alternative port.
When port 80 is used for one address/webserver, it's fairly common to use port 8080 or 8000 for another site on the same address/webserver. This is most likely because they are similar enough to 80 that they are easy to remember. I have seen this done for external facing sites as well.
Alternatively, you can use any port you want. See this list of standard and unofficial ports. You could run it on port 23, if you didn't plan on using telnet to your Linux machine. In a web browser, you would just type domain.com:23
.
There are actually 3 HTTP alternative ports: 591, 8008 and 8080.
They are assigned by IANA as "HTTP Alternate", which makes them pretty much as official as it gets.
If you run Linux as a non-privileged user (non-root) you can listen to any port above 1024, so 8008 and 8080 are good candidates. Then to access the server from your browser, you will need to specify the port in the url, such as http://localhost:8080
.
You may also use ports in the range 49152–65535. They are labeled as "Dynamic Ports" and will never be assigned by IANA, however because of that they may already be used by other software. This means that you can't trust that a given port will be available for you to use at any given time and have to check the availability of the port each time you want to use it.
Note that port 8000 is sometimes used for HTTP, but IANA assigned it to iRDMI (Intel Remote Desktop Management Interface). While it is unlikely to be an issue in a private environment, it is best to refrain from using it for HTTP given better alternatives are available.