Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems in simple Linux - Windows network [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Wed Jun 29, 2005 5:34 pm    Post subject: Problems in simple Linux - Windows network [Solved] Reply with quote

I am currently using a computer running Windows (XP Pro) as a "office" computer, and I also have a (Gentoo) Linux computer I will use as HTPC. They are both equipped with wireless NICs, connecting to internet (and eachother I guess) thru a wireless AP/router. Apart from using my Linux computer as HTPC, I also want to mount a hard drive that I want to access from the "office" computer with Samba for tranfering files and also to store backups from my "office" computer. The problem is, I can't get Samba p and running, and I guess it has something to do with some strange things I've noticed in my network. But maybe they aren't so strange, just that I'm not that good at networks. I hope you guys can help me out.

My office computer gets the adress 192.168.1.2 and is named Kramer and is member of a workgroup named Home. My HTPC is named Htpc, and gets 192.168.1.3.
From the Windows machine I can ping the Linux machine with the ip adress, but not with name. From the Linux machine I can't reach the Windows maching either way.
Since this seems to be a fundamental thing, i guess thats one reason why I can't get my (Samba-) shared folder to show up in Windows.

My /etc/hosts/
Code:
127.0.0.1       localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

192.168.1.2     Kramer
192.168.1.3     Htpc


My /etc/conf.d/domainname
Code:
# When setting up resolv.conf, what should take precedence?
# If you wish to always override DHCP/whatever, set this to 1.
OVERRIDE=1

# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
#
DNSDOMAIN="Home"

# This only set what /bin/hostname returns.  If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
#
#   http://www.linux-nis.org/nis-howto/HOWTO/
#
#NISDOMAIN=""


My /etc/conf.d/hostname
Code:
# Set to the hostname of this machine
HOSTNAME="Htpc"


Any hints? Does my DNSDOMAIN="Home" matter at all, poitive or negative, with respect to the fact that my Windows workgroup is named Home? What role has the "nameserver" part in my /etc/resolv.conf in this matter. It now says 192.168.1.1 which is the address of my AP.
If I try hostname in a shell, the answer is Htpc, while domainname results in (none).
By the way, I just upgraded to baselayout-1.11.12-r4 if that matter. (it didn't work before that so nothing got worse with that upgrade)

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?


Last edited by Costanza on Thu Jun 30, 2005 5:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
herbkohl
n00b
n00b


Joined: 21 Jun 2005
Posts: 40

PostPosted: Wed Jun 29, 2005 6:17 pm    Post subject: Reply with quote

" From the Linux machine I can't reach the Windows maching either way. "

Does the windows machine have a firewall?
Back to top
View user's profile Send private message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Wed Jun 29, 2005 6:34 pm    Post subject: Reply with quote

Stupid me. Yes, I have Zone alarm at the Windows machine. How come I didn't think of that?
Any specific ports or something to open up just for Samba to work? (But first I will try some stuff just by shutting Zone Alarm down completely)

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?
Back to top
View user's profile Send private message
herbkohl
n00b
n00b


Joined: 21 Jun 2005
Posts: 40

PostPosted: Wed Jun 29, 2005 6:41 pm    Post subject: Reply with quote

137 through 139 need to be open to the local network, and closed to the outside world.

But you're behind a NAT.. doesn't that serve as your firewall? I'd disable zonealarm completely in that case.
Back to top
View user's profile Send private message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Wed Jun 29, 2005 6:44 pm    Post subject: Reply with quote

NAT?

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?
Back to top
View user's profile Send private message
herbkohl
n00b
n00b


Joined: 21 Jun 2005
Posts: 40

PostPosted: Wed Jun 29, 2005 7:05 pm    Post subject: Reply with quote

wikipedia
Back to top
View user's profile Send private message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Wed Jun 29, 2005 7:15 pm    Post subject: Reply with quote

Well, it wasn't the firewall after all. I don't get it.

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?
Back to top
View user's profile Send private message
herbkohl
n00b
n00b


Joined: 21 Jun 2005
Posts: 40

PostPosted: Wed Jun 29, 2005 7:42 pm    Post subject: Reply with quote

Costanza wrote:
Well, it wasn't the firewall after all. I don't get it.

/Olof

create a windows share and then run nmap from the linux machine
Back to top
View user's profile Send private message
ter_roshak
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 171
Location: Everett, WA

PostPosted: Wed Jun 29, 2005 8:53 pm    Post subject: Reply with quote

Costanza wrote:
Well, it wasn't the firewall after all. I don't get it.

/Olof


If you want to be able to access your Samba shares from your Windows machine then your Linux machine has to have several ports open. Depending on how you have Samba setup, you should open up UDP 137 and 138, as well as TCP 139 and 445. You don't have to have any ports open on Windows unless you want to be able to access your Windows shares from another machine.

Does your Linux box have a firewall running on it? Try to browse to your samba share with the IP address, since that works for pinging. Enter into your address bar of Windows explorer

Code:

\\<IP address of linux box>\


...and see what happens. If this works then you can edit your Windows hosts file to include the name of the linux box so that you can browse by name since the announcement is not making it to your Windows box.

Also, when you are at your linux box and perform a netstat, do you see ports 137,138, and 139 or 445 open? Did you verify that Samba has started? Have you tried to connect to your Samba shares from your Linux box? Try:

Code:

smbclient -L <ip of linux box>


...from your linux box console and see if you can see any shares available.
Back to top
View user's profile Send private message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Thu Jun 30, 2005 5:23 pm    Post subject: Reply with quote

So, when I try \\<linux_ip_address>\ in Windows Explorer I actually get a login dialog. The problem then is that the user name is locked to Guest, and whatever I try for password doesn't seem to be correct. I've tried different ways of specifying user and valid users etc. in my smb.conf file, but nothing seems to help.
I'll try too find the answer in the lengthier samba documentation since the short versions (howto:s, wiki:s etc.) doesn't seem to work for me, but if anyone has an idea that you think be worth trying, please speak up. :)

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?
Back to top
View user's profile Send private message
ter_roshak
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 171
Location: Everett, WA

PostPosted: Thu Jun 30, 2005 5:47 pm    Post subject: Reply with quote

Costanza wrote:
So, when I try \\<linux_ip_address>\ in Windows Explorer I actually get a login dialog. The problem then is that the user name is locked to Guest, and whatever I try for password doesn't seem to be correct. I've tried different ways of specifying user and valid users etc. in my smb.conf file, but nothing seems to help.
I'll try too find the answer in the lengthier samba documentation since the short versions (howto:s, wiki:s etc.) doesn't seem to work for me, but if anyone has an idea that you think be worth trying, please speak up. :)

/Olof


Why don't you post your smb.conf file so we can take a look at it?
_________________
Josh Miller -- RHCE, VCP
Ditree Consulting
http://ditree.com/
Registered Linux User #318200
Back to top
View user's profile Send private message
Costanza
n00b
n00b


Joined: 14 Apr 2005
Posts: 46
Location: Linköping, Sweden

PostPosted: Thu Jun 30, 2005 6:44 pm    Post subject: Reply with quote

Well, I got it working the way this guide describes, so I guess my smb.conf file isn't necessary anymore. (It's almost exactly like the file at the linked howto) I didn't notice the fact that you had to actually make a network drive connection in order not to get the Guest-login from windows. So, now can connect to my Linux box in order to transfer files. My main reason to transfer files is to make backups of data on my office computer to be stored at the Linux machine.

Thanks to all who tried to help!

/Olof
_________________
In a world without walls or fences, who needs Windows or Gates?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum