Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to setup a LAMP server at my office. I've had my website hosted through a webhost service, but i currently want to move it in so I can have more options with what i do on the server.

My environment is basicly a few small net devices (Dlink modem, router and switch), a Win2008 server, the newly setup LAMP server (which is basicly a spare PC with Ubuntu Server 8.04 installed) and a few client PCs/laptops. Both the Win server and the Linux server have static IPs. Something like:

modem -> router/firewall -> gigabit switch -> Win server
               |                   |
               |                   -> Client PCs
               -> LAMP

I've had DynDNS working previously and well, connecting to my office's network with one of their domain names. I was able to connect to the win server on port 80 and a couple of others I needed. Now I want port 80 connections to foward to the Linux server. If changed the router's NAT definition for that, but I get no response. I have the router's NAT translating another port (81) to the Windows port 80, and that works correctly, but I still can't get it to foward port 80 to the LAMP's port 80. Internally, everything works fine (I can connect via local static IP address).

So i'm thinking it could be something to do with some network or firewall setup on the LAMp server. I've been using WebMin to move around in it, and the LAMP server´s firewall setting is apparently set to "Allow all traffic".

So my question is, can anyone tell me what I'm doing wrong or lead me in the right direction?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Some possibilities to investigate:

  1. If you can login to your firewall, try connecting to the LAMP port 80 from that machine to ensure that your firewall can speak to the server properly.
  2. Check that your LAMP server is not filtering any traffic out. You will want to disable all firewall rules.
  3. Check that your LAMP HTTP server is really not connected. Sometimes, incoming traffic is connected but outgoing replies are not routing correctly.
  4. You may want to set the LAMP server as a DMZ zone in your firewall so that two-way traffic is allowed to flow between the Internet and the LAMP.

Good luck!

share|improve this answer
1  
#3 is the key! Initially, when I installed the server, it was with DHCP. Later I switched to a static IP through WebMin, but it seemed to have lost the gateway definition. I have a grafical interface on my server (XFCE, with a very limited numer of apps, including firefox). I tryed connecting internally and externally, and was OK for internal connections but not for external sites. Pinging had the same result. So I checked route for the gateway definition and it was missing. <pre>route add default gw 192.168.0.1 eth0</pre> "It works!" Thanks for the clues. –  MytyMyky Sep 14 '09 at 17:20
    
+1 for being polite. You're welcome! –  sybreon Sep 15 '09 at 1:27
add comment

Does your router have a web admin interface? If it is enabled (even if it is not configured to accept connections on its WAN interface), this may be interfering with the NAT you have defined forwarding port 80 traffic.

On most Cisco platforms, you can disable the web management interface using the command:

no ip http server

It sounds like your are using a consumer router, so it's unlikely that you will be able to disable the web interface.

If this is the case, then you will almost certainly need new hardware - either a low end 'managed' router, or a SOHO router that can run open firmware such as Tomato or DD-WRT.

share|improve this answer
    
Thanks for your help. I'm using a D-link consumer router.I has the option to enable/disable and disable the web admin interface, which I've had disabled. –  MytyMyky Sep 14 '09 at 17:21
add comment

Your Answer

 
discard

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.