Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 fixed it in PORTS TRIGGER menu of my router. Thanks you anyway

I have a weird problem related with (i think) my cable-router and my configured vhosts in Apache2.

The point is I can't access from outside of my LAN to any of my configured vhosts if I set the http port of Apache to 80 and i add a NAT rule for it. Otherwise, if I set my Apache port to 81 (or any else) with its respective NAT rule on my router it works.

My router is an ARRIS TG952S and I am using Apache/2.2.22 (Debian)


NameVirtualHost *:80
Listen 80

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

DNS records (using FreeDNS) are:        --> pointing to another server --> pointing to my server --> pointing to my server

iptables -L -n

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
fail2ban-apache-noscript  tcp  --              multiport dports 80,443
fail2ban-apache  tcp  --              multiport dports 80,443
fail2ban-ssh  tcp  --              multiport dports 22

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain fail2ban-apache (1 references)
target     prot opt source               destination         
RETURN     all  --             

Chain fail2ban-apache-noscript (1 references)
target     prot opt source               destination         
RETURN     all  --             

Chain fail2ban-ssh (1 references)
target     prot opt source               destination         
RETURN     all  --   

Thanks you

share|improve this question
What do you get when try to access your website on port 80? – Khaled Jun 21 '12 at 10:45
Just get timeout – blacksoul Jun 21 '12 at 10:46
I edited again with the configuration of vhosts files – blacksoul Jun 21 '12 at 12:11
When you do wget server.external.ip what happens? – Mister IT Guru Jun 21 '12 at 13:23
Connecting with server.external.ip:80... failed: Connection timeout. Retrying. – blacksoul Jun 21 '12 at 13:28
up vote 2 down vote accepted

Your ISP is probably blocking the port. Are you on a consumer grade line? What ISP?

share|improve this answer
I think that it is not an ISP block. In my opinion, it could be anything related to ServerName directive or something like that. I mean, an error in my vhosts & apache configuration files. Anyway, my ISP is Telecable (Spain) – blacksoul Jun 21 '12 at 12:21
I forget to mention it but a month ago it works great. I think that it get broken when I changed that does not point to my server. I mean, just the subdomains and pointing to my server, but no – blacksoul Jun 21 '12 at 12:24
@JavierMartinez Check the forwarding rule in the router, I think you must forward to a new server now. – ott-- Jun 21 '12 at 13:12
@ott-- the rule is OK – blacksoul Jun 21 '12 at 13:15
@ott-- I think that the problem is related to ServerName directive. What do I must have there? ServerName public_ip? – blacksoul Jun 21 '12 at 13:17

Just to rule out firewall issues, please check if you've iptables configured and blocking port 80

$ iptables -L -n

Perhaps, it is even worth looking in /etc/hosts.deny Otherwide, you should contact your ISP about it as they may be blocking the port to block any commercial use of the internet connection.

share|improve this answer
I edited the question with the output of iptables -L -n. /etc/hosts.deny is clean – blacksoul Jun 21 '12 at 13:07

Use tcpdump to see if the packets arrive at your server. Disable your firewall then run tcpdump as follows:

tcpdump -i eth0 dst port 80

Open a browser from an external computer and surf to your server. If your server receives packets then something else is wrong. Check if apache is running then check that all your apache config files are ok.

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.