-1

I'm trying to access a VM Linux Web Server from Internet but as response I get the server's internal IP.

Infra:

Physical PC: Windows 8 running on IP x.x.x.10 (internal) and y.y.y.y (external/internet)

Virtual Server: Debian 7.3 + Apache2, running on a Hyper-V machine, IP x.x.x.11

Router: D-Link DMG-6661 with 'Applications' and 'Virtual Server' set on both :80 and :7080, pointing to x.x.x.11

Inside my network everything works fine, I'm able to access my web page using both x.x.x.11:80 and x.x.x.11:7080.

Outside my network, lets say at work, if I try to access y.y.y.y:80 or :7080 I get ERR_NETWORK_ACCESS_DENIED and the address on my browser changes to x.x.x.11!

What am I missing here?

Thanks.

Pedro
  • 26
  • 7

1 Answers1

0

So difficult to answer you without precisions... Please check all network segments and software/hardware components ( linking your web browser at work to your Apache server). Lot's of thing may drop your connection. Think about these questions:

  • Does your router allow incoming connections from the Internet ? Is it configured to NAT/PAT incoming traffic to your Web server at x.x.x.11:80 ?

  • Does your Linux VM allow connections from other network than your LAN (netfilter/iptables configuration ?).

  • Does your Apache is configured to accept incoming traffic from any IP addresses ?

Regards

HelpBox
  • 55
  • 3
  • @cachequard, my router is configured to accept and forward ports 80 and 7080. Using iptraf I can tell you that both ports are getting some calls. It is a standard Debian 3.7, so iptables accepts everything. My Apache is configured to listen both ports 80 and 7080 (ports.conf), although I'm not sure if (sites-available/default) will do the trick. Thanks. – Pedro Jan 13 '14 at 16:55
  • Please double check that the error ERR_NETWORK_ACCESS_DENIED is not generated by the web server on your router (which may also use apache). Dose your router forward ports 80 and 7080 to the right machine behind your router? I'm not sure... Use tcpdump (or another sniffer) on your Debian machine and ask a friend to access your server from the Internet and observe incoming traffic (You can do this using your mobile smart phone operator network if you have one...). Best Regards – HelpBox Jan 13 '14 at 20:17
  • @cachequard: Yes, it is working. I have iptraf running on Debian and when I access y.y.y.y:80/7080 at work/cellphone, some packages reaches the server, but just a few. I think it is not responding accordingly. But I don't know why it runs perfectly when inside my own network. I also have an IIS running in a second Hyper-V Win Server, IP x.x.x.12, listening port 7085. This port has the same forwarding rules/configs and it works flawlessly inside my network and over the Internet. – Pedro Jan 13 '14 at 23:30
  • I'm also using SSH to access the VM Debian without any problem. – Pedro Jan 13 '14 at 23:36
  • Fine... I didn't have that information... So please check your apache configuration file and verify if does not contain line like: "Allow from /"... – HelpBox Jan 14 '14 at 08:44
  • Which configuration file are you talking about? I do have both ports in /etc/apache2/ports.conf as Listen 80 Listen y.y.y.y:7080 And I have two VirtualHosts in /etc/apache2/sites-available/default as: ... and ... – Pedro Jan 14 '14 at 22:08
  • Look at the files /etc/apache2/conf.d/security and /etc/apache2/apache2.conf (or similar files depending on your Linux distri). – HelpBox Jan 15 '14 at 13:11