LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2010, 08:04 AM   #1
aimseeker
LQ Newbie
 
Registered: Feb 2010
Posts: 11

Rep: Reputation: 0
webserver


hey everyone!!!
i am about to follow a simple "how to" to install a web server on a linux machine with all the default settings(i.e no conf file is being edited (httpd.conf etc))......
here are a set of few questions i would like to know regarding such a web server:
(1) at which ip can i access this server on lan???
(2) can i access this server(using my public ip) from anywhere using internet??
(3)can i assign a proper hostname(like h**p:\\w**.xyz.com) to access this server from anywhere using internet??if yes then do i need some DNS configuration ???


thxx

Last edited by aimseeker; 02-09-2010 at 12:59 PM. Reason: my mistake!!!!
 
Old 02-09-2010, 08:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,341
Blog Entries: 55

Rep: Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538
Quote:
Originally Posted by aimseeker View Post
at which ip can i access this server on lan???
If you've done it OK probably at `hostname -i`. Please keep access restricted to the LAN side of things until you have properly hardened the machine.


Quote:
Originally Posted by aimseeker View Post
can i access this server (with the ip addr frm ques 1) from anywhere using internet??
LAN range addresses are not routable outside of your LAN. Use your public IP address (see whatismyip) and NAT from your router (if you use one) to the machine providing the service.


Quote:
Originally Posted by aimseeker View Post
can i assign a proper hostname(like h**p:\\w**.xyz.com) to access this server from anywhere using internet??if yes then do i need some DNS configuration ???
Easiest would be to start using some free service like DynDNS. Except those provide domain names aren't for free.
 
Old 02-09-2010, 08:30 AM   #3
JimBrewster
Member
 
Registered: Feb 2010
Location: usa:/dev/random
Distribution: Slackware, Salix
Posts: 237

Rep: Reputation: 59
(1)It depends on the IP of the host on your lan. Run 'ifconfig' on the machine hosting your webserver, and use the resulting IP address prefaced by 'http://'
(2)No, you need a public IP address for that. You have to use IP forwarding at the router level to map your webserver host to the public interface. For experimental/testing purposes it might work, but don't plan to host a production web server that way. Besides the potential technical and security issues, it probably will violate your ISP's terms of service!
(3)Only if you have a registered domain name routed to that IP.
 
Old 02-09-2010, 12:57 PM   #4
aimseeker
LQ Newbie
 
Registered: Feb 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thxx for ur replies!!!!
@jmbrewster
ok about ques 2 ,r u talking abt port forwrding?? am i supposed to forward port 80(at router level)?? assuming my router is nat disabled
 
Old 02-09-2010, 10:39 PM   #5
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
Another thing is some isp block port 80. Especially Verizon. Also if using dsl you can`t connect to your own nework using your internet ip address (only your lan address 192.168.*).
The only way to test the server without using your lan ip address is to use a proxy or a computer on a different network.
 
Old 02-09-2010, 10:59 PM   #6
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Quote:
Originally Posted by aimseeker View Post
(1) at which ip can i access this server on lan???
I have a web server I use for my own home business. The server is setup to use a static IP that I assigned. It is an IP outside of my DHCP scope so i know it won't be given out to any other system on accident and I don't need to setup a DHCP reservation for it. My internal network is 10.1.1.x. I have my web server setup to use 10.1.1.21. To find out if your server is running DHCP or Static IP you can use the command ifconfig. Alternatively you can check the network configuration files as well. depending on your distribution these file will be different.

Quote:
Originally Posted by aimseeker View Post
(2) can i access this server(using my public ip) from anywhere using internet??
Yes you can. I do it all the time. you would want to looking into your router's configuration to enable incoming traffic on port 80 to be routed to your web server on port 80. I use a D-link DIR-615 wireless router (with 4 port gigabit switch). On my router this can be achieve by either setting up virtual servers or Port Forwarding. They both do the same thing on this router.

Quote:
Originally Posted by aimseeker View Post
(3)can i assign a proper hostname(like h**p:\\w**.xyz.com) to access this server from anywhere using internet??if yes then do i need some DNS configuration ???
Yes this is something else I do as well. There are a few places you can obtain a these services. Most newer routers support this. Both my D-Link DIR-615 and my Linksys WRT160N support it. You are looking for a service called Dynamic DNS. My D-link router is my gateway router (the one connected directly to my modem). D-Link offers support for both DynDns.com or dlinkddns.com Dynamic DNS services. My Linksys offers support for both DynDNS.com and TzO.com Dynamic DNS services.

Since my D-Link is my gateway router I use dlinkddns.com to handle my DDNS (Dynamic DNS) services. My domain name is http://<username>.dlinkddns.com where <username> is my account username at dlinkddns.com. The service is Free, and my router automatically communicates with dlinkddns.com to update my domain registry with my WAN IP. Make it completely worry free. It is a Set it and forget it process.
 
Old 02-10-2010, 03:22 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,008
Blog Entries: 13

Rep: Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028Reputation: 3028
No-ip has a good guide on this sort of stuff:

http://www.no-ip.com/support/

I understand that Cox also blocks port 80. One technique is to open another port, such as 8080, in the router. If you don't have a domain name server, you then enter http://[your ip address]:8080 to hit that port from an external source.

From inside your lan:

1. On the computer running the webserver, enter http://localhost.

2. From another computer on the same lan, enter the local ip address (for example, http://192.168.1.x).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing an Internal Webserver from my Public Webserver rtoney5 Linux - Server 1 12-18-2009 05:41 PM
Webserver HarshReality Linux - General 8 11-09-2005 12:26 PM
Another webserver eisman Linux - Software 3 07-16-2004 05:42 PM
Can't see WebServer from outside... Can see WebServer locally as http://localhost friddick Linux - Networking 13 08-19-2003 06:27 PM
need help webserver huno Linux - General 1 02-11-2003 08:48 AM


All times are GMT -5. The time now is 03:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration