?
Solved

Stop explorer forwarding on loopback address (extra reward offered)

Posted on 2005-04-10
26
Medium Priority
?
287 Views
Last Modified: 2006-11-18
Hi

Please note I will paypal $100 to the first person to answer this question with an acceptable solution, please include your email with your post if interested in receiving the bonus.  It seems no one anywhere (even on EE) is able to answer this question, so I need to provide some incentive.

Contraints are as follows (ie, if violated, the solution is unacceptable)
1. does not require local filesharing to be disabled
2. does not require any new hardware to be installled (ie, new loopback devices)
3. does not require any software to be installed
4. can be done from the context of a batch script
5. must work on all versions of win32 (ie >= 95)

Here is my problem, for reasons that are beyond my comprehension whenever I try to enter a network address that is in the form 127* explorer "conveniently" routes me to my main network IP address. for example, if i do \\127.0.0.1\test it will take me to what is at \\mymachinename\test but it will keep in the address bar \\127.0.0.1\test. There is similar behavior with other loopback addresses except I am prompted for a password in that case. This is a serious piss off because I am running a samba tunnel at  127.0.0.1:139 and explorer does not even attempt to connect it (as I assertained from looking at my tunneling programs log files, and I know its running properly).

I want to be able to map a network drive to a samba server on a loopback address, but not have explorer be a jackass and forward everything to my main address.

Also, I will double the reward if you can solve this question. How can I mount a network drive to a port other than 139, maintaining the contraints above.

Other suggestions may be acceptable provided they meet the conditions above.

PS Please don't respond with "are you sure you haven't..." posts, I have tried everything.

-Mike
0
Comment
Question by:kingmike301
  • 8
  • 8
  • 7
23 Comments
 
LVL 14

Expert Comment

by:theruck
ID: 13748296
i do not understand this:
"if i do \\127.0.0.1\test it will take me to what is at \\mymachinename\test but it will keep in the address bar \\127.0.0.1\test."
127.0.0.1 is an IP address as any other so why should it take you somewhere else? the address bar just has to remain like that.
probably you need something else you even cannot describe properly
expressions like "my main address" are childish and have a zero value.
try to describe your problem proffesionally if you expect proffesional answer
what might help you from the info i got is to
edit your hosts file (C:\WINNT\system32\drivers\etc) or make a special record in your dns server according your needs
0
 

Author Comment

by:kingmike301
ID: 13748366
Well the problem is that this is kind of difficult to explain.

I'll be a bit more precise.

1. My machine has two addresses, the loopback and its network address (in my case, 127.0.0.1 and 192.168.1.2)

2. The Windows 'file and print sharing' service listens on 192.168.1.2:139 for incoming SMB connections. Note it does not listen on 127.0.0.1:139.

