can't connect to server locally
I have a home server that I was able to up and till recently able to connect to externally and internally but something has changed. I can't connect through vnc, putty or ftp. if I ping the local address it can't be found. If I try to get to it using its external IP address I can get to the server and put in my user name but it wont accept my password.
If I go to the server and use the password it works fine. Can anybody help with this. |
First of all: please be more specific, tell us what distro you're using and how the server is connected to the networks as well as the name of the nic's in server.
Seems that someway the server has lost or changed internal ip or the internal nic is broken. You need to check a few things: Post output of the command "ifconfig", also post the network config-file(s). |
Sounds like either the internal, external or both ip addresses have changed.
If you can get to the server by external address but it won't accept the password, it's because it's not your server ! The external address has been assigned to someone else. If you can't ping the local address while inside the network, then the machine has been assigned a new ip address by your router. Run ifconfig as root, and see what internal address (inet addr) is assigned to eth0 Log into your router and check your external ip address, or go here or here from a machine on the same LAN. |
Thanks guys for your help so far,
There are a few more details that you should know in addition to what you asked currently tpg's exchange is going over to adsl2+, the company has emailed me to say my ip will change. These problems started about a week ago. But I would not have thought this would alter my internal ip's. The other thing is that I have updated my firmware on the router to adsl2+ and the router and connecting to the internet seem fine.(I checked the site that this would be ok with my router.) Here is the info you asked about. I am using Ubuntu 9.10 Eth0 Link encap:Ethernet HWaddr 00:02:44:10:01:4d Inet6 addr: fe80::202:44ff:fe10:14d/64 Scope:link |
Seems eth0 is not assigned an ip.
Try "ifup eth0", and check config file - in Debian it's "/etc/network/interfaces" should be the same in Ubuntu. How is this server connected? You have a router/adsl-modem that connects to Internet and I guess acts as dhcp-server on internal LAN. I guess you do portforwarding from router to server, server doesn't have 2 nics? If so, then maybe the router has to be reconfigured. |
Hi Pingu,
I had a look in the /etc/network/interfaces file it says: # the loopback network interface Auto lo Iface lo inet loopback # the primary network interface Auto eth0 Iface eth0 inet dhcp --------------------------------------------- I did a sudo ifup eth0 and got Ifup: interface eth0 already configured --------------------------------------------- Re: I guess you do portforwarding from router to server, server doesn't have 2 nics? Yes the port forwarding was working fine about a week ago I could get to the server both externally and internally. The server does not have 2 nics. Re: How is this server connected? You have a router/adsl-modem that connects to Internet and I guess acts as dhcp-server on internal LAN. Thats right --------------------- Another thing I forgot to mention was that over the same period I could not see the wireless printer we are using either and I still can't. When I do a search on the network for it it can’t be found. |
Try
"sudo ifdown eth0" then "sudo ifup eth0" If you still doesn't get an ip: Check the cable both ends - sometimes it slips out a little. Check routers dhcp so that it works and has free adresses to lease. Still no go - replace the nic. All problems are caused by server not getting an ip. (Btw, why dhcp on a server - you're better off setting a static ip on it!) Actually, set a static ip before replacing the nic! Then you'll know for sure if nic is broken or if something is wrong with dhcp-server. (Could still be the connection though.) |
Hi Pingu,
I did a sudo ifdown and got: There is already a pid file /var/run/dhclient.eth0.pid with pid 2003 Killed old client process,removed PID file Internet Systems Consortium DHCP Client V3.1.2 All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/eth0/00:02:44:10:01:4d Sending on LPF/eth0/00:02:44:10:01:4d Sending on socket /fallbackDHCPRELEASE on eth0 to 192.168.1.1 port 67 Send packet: Network is unreachable Send packet: please consult README file regarding broadcast address. |
1) and result of "sudo ifup eth0"?
2) Is your internal network 192.168.1.0? Check on your computer or directly on router. |
the router ip is 192.168.1.1
|
sudo ifup eth0 gives: iface etho already configured
The primary ip address is 192.168.1.1 (from the router) I set up a static ip for 192.168.1.3 and I can now ping this address but still can't ping the router from the server. |
This sounds very much like a faulty connection - broken nic or bad / unplugged cable.
Just to make sure: you need to do both "sudo ifdown eth0" and then directly after "sudo ifup eth0" and see what messages you get. There is actually one other possibility, this happened to me a while ago: Having only one nic in computer, after upgrade suddenly eth0 failed. I had to remove driver (rmmod e100 in my case) and add it back (modprobe e100). Now I got a message "...renaming to eth1! I then added eth1 to /etc/network/interfaces Code:
Auto eth1 |
I got
ifup: interface eth0 already configured I ran sudo ifdown eth0 and it did not return anything just took me back to the prompt so I ran it again and got ifdown: interface eth0 not configured I don't think it is a cable problem as I have tried another one and these are near new cables. and if I can ping 127.0.0.1 and get a return doesn't that mean the nic is ok? Also as I still can't see the wireless network printer either which disappeared around the same time. I really think things got screwed up when I was changed over to adsl2+ I did a firmware upgrade to adsl2+ on the modem/router but that was after I had the server and printer disappear. |
Problem Solved
The problem has finally been sorted. It was the router. I had to get a new one and now all is fine. Thanks for all your help along the way pingu!
|
All times are GMT -5. The time now is 10:23 AM. |