Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSL Router & Network Address Translation

Status
Not open for further replies.

cglaeser

Programmer
Jul 19, 2002
7
US
An older Flowpoint DSL router has been replaced with a new Efficient Networks DSL router that uses Network Address Translation (NAT) and the Apache webserver no longer works properly. The NAT translates the external IP address to an internal IP address, and I'm not sure how to configure httpd.conf. Review of the access log indicates that the domain name is not included with the GET message, and therefore teh Apache server can not resolve the name of the virtual host. Is there a link on how to configure Apache for a router with NAT?

Best,
Christopher
 
You shouldn't have to change the configs on apache. If NAT is assigning an ip to the server, this is not good. I don't know anything about your particular router but you should be able to set your server to the top or bottom of the range of addresses. Then give the server a static ip. You will need to edit the range so it doesn't include the server's ip. Then forward all http (port 80) traffic to your server's ip.
 
> Then forward all http (port 80) traffic to your server's ip.

Thanks. It appears from the log messages that the domain name is being stripped from the GET request. In other words, the GET message includes the web page, but not the domain name. Thus, the Apache server can not resolve which virtual host, and defaults, the Apache install pages. Perhaps a tcpdump of eth0 on the server will help isolate the problem. I would have guessed the router would simply map these commands to the internal IP address on port 80.
 
I isolated the problem. I am using VirtualHost to map several domains (e.g. to one IP address. This worked fine when the router was a bridge, but no longer works now that the router uses NAT. Apparently, Apache uses DNS lookup to ensure the IP address is correct, but does not match because it has been translated by NAT. I'll follow up with a new question in new thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top