I'm going to use Firefox as an example, because its open source and easy to find the information for, but this applies (probably with slightly different lists of ports) to other browsers, too.
In August 2001, CERT issued a vulnerability note about how a web browser could be used to send near-arbitrary data to TCP ports chosen by an attacker, on any arbitrary IP address. This could be used to, for example, send emails which would appear to come from the user running the web browser. In order to mitigate this, Mozilla (as well as many other vendors) blocked Firefox from accessing certain ports.
The two ports you tried, 79 and 1, happen to be on the blocklist. The source contains the full list of blocked ports. You can (on your browser) override this list using the preferences network.security.ports.banned.override
and network.security.ports.banned
. This isn't useful on the Internet in general, as you'd have to convince everyone who might visit your site to go to about:config
and change them.
(Note: Current versions of Firefox will give an error message explaining that if you try to browse to a site on a blocked port.)
In general, there is little reason to use additional HTTP ports, at least externally. If you have to, prefer traditional extra ports like 8080, 8000, etc. that are far less likely to be blocked or at least ones outside of the IANA-assigned system ports range (0-1023). See the IANA port registry for more details.
cap_net_bind_service
; Root gives to many capabilities.