Http over port 25?

2

1

My ISP blocks all ports except port 25 which is SMTP. I am trying to run a web server on my Mac but port 80 is blocked so when I try xx.xxx.xxx.xx:25 it returns not allowed to use restricted network port. I need to run this server. How can I run http server on port 25. Any ideas?

nobody user

Posted 2018-02-04T05:57:17.963

Reputation: 123

1What web server are you running on your Mac? What is its version? Do you have any custom configuration made? All web servers that I got to work with had an option to define the port they work with, and if you look into their docs you will find that the basic definition is port 80 but you can change it. – bizna – 2018-02-04T06:28:25.877

That won't matter if sll the ports except for 25 are blocked. – Nasir Riley – 2018-02-04T06:37:27.907

@bizna I am running a http proxy on port 8080 ob my mac usig an app called Jeeves and i set port forwarding ob my router to forward all port 25 requests to my macbook on port 8080. – nobody user – 2018-02-04T06:46:42.733

"when I try xx.xxx.xxx.xx:25 it returns not allowed to use restricted network port" Then it seems to me they're blocking incoming SMTP as well. – Arjan – 2018-02-04T07:06:30.983

1

It looks like you're likely behind Carrier-Grade NAT - - https://superuser.com/q/1291826/302907

– Anaksunaman – 2018-02-04T07:06:58.297

It is vanishingly unlikely your ISP allows connections to port 25 but not other ports - it's considerably more likely they are intercepting port 25 traffic to filter through there router. Assuming, however, that this is the case, you could run a web server on port 80 as normal and have your router map external port 25 to internal port 80 on the web servers IP. (You could also tell the web server to listen on port 25 instead of 80, and map port 25 through) – davidgo – 2018-02-04T07:24:52.090

@davidgo exactly right sir. – Tim_Stewart – 2018-02-05T04:01:08.297

Answers

0

I am trying to run a web server on my Mac but port 80 is blocked, so when I try xx.xxx.xxx.xx:25 it returns "Not allowed to use restricted network port".

Unfortunately I am not familiar enough with Apple products to give a good answer about how to bypass this limitation (perhaps someone else could give a better answer to this question).

However, this solution (if you could get it to work) might not be ideal anyway. For instance, the ISP I subscribe to only allows SMTP through its port 25 servers (acting as a relay). There is really no way to set up any kind of HTTP server that could communicate with the outside world on that port in this case.

I need to run this server.

Tunneling

As alternatives to your current plan, you might want to look at localtunnel (which requires Node.js.) or ngrok. These services can potentially bypass issues where an ISP blocks a given port.

HTTPS

Another thing to double-check is port 443 (HTTPS). ISPs may leave this port alone since it is less likely an average user will set up any kind of web server on it, as it generally requires messing around with HTTPS server certificates. That said, if the port actually turns out to be open, you can use either self-signed certificates or legitimate certificates from a provider such as Let's Encrypt.

As an advantage, if port 443 is available, it may be possible to use CloudFlare to route port 80 (HTTP) requests to your server on port 443, even if you ISP is blocking port 80.

Anaksunaman

Posted 2018-02-04T05:57:17.963

Reputation: 9 278

Some routers also allow you to take an incoming request on a port and redirect it to another internal port. I.e port 25 to port 80 – Tim_Stewart – 2018-02-05T03:58:16.173