Linux - NetworkingThis 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.
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'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
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.
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?
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?
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.
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.
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
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.
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.
" 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. "
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.