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)
ports.conf
NameVirtualHost *:80
Listen 80
vhost1.mydomain.net.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName vhost1.mydomain.net
ServerAlias vhost1.mydomain.net www.vhost1.mydomain.net
vhost2.mydomain.net.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName vhost2.mydomain.net
ServerAlias vhost2.mydomain.net www.vhost2.mydomain.net
DNS records (using FreeDNS) are:
mydomain.net --> pointing to another server
vhost1.mydomain.net --> pointing to my server
vhost2.mydomain.net --> pointing to my server
iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-apache-noscript tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
fail2ban-apache tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443
fail2ban-ssh tcp -- 0.0.0.0/0 0.0.0.0/0 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 -- 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-apache-noscript (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Thanks you
Your ISP is probably blocking the port. Are you on a consumer grade line? What ISP?
Just to rule out firewall issues, please check if you've iptables configured and blocking port 80
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.
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.