Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-23-2005, 01:57 PM
|
#1
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Rep:
|
apache configuration
I'm having trouble getting a webserver running. Basically if I type in my web address it goes to the login page of my router. The ports are correctly set up and I have no other firewall running. Sendmail works fine with this domain. I was wondering if I needed to make any changes to /etc/hosts or /etc/resolv.conf. Maybe someone could try accessing http://www.oliverroad.selfip.com to see what happens.
/etc/hosts
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 oliverroad.selfip.com oliverroad
/etc/resolv.conf
nameserver 192.168.0.1
Thanks.
|
|
|
10-23-2005, 03:38 PM
|
#2
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
Do you mean you have a webserver running on your network, and you're trying to access it by typing in your domain name to access it across the Internet? If so, you will just get the login for your router, it's just way the networking side of things work by accessing an internal machine via an external address. Caught me a couple of years ago when I first tried it! Either try running through a service like www.the-cloak.com to check it's working fine, or someone suggested a couple of days ago to edit your hosts file to include the domain name and local ip address you want. Thus, when you access your domain, it actually reads from hosts and directs to your local ip.
|
|
|
10-23-2005, 05:28 PM
|
#3
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
Thanks for replying. Just out of interest, what do you get if click on the link? It should be a page of text I wrote. Also looking at my /etc/hosts file, there's a line in there which says
"By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)"
And it looks like that's exactly what I have. Also should the nameserver in /etc/resolv.conf be something other than the IP address of my router?
Thanks.
|
|
|
10-24-2005, 12:41 AM
|
#4
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
simcox1
the solution i tell u here is the same with fouldsy the only thing the way of explation is diffrent
first look at ur /etc/hosts
u suppost to have only one line of 127.0.0.1
etc/hosts
Quote:
etc/hosts
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 oliverroad.selfip.com oliverroad
|
change second line from 127.0.0.1 to the ip u get with proceed "/sbin/ifconfig" command ( eth0)
Quote:
/etc/resolv.conf
nameserver 192.168.0.1
|
/etc/resolv.conf u can put any working dns server in this world better is the nearest to u or ur isp dns server name eg.
nameserver 62.253.162.237
( this is DNS1.NTLI.NET )
my guessing u using NTLI UK , use UK nearest dns server
ok last part
login to ur NAT firewall forward the port 80 to that machine IP number
try it hope work for u
cheers
Last edited by routers; 10-24-2005 at 01:16 AM.
|
|
|
10-24-2005, 03:03 AM
|
#5
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
Port 80 is open. You think I should change the second line in /etc/hosts to:
192.168.0.2 oliverroad.selfip.com oliverroad ?
I'm hooked up with virgin.net which has recently been bought by ntl, so you think I should use my ISP's nameserver in resolv.conf instead of the router address?
|
|
|
10-24-2005, 03:15 AM
|
#6
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
Your resolv.conf should point through to the nameservers provided by your ISP, there will usually be two of them. If you point it through your ADSL modem or whatever it is, you simply get the router to forward the DNS request and the return the IP to you. Is easier and cleaner going directly, but that's just me.
|
|
|
10-24-2005, 04:14 AM
|
#7
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
Quote:
Port 80 is open. You think I should change the second line in /etc/hosts to:
192.168.0.2 oliverroad.selfip.com oliverroad ?
|
yes u have to do it , and will be look like this
etc/hosts
# For loopbacking.
127.0.0.1 localhost
192.168.0.2 oliverroad.selfip.com oliverroad
cheers
ps: sorry my english
|
|
|
10-24-2005, 04:42 AM
|
#8
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
Only thing is if I specify nameservers other than 192.168.0.1 in resolv.conf it gets reset after a reboot. And I still cant directly access my webpage after changing hosts. Anyway it doesn't matter too much as long as other people can.
|
|
|
10-24-2005, 05:59 AM
|
#9
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
ermm now i sure u are using DHCP
ok then run "netconfig" use
static 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
dns 62.253.162.237
when done restart inet1
"/etc/rc.d/rc.inet1 restart"
"/sbin/ifconfig eth0"
then if u want to try reboot it
cheers 
|
|
|
10-24-2005, 07:43 AM
|
#10
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
Well that killed my connection. I'll just tell you exactly what I've got. A netgear router/firewall/modem (DG834). Relevant ports are open for my pc. Router modem is 192.168.0.1 on the lan, and mine is 192.168.0.2. It does sometimes change but I've tried to reserve that number via the router webadmin page. A second pc is usually 192.168.0.3 when it's up.
My ISP assigns a dynamic IP and wont give a static one, so I've got ddclient running to update my dyndns.org account. That seems to be working fine.
I'll give a few details from my routers web page.
This is the status page:
Router Status
Account Name
Firmware Version V1.05.00
ADSL Port
MAC Address 00:0f:b5:13:71:23
IP Address 82.13.34.63
DHCP PPPoA
IP Subnet Mask 255.255.255.255
Gateway IP Address 194.145.148.5
Domain Name Server 194.168.4.100
194.168.8.100
LAN Port
MAC Address 00:0f:b5:13:71:22
IP Address 192.168.0.1
DHCP On
IP Subnet Mask 255.255.255.0
Modem
ADSL Firmware Version 1.00.09.00
Modem Status Connected
DownStream Connection Speed 576 kbps
UpStream Connection Speed 288 kbps
VPI 0
VCI 38
The DNS servers are for virgin.net.
The router is set to act as a DHCP server and the IP address and DNS numbers are set to be got dynamically from my ISP.
NAT is enabled.
What's the gateway listed above under adsl port?
|
|
|
10-24-2005, 10:21 AM
|
#11
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
ok first we talk about LAN
Quote:
LAN Port
MAC Address 00:0f:b5:13:71:22
IP Address 192.168.0.1
DHCP On
IP Subnet Mask 255.255.255.0
|
That is your main (first LAN absolutely static )
ok now second LAN set ip Static
192.168.0.2
if have third LAN set static
192.168.0.3
do not give change for DHCP to assign the IP for the Machine or get into the router
then disable (OFF) DHCP for LAN
because if DHCP enable the router will assign the IP for the NON static machine
remember if u want to set webserver in the LAN the machine must be Static regardless ur ISP give u static or dynamic
if still cannot be done i might have to print screen all my server & firewall config file and post it to the net
FYI I also use dyndns.org its on my sign os slack10.1 and all Linux computer in my office i set static , its easy for me to do maintenance
hope u not give up 
|
|
|
10-24-2005, 03:00 PM
|
#12
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
I've been off line for a couple of hours trying to reconfigure my modem. Unchecking the 'use dhcp' box for the modem left me without a connection, and also without any means to alter the config because it's a web page. Anyway I'm back now. As I understand it you think I should not use the modem for dhcp. I don't really understand this. Two computers rely on it, independently.
The basic thing here is this. My router/firewall/modem is a pain in the arse. I would much prefer to have just a modem, and configure everything else myself. However to do that I would need another pc which would be just a server, through which the other pc's would connect. If I use this computer that way, it would need to be left switched on. I only have to leave the modem on at the moment.
I don't really understand how this all works at the moment. If I turn off dhcp (for the modem) and run netconfig to use static, I take it we're talking about the lan here. Surely dhcp is necessary for a dynamically assigned IP? I can easily get a static local IP from the modem. A static public IP I can't. But ddclient is working well anyway.
|
|
|
10-24-2005, 11:40 PM
|
#13
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
relax dude
Quote:
As I understand it you think I should not use the modem for dhcp
|
nope u wrong, dhcp for modem live it there because u need to get dhcp from ur isp
just disable dhcp for LAN setting since u Main LAN is static
Quote:
If I turn off dhcp (for the modem)
|
no one ask u to do this
as i mention erlier its LAN port not modem , LAN port mean LAN conguration inside ur modem
but all dhcp not big deal on main router/firewall/modem
the important thing is set static on the workstation
|
|
|
10-25-2005, 05:27 AM
|
#14
|
LQ Newbie
Registered: Oct 2005
Location: Darwin/Cairns AUS & NZ
Distribution: Mandrake/CentOS/SuSE
Posts: 16
Rep:
|
apache configuration
Hi,
Do you have port forwarding for port 80 from your modem/router set to forward all port 80 (http) requests to your pc running apache ?
To me it sounds as if any port 80 requests are not being passed on, so are stopping at modem/router and displaying what is on port 80 there, which is your modem/router setup page.
And by the way if i type this http://www.oliverroad.selfip.com in web browser is get:
" No doubt this will be a very interesting website when I
get around to doing something with it. In the mean time
however please feel free to go to www.linuxquestions.org
if you're interested in finding out a bit about Linux. "
So i guess you figured it out already.
Last edited by davonz; 10-25-2005 at 05:35 AM.
|
|
|
10-25-2005, 05:46 AM
|
#15
|
Member
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Original Poster
Rep:
|
Yes , if I type the web address from here I get the router log in page. Obviously others can access the correct page ok. It would just be nice to be able to check it myself. Putting the local IP and domain name in hosts doesn't change that.
|
|
|
All times are GMT -5. The time now is 08:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|