Link to home
Start Free TrialLog in
Avatar of EHart7
EHart7

asked on

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

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.
Avatar of shivsa
shivsa
Flag of United States of America image

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.
also check for share if they are shared on .3.xx machine are not.

Avatar of EHart7
EHart7

ASKER

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
sorry my bad.

what is output of
smbclient -L <computer name>
smbclient -L <computer_name> -I ip-address.of.computer_name
also could u try debug mount like this.

smbmount \\\\192.168.3.100\\c$ /network/recp1/ -o username=myun password=mypw,debug=5
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.


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.
Avatar of EHart7

ASKER

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
Avatar of EHart7

ASKER

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....??
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.
Avatar of EHart7

ASKER

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??
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?
Avatar of EHart7

ASKER

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??)

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.
Avatar of EHart7

ASKER

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
==========================================
that must be some numbers for log files. to represent error/comment according to request.
AFAIK it does not represent error number or something.
Avatar of EHart7

ASKER

any idea where I could find these error files relating to the samba connection request?
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.
Avatar of EHart7

ASKER

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...
could u check this bug.
read the full report, u might get some idea.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=83092
Avatar of EHart7

ASKER

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.....
ASKER CERTIFIED SOLUTION
Avatar of shivsa
shivsa
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> 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?
Avatar of EHart7

ASKER

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!
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.
Avatar of EHart7

ASKER

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??