LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-21-2005, 06:41 PM   #1
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Rep: Reputation: 15
Angry Making a website public


I have an apache server on my linux machine. I can access it through ip on my windows computer, but apparently it cant be access from someone outside my network. Is there a configuration or something to make it accessible from outiside? (port 80 is open through my router).

(im using the real ip not 192.168...etc.)
 
Old 07-21-2005, 07:29 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
If you can see it on your LAN but not from the public internet, it is an issue with the router, not the linux machine. I am assuming you are running it on the normal port, which is 80. If you are running it on a different port, you need to open that port on therouter. You may have opened 80 on the router, but not mapped the traffic coming in port 80 on the public IP to the correct 192.168.X.Y address. You should give your linux box a static 192.168 address, and then map the traffic through to that address, just opening 80 on the public IP doesn't tell it which of the private addresses it should go to.

Peace,
JimBass
 
Old 07-21-2005, 07:32 PM   #3
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
THats kinda hwat i meant above. The port is open and forwarding to the 192.168 address.
 
Old 07-21-2005, 07:36 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
If that isn't displaying, then I would think -
1) You are sending out the wrong public address
2) The linux box has a different private IP than you think
3) Either the router or linux box are not using port 80
4) Router is malfunctioning.

Chances of it being 4 are slim, it may be that you can't "loopback" to your public address from your own identical public IP, or something along those lines.

Peace,
JimBass
 
Old 07-21-2005, 08:13 PM   #5
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
What do you mean by sending out the wrong public address?
 
Old 07-21-2005, 08:39 PM   #6
CyberG
LQ Newbie
 
Registered: Jul 2005
Location: London, UK
Distribution: Fedora Core 3
Posts: 3

Rep: Reputation: 0
Hi everyone, I happen to be rather new to Linux but my networking is quite ok. I am experiencing a similar problem to that of IanThePetRock. The server is setup with two IP addresses on one nic. All the PCs on the LAN side can ping both IPs and get a response. They can even hit the apache webserver's test page but it is simply impossible to reach the server from the outside. The nameserver of the domain registrar is pointing to the correct IP address and the domain name resolves the the correct IP address and I still can't reach the server from the outside. Note: the NETGEAR router I have is also configured to redirect requests to port 80 to the internal IP 192.168...
I would be really grateful if someone would come to my aid. That would be two of us with our problem solved.
 
Old 07-21-2005, 08:49 PM   #7
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
To the original poster, I mean how do you know what your real world IP is? The easiest way would be to send your machine to whatismyipaddress.com or to log into your router and see if it shows the address it is getting. If you were one address this afternoon, and rebooted the router or just if the DHCP lease expired, you may be at a different address now.

To the second poster, I don't know of any issues passing traffic to apache. It may be that in the newest version there is some problem with redirecting traffic to it through the WAN/internet, but I very much doubt that there is. Have either of you configed anything like an access list?

Peace,
JimBass
 
Old 07-21-2005, 08:56 PM   #8
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
Yeah i already know what my ip is, i think the problem might be my dns settings, is there anything i would need there?

It cant be the local ip because i can connect to the apache server with my real world ip and router ip.
 
Old 07-21-2005, 08:57 PM   #9
CyberG
LQ Newbie
 
Registered: Jul 2005
Location: London, UK
Distribution: Fedora Core 3
Posts: 3

Rep: Reputation: 0
The problem is not just the inability to reach the apache webpages. I can't even get a response when I ping the public IP address assigned to the linux box. Somehow I get a response when I ping the router's ip address from the internet. I can even do a remote admin from the internet. and no I haven't configured an accesslist.
 
Old 07-21-2005, 09:05 PM   #10
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Of course DNS is involved. Your DNS would have to have the current IP address of your router as the A record for your website. If you can reach the website by IP address from the outside, then you have no problem at all. If your domain name isn't being resolved correctly, that is a DNS issue. Anytime you are not on a fixed IP address, you will need to either constantly adjust your DNS record so that people can reach you by name, or use one of the dynamic name services, like noip.com.

CyberG, is your linux box behind the router? Is it in a DMZ? Something is wrong in your settings. It may be accessing the real world through your router, and although you may have assigned it a "real world" address, it may not be functional. We'd need all the gritty details to sort that out.

Peace,
JimBass
 
Old 07-21-2005, 09:08 PM   #11
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
What setting or file holds the ip address?
 
Old 07-21-2005, 09:10 PM   #12
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Nothing you have on your machine is doing the DNS for it. You may have BIND installed, but chances are very good that you are not the authoriative nameserver for your domain. Who did you register it with? Go to their site, and see what is listed as your nameserver.

Peace,
JimBass
 
Old 07-21-2005, 09:13 PM   #13
IanThePetRock
LQ Newbie
 
Registered: Jul 2005
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
Um, nobody. I never intended to have a domain name, just IP connect. I still need nameservers for that?
 
Old 07-21-2005, 09:13 PM   #14
CyberG
LQ Newbie
 
Registered: Jul 2005
Location: London, UK
Distribution: Fedora Core 3
Posts: 3

Rep: Reputation: 0
Yes, the linux box is behind the router and in a DMZ. In the router config, the DMZ server points at the internal ip address of the linux box. I need to mention that The router has a different "real world" address than the linux box. Whe I ping the domain name which is also the machine name of the linux box, it actually resolves to the ip address and then I get a request timed out message. Please let me know if there is any specific "gritty details" you want me to provide.
 
Old 07-22-2005, 02:24 AM   #15
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
If you have broadband then your isp will either allocate you with a static ip address or a dynamic address using dhcp. If you have a static address then it is easy. If you are using a dynamic address it's more complicated. Either way you need to know your current ip address.
Your modem/router has this ip address on the public side (wan) and a private address on the lan side. In order to get requests for port 80 on the wan to go to a specific host on the lan you need to tell the router to direct all requests on port 80 to the specific host. The terminology differs slightly with different manufacturers. My modem/router calls it virtual hosts. Consult your modem manual for details. There will be a section in the router configuration that will allow requests on a specific port to be forwarded to a specific host on the lan.
Domain name resolution is another topic altogether. If you buy a domain name then the registrar will have a holding ip address for the domain name. If you want to change the ip address then the registrar will have a control panel whereby you can point the domain name to your ip address yourself. If they don't then you will have to request them to point the domain name at your ip address. If you have a dynamic address then you need a 3rd party to update your address as and when it changes.
The next point is that you cannot access the pages using the public ip address from your own system unless you have loop back networking setup. The network gets confused because your request and the desination are the same. You can only see the pages using a public proxy server (setup through your browser) where the request is first sent to the proxy server and then to your server and it appears the request is coming from the proxy server.
If your are using a firewall you must ensure that it is allowing requests on port 80 to go through.
Have a look at a write-up on this on my site

Last edited by TigerOC; 07-22-2005 at 02:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Webalizer Stats Public PensJunkie Linux - Software 2 06-07-2005 10:40 AM
Legal Question: Can a public library 'borrow' the design of the FC website? AlexV General 3 02-21-2005 01:13 AM
Making a public samba share joncolby Linux - Software 0 06-24-2004 01:02 PM
Steps to making public webserver (need advice) Gates1026 Linux - Networking 1 04-01-2004 01:18 PM
Making zip drive public phatboyz Linux - Hardware 3 03-02-2004 03:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration