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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux help

Status
Not open for further replies.

SLinux

Technical User
Feb 3, 2002
2
US
I'm running apache in Mandrake 8.1 and I have the webserver set up and it works fine over the intranet network, but it doesn't work over the interenet. In other words, people not on my network can't access it. I've changed my router to allow port 80 forwarding to my computers IP and have opened that port on the PC's software firewall bastille, and Tiny. What am I doing wrong. I also tried downloading it for Windows 98 and had the same problem. Thanks, I'd really appreciate your ideas.

Thanks
 
Hi,

With a few exceptions, most intranets (or internal lans) will be using one of the rfc 1918 'private' address ranges :

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

If you are using one of these ranges (or to be more pedantic any IP range that is not a 'real' allocated internet address range - some companies still incorrectly use other ranges for internal purposes) , then you need to employ some form of nat (network address translation) that will forward packets to/from a gateway machine and transparently swap the IP address from the internal one to the IP address of the gateway's internet interface.

You can do this with iptables quite happily using destination nat. You'd have an iptables rule something like this :

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 -j DNAT --to 192.168.1.2

If you had that rule active on the mandrake box it would forward all tcp port 80 traffic transparently to the internal computer at IP address 192.168.1.2 (-i is the incoming , i.e. internet, interface). What you would also have to do is associate your site (via DNS or DDNS) with the public IP address of the linux box - you cannot point it at one the above address ranges because they have no meaning on the public internet.

Or is it something else you are looking for - its not 100% clear from your post.

Hope this helps

 
I have a linksys 4 port router and i configured that to forward port 80 requests to my computer. Does that mean changing the forwarding on the software is excessive? Because I have a dynamic IP, I am using a dns server, does that require additional configuration? I played around with the httpd.conf would that have any role in this problem. Or could there be a line in there that tells the server to only respond to my local network requests.
For diagnostic purposes, I was wondering whether there is a way in linux or windows98 (I downloaded Apache for Win32) to see whether the internet requests are getting to my computer or are getting blocked by my router?
Thanks so much in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top