0

Here's my situation:

I have a server running Apache on port 80, a node.js application on port 8000, and I'd like to know if I have to open ports in order for ProxyPass and mod_proxy to work.

Related

jrg
  • 219
  • 3
  • 12

2 Answers2

3

Port 80 has to be open as Apache will serve external requests on it.

If your Node.js application is running on the same host as Apache you don't need to open port 8000.

But if your Node.js application is running on different host than Apache, then you'll need to open port 8000 only for the IP of the server where Apache is running.

Vladimir Blaskov
  • 6,183
  • 1
  • 27
  • 22
1

If you use something like this:

ProxyPass http://localhost:8000

and default input policy is DROP:

iptables -P INPUT DROP

so, you still need to open port 8000 on the loopback interface:

iptables -A INPUT -i lo -p tcp --dport 8000 -j ACCEPT
quanta
  • 51,413
  • 19
  • 159
  • 217