Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
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.
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?
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.