[Samba] Windows XP changes IP of Samba to outside port!

Jim Durham durham at jcdurham.com
Fri Apr 23 01:16:43 GMT 2004

I checked through the archives and I didn't see this one.  This has been 
driving me absolutely crazy for months now and I finally tumbled to what was 
going on.

I get hesitations of up to 2 minutes from some of our XP machines when 
printing to a printer on the Samba server. 

My first suspicion was that it was some kind of name resolving issue. I tried 
using the domain name of the Samba server (we have an 'inside' domain set up) 
and that fixed some of the XP boxes. 

Yesterday, I got a complaint from a person who was getting the 2 minute delay 
before printing and I ran over to his office and put in the DNS name of the 
inside interface (the LAN side) of the Samba server in the "Add Printer" 
thingy. Still got a 2 minute delay and "Access Denied" stuff.

OK..I said...I'll short this out...I hate to do it, but I'll use the IP 
address of the Samba server and it won't have to look up anything. Still 2 
minute delay before printing!

Then I noticed that XP had changed the ip address shown in the "Printers and 
Faxes" icons. Huh?  That's the OUTSIDE interface of the Samba server. That 
server is a gateway also and has two interfaces, one on the internet, one on 
the LAN. XP was changing the IP I gave it (the inside IP ) and replacing it 
with the outside IP! 

Then it hit me that it was getting "access denied" because it was trying to 
access port 138 through the firewall! Of course, port 138 is blocked to the 
outside world.  I noticed that there had been quite a number of IP packets 
bouncing off the firewall rule that blocked 138. Hmmmm...

So, I added a rule that says that packets emanating from our outside IPs 
(inside addresses would be NAT'd to the outside IPs) can be sent to port 138 
on the Samba box and Voila!  Instant printing! The packets are apparently 
going to the Samba server, being NAT'd to the outside interface and now they 
can come back in on port 138 and it works.

Does anyone know what in the world is going on with this? Why would XP change 
the IP. By that I mean you  say \\\printername when you set up the 
printer and you look at the icon and it says \\The_Outside_IP\printername.


More information about the samba mailing list