LinuxQuestions.org
Visit Jeremy's Blog.
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 10-13-2004, 02:24 PM   #1
Schlumpf42
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
Unhappy Unable to connect to server using hostname with telnet and browser


Hi,

I have a strange problem, I'm not able to connect to a host lets say
this site (I cannot put in the hostname) with the hostname using telnet or a browser.
When I use telnet it tells my that it tries to connect to 1.0.0.0!
But ... I'm able to do a nslookup or ping to this host!
Once I have done that telnet and browser work.

I tried several 2.6 Linux distributions but none of them work.
If I install a 2.4 distro I don't have a problem.

Now to my hardwar setup I'm using a DSL router + an additional router (cause the DSL router has only 1 port) to connect 2 PCs.
I'm using DHCP, but setting a static IP still doesn't work.

Any ideas?

Thanks

Last edited by Schlumpf42; 10-13-2004 at 06:20 PM.
 
Old 10-13-2004, 05:49 PM   #2
Tap-Out
Member
 
Registered: Oct 2002
Location: Halifax, NS
Distribution: Ubuntu, Mepis, Debian
Posts: 130

Rep: Reputation: 15
Hello there,

I have a couple of thoughts:

1) Is the telnet service turned on?

Code:
su
root password
/sbin/chkconfig telnet on
/etc/init.d/xinetd restart
2) Is your firewall blocking port 23 traffic?

Check those out and see if that works. If not post back and we'll see what we (the wonderful members of the LQ board) can work out.

Cheers

Tap
 
Old 10-13-2004, 06:14 PM   #3
Schlumpf42
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,

hmmm ... I don't think the telnet service has anything to do with the problem.
I don't want to telnet to my machine. Also I can telnet using IP (once I did a nslookup and figured it out).
Also I'm only using telnet as an example of application that has problems to resolve the hostname.
What I did was something like: telnet <hostname> 80

I don't have any firewall software running.

Rico
 
Old 10-13-2004, 09:13 PM   #4
Tap-Out
Member
 
Registered: Oct 2002
Location: Halifax, NS
Distribution: Ubuntu, Mepis, Debian
Posts: 130

Rep: Reputation: 15
I appoligse, I have indeed misunderstood your orignal question.

I would change your /etc/hosts file on the computer you're working on.

add the line:

192.168.0.1 servername

to your hosts file.

Obvously replace 192.168.0.1 with the IP address of your telnet/web server and servername with the actual name of your server.

Hope that helps more than my last post.

Cheers

Tap
 
Old 10-13-2004, 11:38 PM   #5
Schlumpf42
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Well ... thanks for the reply, but that's is not my problem.
I cannot access any website with telnet or a browser if I don't use IP instead of hostnames. Adding all those hosts to my hosts file is obviously not an option.
Programs other than nslookup or ping cannot resolves hostnames from the dns server it seems.
If I try the following command: telnet www.linuxquestions.org 80
it says that it tries to connect to 1.0.0.0 which means that it resolves www.linuxquestion.org as ip address 1.0.0.0 which is very unlikely.

Thanks

Last edited by Schlumpf42; 10-13-2004 at 11:40 PM.
 
Old 10-14-2004, 02:06 AM   #6
Tap-Out
Member
 
Registered: Oct 2002
Location: Halifax, NS
Distribution: Ubuntu, Mepis, Debian
Posts: 130

Rep: Reputation: 15
find out your ISP's DNS servers (there's always at least 2 sometimes three).

edit the /etc/resolv.conf file. Put in

Code:
nameserver 12.34.56.78
nameserver 78.65.43.21
where the IP addresses are your ISP's DNS servers.

That should be it. If not post back and we'll move on (It's a process of elimination).

Cheers

Tap
 
Old 10-14-2004, 11:03 AM   #7
Schlumpf42
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I tried that, that is not the problem. The problem is not that my machine cannot resolve hostnames at all.
If I do a nslookup or ping it will. It seems that only certain applications like telnet or Mozilla don't resolve correctly.
 
  


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't connect to Telnet server on Mandrake 10 kt8993 Linux - Networking 2 10-03-2004 03:25 PM
CUPS : unable to connect to server lefevre2 Linux - General 1 05-24-2004 03:25 PM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM
telnet: Unable to connect to remote host: Connection refused batham Linux - Networking 0 07-07-2003 05:29 PM
unable to connect to server thru vnc... marvc Linux - Software 0 05-25-2003 06:24 PM


All times are GMT -5. The time now is 03:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration