LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-18-2004, 07:35 AM   #1
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Rep: Reputation: 30
Cannot connect to anything on localhost


I have just installed Slack 10 on a separate partition to my current Slack 9.1 (which works fine). In the new Slack 10, however, I seem unable to connect to anything on localhost - CUPS, printers, wwwoffle proxy, other proxies etc. I cannot figure out the problem except that it seems to affect anything on localhost and not the specific services themselves. I cannot find any differences betweeen the /etc/rc.d scripts on each side. I feel it must be something simple but stupid me does not seem able to find what. Can anyone help please? I may have not installed something needed, as I try to install only what I need, but in desperation installed everything in the n section. Still no go.
 
Old 12-18-2004, 08:53 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
have you already checked your " /etc/hosts " -file.
shoud have smth. like : "127.0.0.1 localhost slack21 "

( also check hosts.deny and hosts.allow )

egag
 
Old 12-18-2004, 09:57 AM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,296

Rep: Reputation: 65
you could copy your /etc/hosts file from your old slack to your new one.
 
Old 12-18-2004, 11:43 AM   #4
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
All fine with /etc/hosts etc. Is this a clue - when I ping localhost offline I get :

connect: Network is unreachable

If I ping localhost when I am online I get all sorts of info about packets, which I assume means something is happening.
 
Old 12-18-2004, 11:46 AM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
what is the output from: " #ifconfig " ?

egag
 
Old 12-18-2004, 01:59 PM   #6
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
When I am online I get this :

root@darkstar:/home/mellor# ifconfig
ppp0 Link encap:Point-to-Point Protocol
inet addr:212.56.113.102 P-t-P:212.159.7.80 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:38256 (37.3 Kb) TX bytes:35578 (34.7 Kb)

When I am offline I get nothing.

John
 
Old 12-18-2004, 04:32 PM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
you have no loopback if. setup. ( should be " lo " ).
this should be setup by the " /etc/rc.d/rc.inet1 " -script.

you could run these 2 commands from cli, and look if they give errors or a lo if:

#/sbin/ifconfig lo 127.0.0.1
#/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

egag
 
Old 12-20-2004, 09:31 AM   #8
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Thanks egag, that fixed it. However, why did it happen? Which relevant files do I need executable in /etc/rc.d? Inet1 seemed to be just for ethernet connections. Which file actually sets up the loopback interface? Should this have been setup during installation or does it set up each time I reboot? (Very rarely, now I have things running properly) I would like to try and understand this. All I need are pppo and lo.
 
Old 12-20-2004, 11:07 AM   #9
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
the loopback is normally setup by the " rc.inet1 " at boot.
so you need to make that file executable.

( just take a look at the script, it's not so hard to understand + there are good comments )

egag
 
Old 12-20-2004, 03:44 PM   #10
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Thanks, I see it now. I looked at inet1.conf and all it had was details of the eth interfaces. Took a closer look at rc.inet1 itself on your advice and found the details about bringing up the lo interface. Makes sense now, thanks a lot. I like to understand these things because then I do not have to try and remember them.
 
Old 01-03-2005, 02:19 PM   #11
carotinho
LQ Newbie
 
Registered: Dec 2004
Posts: 11

Rep: Reputation: 0
Quote:
Originally posted by egag
you have no loopback if. setup. ( should be " lo " ).
this should be setup by the " /etc/rc.d/rc.inet1 " -script.

you could run these 2 commands from cli, and look if they give errors or a lo if:

#/sbin/ifconfig lo 127.0.0.1
#/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

egag
Hi!
I have the same problem. Ifconfig says that my lo is ok, but nonetheless I cannot access localhost based services like cups web-admin or Swat. To be noted that everything used to work some times ago,

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7474 errors:0 dropped:0 overruns:0 frame:0
TX packets:7474 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2403521 (2.2 Mb) TX bytes:2403521 (2.2 Mb)

What's happening?

Thanks you all!
 
Old 01-03-2005, 03:50 PM   #12
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
hi there,
what output do you get from " $ ping 127.0.0.1 " ?

egag
 
Old 01-06-2005, 08:03 AM   #13
carotinho
LQ Newbie
 
Registered: Dec 2004
Posts: 11

Rep: Reputation: 0
Hi!
I can ping myself...

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.143 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.147 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.145 ms

But, I've discovered now that if I run Apache server, I get my homepage as it's all normal.
It can't be a firewall, since I haven't any on this pc, but on the other which is connected to the internet. Maybe something with my local config... but what?

Thanks!

Carotinho
 
Old 01-06-2005, 11:20 AM   #14
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
look fo a line like this in the " /etc/hosts " -file.

---------
127.0.0.1 localhost slack21
---------

if not there, edit it in.

slack21 is my pc-name----localhost is a must

egag
 
Old 01-08-2005, 11:11 AM   #15
carotinho
LQ Newbie
 
Registered: Dec 2004
Posts: 11

Rep: Reputation: 0
Hi!
I actually had those lines in /etc/hosts
But I noticed that localhost:901 is not found, while localhost:631 is forbidden. maybe there's something in ports configuration, inetd etc. etc. I'll start to look there

thanks

Carotinho
 
  


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
ksysguard cannot connect to localhost gavinbeatty Linux - Software 4 07-22-2005 09:31 AM
can't connect to localhost acidblue Fedora 0 12-05-2004 07:20 PM
How to connect in localhost for RH8.0? edhan Linux - Newbie 4 09-05-2003 07:01 PM
Can't connect to localhost Brendon Linux - Networking 11 07-30-2002 10:13 AM
can only connect with ssh to localhost Yaukuai Linux - Security 7 10-12-2001 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:34 AM.

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