Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up apache to listen on port 8000.

it's working fine from but the ip address on port 8000 does not work

the ip address is my router and i've already forwarded port 8000 to my box

nmap is not showing port 8000 and i assume i need an iptables rule to open this

so far i've ran:

iptables -I INPUT -p tcp -m tcp --dport 8000 -j ACCEPT

but this seems to not be working so far.. any tips?

share|improve this question

you can verify that apache is actually listening on port by doing:

netstat -ntlp

you can verify iptables has the correct rule by doing:

iptables -nvL

In the iptables output make sure there are not any rules rejecting connections before the accept rule. Also, try verifying it's accessible from another computer on the same network before trying outside the network (through the router).

share|improve this answer

I'm confused, what are you trying to do?

If you want apache to listen to port 8000, just tell it to:

<VirtualHost <your box IP>:8000>
    ServerName yourservername

As you mentioned, your router is already set to forward traffic to port 8000, so all should be fine.

Make config changes as per above, restart apache. Telnet from the box to port 8000, see if that works, try then from another behind the router, and finally from the outside.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.