3. Logically from this one should be able to conclude that if explorer were pointed to \\127.0.0.1\sharename that there should be an address not found error. No, it 'forwards' the connection to my network IP. (so if \\127.0.0.1\sharename is entered in the explorer address bar, it connects to whatever is being shared at \\192.168.1.2\sharename, but it still says \\127.0.0.1\sharename in the browser bar, I cant think of a better way to explain this. try it and you'll see what i mean. try telneting to 127.0.0.1:139 on your machine as proof there is no SMB service there by default )

4. My problem is that I am running a SECOND SMB service on 127.0.0.1:138 and explorer is entirely ignoring it and looking directly to 192.168.1.2 for a SMB service.

5. I want to map the SMB service being hosted on 127.0.0.1 as a network drive, however I can't since (as I mentioned) explorer completely ignores loopback addrersses.

Hope this is a bit clearer

-Mike
0
 

Author Comment

by:kingmike301
ID: 13748369
err
4 should read 127.0.0.1:139
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 13748447
Please take a look at this:
http://www.experts-exchange.com/Operating_Systems/Q_21382570.html

"This is a serious piss off because I am running a samba tunnel at  127.0.0.1:139 and explorer does not even attempt to connect it"

That is what I don't understand. Why would you run the server on a 127.0.0.1:139 address. Why not run it on another address which isn't a loopback address.

I'll try to look into it a bit more, but like I said, 127.0.0.1 is a RFC standard. Unless you actually go deep inside and modify the whole thing you won't be able to get other results ...

What I mean is that you'll have to edit your interface drivers directly. You cannot modify this from the OS becuase this is something on the NIC layer level or whatever you call it.

Try contacting your NIC manafactuer for a modified version of your drivers. You might get it there.

But as far as using the "host" or "lmhost" files or using "route add" or something like that, you won't be able to go anywhere. Unless you change to Linux maybe??

At least from where I know, to disable loopback, using Microsoft Windows, unless you modify drivers or interface directly, you won't be able to do it.

And you even have less posibilitys with all these "Contraints":

Contraints are as follows (ie, if violated, the solution is unacceptable)
1. does not require local filesharing to be disabled
2. does not require any new hardware to be installled (ie, new loopback devices)
3. does not require any software to be installed
4. can be done from the context of a batch script
5. must work on all versions of win32 (ie >= 95)


Sorry mate, as much as I would love to have the points and "reward", I think it's imposible.

The only thing I can think of is to contact your NIC manafactuer and ask for modified drivers ... so loopback is disabled. Or at least ask them for instructions.
0
 

Author Comment

by:kingmike301
ID: 13748510
I wanted to use a loopback address because that seems to be the only address available I could bind my other SMB service to. (It has to be on port 139 because explorer wont connect to any other port)

I'm open to any suggestion that involves creating a new local address, but it seems the only way to do that is to create a loopback adapter. And I don't want to be adding new hardware.

I tried setting up a new address with route, but I couldn't bind anything to it.

-Mike
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748596
and why dont you use 2 IP aresses on the NIC? you can assign so many IPs to singel NIC how much you wish. loopback exist for other reasons like for running services on it
i hope you know how to assing a secondary or tertiary IP for a network card...
0
 

Author Comment

by:kingmike301
ID: 13748649
Because explorer then treats the new IP as it does with 127.0.0.1 in the example I gave above, it ignores whatever is listening on that address and goes directly to 192.168.1.2:139

-Mike
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748687
set 2 IP adresses to your NIC then run the service and bind it to one of the IP addresses. it works for me.
if i set 192.168.123.130 as my 1st IP and 192.168.123.199 as the second IP then i can list the shares separatelly so i can see 2 different windows like

\\192.168.123.199\Downloads
and
\\192.168.123.130\Downloads

so i can browswe the diretories separatelly
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748700
anyway you could describe better what you are going to achieve bydoing this... i have a strange feeling there is much simplier way to do it...
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748702
>>This is a serious piss off because I am running a samba tunnel at  127.0.0.1:139

how can you tunell a port which is allready used by the operating system? this is just not possible
0
 

Author Comment

by:kingmike301
ID: 13748804
That didnt work for me.

I added two ip addresses ( control panel -> network connections -> local area connection, properties -> tcp/ip (properties) -> advanced -> add ip) 10.0.0.1 and 10.0.0.2 and they both had the same behavior as before. Maybe I am adding them in the wrong way?

essentially my goal is to set up a remote samba server and be able to connect to it with MS explorer on a port other than 139.  The best solution thus far is to add a new loopback device, but that seems rather inelegant. I think some simple internal forwarding scheme would be ideal.

but 127.0.0.1:139 wasnt already used by the operating system. i said in my original post that windows file sharing doesn't bind to the loopback, i was setting up *my own* tunnel at that address.
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 13748829
Because explorer then treats the new IP as it does with 127.0.0.1 in the example I gave above, it ignores whatever is listening on that address and goes directly to 192.168.1.2:139

Not necesarilly. Can you confirm this behaviour?

When I said "That is what I don't understand. Why would you run the server on a 127.0.0.1:139 address. Why not run it on another address which isn't a loopback address." this is exactly what I meant. Why not run the service on another local IP address.

What I mean is can you confirm that the second local IP address loopsback to th first as 127.0.0.1 does?

If not I really don't understand where your going mate.
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 13748852
sorry.. must of been posting at same time.... let me read your reply....
0
 

Author Comment

by:kingmike301
ID: 13748854
Yes I can confirm this behavior. I've tried it a dozen times at least.

I decided it made more sense to go with a loopback address since it wouldnt involve introducing any new addresses.

-Mike
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748856
>>essentially my goal is to set up a remote samba server and be able to connect to it with MS explorer on a port other than 139.  The best solution thus far is to add a new loopback device, but that seems rather inelegant. I think some simple internal forwarding scheme would be ideal.

tell it more essentially and try to say what are you going to achieve by this.
why would someone run a samba server on a different port than 139? this has no sense for me now as the samba protocol is as it is and runs on 139 (and others) port so running it on a different port would make the clients not able to connect via their samba clients as it is expected to run at the port 139 and you cannot tell a samba client to connect to different port.
why would you mess up with linux samba and windows ? just tell me the real reason and the "solution" you are trying to get working.
0
 

Author Comment

by:kingmike301
ID: 13748884

#1 My two machines are seperated by the internet

#2 My ISP blocks port 139 in on both sides

I'm trying to set up an ssh tunnel between client and server so that the server may run samba on a different port and I can connect to it using explorer. The idea is to bind one end of the tunnel to something local to the client on port 139 (since explorer can not accept alternate ports) so that I can map *that address* as a network drive.
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748926
you will NEVER get it working with samba in your scenario. it could work if there were two servers each on one side replicating trough some tunnel or trough another protocol.
what could solve your problem is a VPN connection to the server or just use a different protocol for filetransfer
0
 
LVL 8

Accepted Solution

by:
Leandro Iacono earned 500 total points
ID: 13748962
Take a look at this ...

IS this what you need?

http://lists.samba.org/archive/samba/2004-May/085358.html
0
 
LVL 14

Expert Comment

by:theruck
ID: 13748989
UICE i will answer...
Contraints are as follows (ie, if violated, the solution is unacceptable)
1. does not require local filesharing to be disabled
2. does not require any new hardware to be installled (ie, new loopback devices)
3. does not require any software to be installed
4. can be done from the context of a batch script
5. must work on all versions of win32 (ie >= 95)

so you just violate with the #1 rule then #4 and #5 :)
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 13749039
Yes, I know I violate some contraints. But I want to understand if thats his whole purpose.

As Far as I understood this was all about trying to auto-connect from the same computer to the samba server without using his local IP address or a 127.0.0.1 address ...

But now its a client computer on the other side of the internet trying to connect to port 129 which is also used by NETBIOS, and is to do with the PORT rather than the IP address ...

If it's the port, how about doing some NAT ...
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 13749049
NAT would involve installing Software ... yes, I know ...

Reading the article I posted, it says you don't have to necesarrily disable filesharing ...

"Is there a way to keep the local NetBIOS services running, and still be
able to map drives on the remote machine? Yes.

Install a Microsoft Loopback Adapter"


0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 14060379
I would haev loved to know if my info worked. but I do think I was trying to point the right way ...
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 14101594
Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

850 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