Apache can't get viewed from outside of my LAN
- by Javier Martinez
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