Solved

mount/smbmount over a VPN WAN (Diff Subnets) whats going on!??!?!!?!?!

Posted on 2003-11-28
28
881 Views
Last Modified: 2010-03-18
OK I have 2 sets of computers all behind 2 seperate nat setups...
the internal subnets are 192.168.1.x  &  192.168.3.x I need to be able to mount all the windows hard drives from the Linux machine. I can sucessfuly mount all of the computers in the .1.x range with now problems using the command.

smbmount \\\\192.168.1.100\\c$ /network/recp1/ -o username=myun password=mypw

However if I try to do the equivelent to a computer on the .3.x network it says:
=====================================================
30220: session request to 192.168.3.100 failed (Called name not present)
30220: session request to 192 failed (Called name not present)
Password: (I type the password here)
30220: session setup failed: Call timed out: server did not respond after 20000 milliseconds
SMB connection failed
=====================================================
The only thing I can think of is that the Linux box trying to mount the samba share is 20-30 miles away on the .3.x network. Although the ping time is less than 150ms going through the VPN or outside it.

P.S.
    if I use Konqoure ang go to the address smb://192.168.1.100/c$/
it gives me a popup to enter my username and password and then it connects/works fine. (Which would normaly be fine except I need to beable to do it from the command line for automation reasons....)

Thanks, Guys and Gals of Exp-Exch.
0
Comment
Question by:EHart7
  • 11
  • 10
  • 5
28 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9840367
check your smb.conf file.

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
    hosts allow = 10. 127.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9840385
also check for share if they are shared on .3.xx machine are not.

0
 

Author Comment

by:EHart7
ID: 9840411
Yes they are shared on the windows machines..

I can access them through Konquore just fine... using smb://192.168.3.100/c$/
but I can't mount them for some reason like I am doing with all of the .1.x addresses....

Correct me if I'm wrong but isn't the smb.conf just for the Linux samba server side of things?? (Not the client??)

Thanks
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9840478
sorry my bad.

what is output of
smbclient -L <computer name>
smbclient -L <computer_name> -I ip-address.of.computer_name
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9840500
also could u try debug mount like this.

smbmount \\\\192.168.3.100\\c$ /network/recp1/ -o username=myun password=mypw,debug=5
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9840520
i think u must be having some kind of smb.conf file on windows too(on .3.xxx windows system).
if yes could u check those things.


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9846393
this is a SMB problem: SMB is a non-routable protokoll
AFAIK samba cannot solve this problem, 'cause it's a routing problem too. I'm not shure about newest Samba versions though ...

You either can try to give your local box a 192.168.3.x IP and connect it directly to the corresponding subnet. Probably use a ssh tunnel.
Or you need to have a the required shares mounted on the router which routes 192.168.1.x and 192.168.3.x, these shares must be mounted with the remount option. Then you can mount the shares on the 192.168.1.x site of the router.
0
 

Author Comment

by:EHart7
ID: 9851368
ahoffmann, do you happen to have any other info about this on a website or something??

Add how would I tell if my router is capable of this kind of setup and if it is how would I set it up??

Thanks
0
 

Author Comment

by:EHart7
ID: 9851482
I just thought of something else aswell... that doesn't explain why I access it through KDE's konquore without modifying settings at the router....??
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9851758
best docs about this can be found at Samba site itself: http://www.samba.org/ (no, I didn't check for a more detailled link).
If you have Samba sources, check the doc(s) directory, where all the *.txt files reside.

> .. how would I tell if my router is capable of this kind of setup ..
if it is not a Linux router, it will be hard ;-)
Means you need to check the docs of your router.
0
 

Author Comment

by:EHart7
ID: 9851769
This still doesn't explain why I can mount/access it though KDE's konquore browser/explorer??? and it works just fine?

What are/could they be doing different??
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9856747
opps, missed that
> ..  I can mount/access it though KDE's konquore ..
does this mean you can see a shares (and its content) in konqueror, but not with smbclient from within a shell?
0
 

Author Comment

by:EHart7
ID: 9860686
Correct if I go to 'smb://192.168.3.xxx/c$/' it shows me the share it I can move files/delete/copy everything I need to do....
and I can do the same on the 192.168.1.xxx subnet except on the .1.xxx network I can do the

smbmount command and using the same command with the .3.xxx IP it doesn't.... (why??)

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 24

Expert Comment

by:shivsa
ID: 9860770
This is known issue when smbmount fails with
30220: session setup failed: Call timed out: server did not respond after 20000 milliseconds

this is a timing issue related to how much time it takes to connect it to smb share.
and why KDE's konquore is working because they might be having different timing variables and not gettting timedout before they can connect.

u can try one more thing for faster connectiong. sometime reverse DNS lookup also adds some time to it.
u might try adding hostname versus ip address on both side. so that ip address translation does not add any time.

also if u have source of samba then u can tweak the timeout variable and see if that works.
0
 

