LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-06-2010, 07:34 AM   #1
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Rep: Reputation: 15
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.
 
Old 06-06-2010, 09:48 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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).
 
Old 06-06-2010, 09:53 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
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.

Last edited by smoker; 06-06-2010 at 09:54 AM.
 
Old 06-06-2010, 06:23 PM   #4
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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

Last edited by peter53; 06-06-2010 at 08:34 PM.
 
Old 06-07-2010, 01:48 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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.
 
Old 06-07-2010, 02:44 AM   #6
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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.

Last edited by peter53; 06-07-2010 at 02:46 AM.
 
Old 06-07-2010, 02:55 AM   #7
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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.)

Last edited by pingu; 06-07-2010 at 03:01 AM. Reason: Misspelling & new thought
 
Old 06-08-2010, 03:14 AM   #8
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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.
 
Old 06-08-2010, 03:46 AM   #9
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
1) and result of "sudo ifup eth0"?
2) Is your internal network 192.168.1.0? Check on your computer or directly on router.
 
Old 06-08-2010, 04:50 AM   #10
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
the router ip is 192.168.1.1
 
Old 06-13-2010, 05:55 PM   #11
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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.
 
Old 06-13-2010, 06:20 PM   #12
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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
Iface eth1 inet dhcp
and it worked again!
 
Old 06-14-2010, 03:16 AM   #13
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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.
 
Old 07-06-2010, 05:30 AM   #14
peter53
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22

Original Poster
Rep: Reputation: 15
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!
 
  


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
Can connect to IRCD locally, but not abroad belorion Linux - Networking 6 08-08-2007 02:43 PM
vsftpd server: can connect locally, not remotely propz Linux - Networking 2 10-24-2005 12:59 AM
Unable to connect to internet with SIS900 but able to ping locally kevinevans Linux - Networking 4 08-10-2004 01:16 PM
Can't connect to Apche with https - locally it's OK abapdr Linux - Software 2 05-26-2004 03:37 AM
cant connect to glftpd even locally darazman Linux - Software 1 09-06-2003 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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