LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-11-2006, 05:44 PM   #1
kwikness
Member
 
Registered: Apr 2006
Location: MA
Distribution: Slackware 13
Posts: 67

Rep: Reputation: 15
Can't connect to localhost?


I'm logged in as root and i'm on KDE. I'm trying to use a web administration configuration thingy for Samba. In a book i'm reading, it tells me to point my browser to:

http://localhost:901

But when I do, a popup notification tells me that:

The connection was refused when attempting to contact localhost:901

How can I fix this?
 
Old 05-11-2006, 05:53 PM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 42
By any chance are you in a network with router that has a firewall enabled? if so.. forward the port 901 with NAT. (Network Address Translation). If not, then perhaps you are using you're distro's firewall that is activated, forward the port there.
 
Old 05-11-2006, 06:07 PM   #3
kwikness
Member
 
Registered: Apr 2006
Location: MA
Distribution: Slackware 13
Posts: 67

Original Poster
Rep: Reputation: 15
I am using a computer connected to a network through a router. It does have NAT and a firewall. How exactly do I forward the port?
 
Old 05-11-2006, 06:13 PM   #4
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 42
In NAT just give you're internal ip. for example 192.168.2.14 or whatever ip you're internal has. And then just give the port.. When you look at the NAT page.. everything will probably become clear by itself
 
Old 05-11-2006, 06:15 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'm not sure why you'd need to forward any ports to access something on your local host. It sounds like Samba didn't start properly.

Since you're using Slackware, is /etc/rc.d/rc.samba executable? If it is, can you try running /etc/rc.d/rc.samba start and see if that works? If you still can't access localhost:901 check the following files; /var/log/messages, /var/log/syslog and /var/log/samba/* for error messages.
 
Old 05-11-2006, 06:20 PM   #6
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 42
When i downloaded PaW ( Portable web app ) smb and stuff worked perfectly, and when i forwarded the ports, only then it worked. But perhaps i should've asked him that, if his samba was working yes / no.
 
Old 05-11-2006, 06:30 PM   #7
kwikness
Member
 
Registered: Apr 2006
Location: MA
Distribution: Slackware 13
Posts: 67

Original Poster
Rep: Reputation: 15
I don't think samba is running. The /etc/rc.d/rc.samba start is not executeable. How can I start Samba?
 
Old 05-11-2006, 07:33 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can make the startup script executable with something like chmod 0750 /etc/rc.d/rc.samba and then start it with /etc/rc.d/rc.samba start - you'll also need to use /etc/rc.d/rc.samba restart after each saved change to the configuration file (/etc/samba/smb.conf?).
 
Old 05-11-2006, 07:53 PM   #9
soulestream
Member
 
Registered: Nov 2005
Posts: 183

Rep: Reputation: 30
memory serves, localhost:901 is being denied because you have not configured swat to accept connections on 901 yet.

you need to uncomment the swat line in /etc/inet.conf, restart samba and then try to connect. it should ask for your root account and password.

Unless you are trying to connect from the external world (your office to your home), you never, ever, ever need to forward ports on your router.

Soule

Last edited by soulestream; 05-11-2006 at 07:57 PM.
 
Old 05-13-2006, 04:40 AM   #10
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Port 901 is Samba/Swat. The service is started by (x)inetd when you attempt to connect to port 901.

Look in your xinetd.d directory for the swat file. Open it and change the line that probably says
disable = yes to disable = no. Restart inetd (or xinetd) and voila, you can connect.
 
Old 05-14-2006, 06:53 AM   #11
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Did this fix it?
 
Old 05-14-2006, 11:19 PM   #12
kwikness
Member
 
Registered: Apr 2006
Location: MA
Distribution: Slackware 13
Posts: 67

Original Poster
Rep: Reputation: 15
problem solved. thanks guys.
 
Old 05-18-2006, 08:16 PM   #13
tuntsfaah
Member
 
Registered: Jul 2004
Location: Chicago
Distribution: CentOS, Ubuntu, Mac OSX, Amazon AMI Linux
Posts: 43

Rep: Reputation: 15
Quote:
Originally Posted by BSchindler
Port 901 is Samba/Swat. The service is started by (x)inetd when you attempt to connect to port 901.

Look in your xinetd.d directory for the swat file. Open it and change the line that probably says
disable = yes to disable = no. Restart inetd (or xinetd) and voila, you can connect.
I looked in my xinetd.d directory, but I didn't see the swat file?
Is there another location or possibly another name?
What is a swat file?
 
Old 05-18-2006, 10:05 PM   #14
soulestream
Member
 
Registered: Nov 2005
Posts: 183

Rep: Reputation: 30
you dont need to touch xinted.d on slackware to get it to work. Just edit inet.conf as in my post and restart init or just reboot the computer.


Soule
 
Old 05-21-2006, 09:12 PM   #15
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Sorry tuntsfah, it has been a while since I used Slackware -- soulestream is probably correct. Either way, the objective is to have inet (or xinetd) start the service when you attempt to connect to port 901.

I hope my post did not confuse the issue for you.
 
  


Reply



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
Cannot connect to anything on localhost JohnKFT Slackware 17 05-11-2005 02:21 AM
can't connect to localhost acidblue Fedora 0 12-05-2004 07:20 PM
cannot connect to localhost (RH9) DaddyBad Linux - Newbie 10 03-15-2004 12:15 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 - Networking

All times are GMT -5. The time now is 11:30 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