Author Comment

by:EHart7
ID: 9861083
So what is the 31704 # for??

==========================================
31704: session request to 192.168.3.100 failed (Called name not present)
31704: session request to 192 failed (Called name not present)
Password:
31704: session setup failed: Call timed out: server did not respond after 20000 milliseconds
SMB connection failed
==========================================
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9861697
that must be some numbers for log files. to represent error/comment according to request.
AFAIK it does not represent error number or something.
0
 

Author Comment

by:EHart7
ID: 9861723
any idea where I could find these error files relating to the samba connection request?
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9862430
u got me wrong.

what i meant to say.
like samba is creating log file on your server so it just mark every log to some number. it may be different for every other request.
like u posted 2 messages here.

=====================================================
30220: session request to 192.168.3.100 failed (Called name not present)
30220: session request to 192 failed (Called name not present)
Password: (I type the password here)
30220: session setup failed: Call timed out: server did not respond after 20000 milliseconds
SMB connection failed
=====================================================

==========================================
31704: session request to 192.168.3.100 failed (Called name not present)
31704: session request to 192 failed (Called name not present)
Password:
31704: session setup failed: Call timed out: server did not respond after 20000 milliseconds
SMB connection failed
==========================================

both the request are same but numbers are diffrent, like it is just counting how many times samaba has logged the logs on this server.
0
 

Author Comment

by:EHart7
ID: 9870829
HUMMMmmm I'v tried finding some samba log files somewhere/anywhere with no luck....    (not that I know what I'm going to do past that)

Does anyone have any ideas?? I really need to make this work soon.....

Please help, thanks...
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9871511
could u check this bug.
read the full report, u might get some idea.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=83092
0
 

Author Comment

by:EHart7
ID: 9916078
I got it... if your using samba over multiple subnets because of how windows workgroups/samba stuff works their are is actualy a master browser machine with in each subnet and then the master browsers talk between eachother but... thats on kind of a side note... on where the problem is coming from but to get it to work you have to use the "I" option

so if you do
smbmount \\\\192.168.3.100\\c$ /network/recp1/ -o username=myun password=mypw I=192.168.3.100
insted of
smbmount \\\\192.168.3.100\\c$ /network/recp1/ -o username=myun password=mypw
then it works and their are no errors at all...

This also works for fstab if you add the I=aaa.bbb.ccc.ddd option

Thanks for all your help guys and gals.....
0
 
LVL 24

Accepted Solution

by:
shivsa earned 500 total points
ID: 9916498
Dear EHart7,

This was one of my suggestion in the beginning when i was asking the output of these commands.

------------------
Comment from shivsa
Date: 11/28/2003 03:45PM PST
Your Comment
sorry my bad.

what is output of
smbclient -L <computer name>
smbclient -L <computer_name> -I ip-address.of.computer_name
-------------------

u did not provide the output or i thought that it did not help.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9919135
> smbmount \\\\192.168.3.100\\c$ /network/recp1/ -o username=myun password=mypw I=192.168.3.100
does this mean that you cannot connect your own computer without I=192.168.3.100?
or is the \\\\192.168.3.100 a typo?
0
 

Author Comment

by:EHart7
ID: 9936909
Sorry shivsa, I don't know if I just ignored that post or didn't see it or if I tried it or what... I'm not sure but.. I only see that your post would have helped not ahoffmann's here at the end

ahoffmann:
about your last comment.... keep in mind I'M TRYING TO CONNECT TO A COMPUTER ON A DIFFERENT SUBNET.... SO 192.168.3.100 OR AS YOU refered to it "localhost" or "your own computer" isn't the same machine because LOCAL HOST can't be on a different subnet by definition!!!!!!

and the I=ip is only needed to smbmount across multiple subnets!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9937015
EHart7, I carefully used "your own computer", not localhost or a specific IP, I'm aware of subnets (see my erly comments;-)
I still get not used to the solution of your problem.
I'm not worrying about the grading, but about the right solution to your question.
According *your* posted solution, I assume that ther is either a typo, or you followed my very first suggestion to add you computer to the other subnet too.

Could you please clarify, at least for future readers.
0
 

Author Comment

by:EHart7
ID: 9939136
what are you talking about "adding the computer to the other subnet too"???

I have 3 computers
192.168.1.1  Linux
192.168.1.2  Windows
192.168.2.1  Windows

If I try and smbmount from the Linux box the windows box on the same subnet it works..... with
smbmount \\\\ip\\c$ /network/recp1/ -o username=myun password=mypw
but not with the 192.168.2.1 on the .3. subnet

the only way I have found to mount a computer on a different subnet is to use the "-o I=ip" switch/option for the smbmount command.

so using the following command would work for both 192.168.1.2 and 192.168.2.1

smbmount \\\\ip\\c$ /network/recp1/ -o username=myun password=mypw I=ip

Understand??
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now