Skip to contentSkip to conversation

Netbios problem with NAT

DISCUSSION Song Wang 2 participants 2 messages Jul 22, 2003 – Jul 23, 2003 netfilter

lore
Share & tools
lore

Song Wang

author
#0 lore raw

Hi,

I found a problem with netbios when 2 Windows PCs behind a NAT router try to access the same shared directory on the Windows server sitting on the other side of the NAT router. (kernel 2.4.17 w/ iptables 1.2.7a)

For example

4.3.2.1--------<NAT router>---------PC1 192.168.1.2

                                      |-------PC2 192.168.1.3

Windows XP PC1 and PC2 got private IP address from the DHCP server on the NAT router. When PC1 alone accesses the shared directory on the Windows XP server (or PC) 4.3.2.1 using \\4.3.2.1, there is no problem. However, when PC2 also accesses the same directory via \\4.3.2.1, problem arises. You can reproduce the problem in this way

Copy a file from \\4.3.2.1 to PC1, when the copying is ongoing, do a refresh (F5) or copy a file on the same \\4.3.2.1 from PC2, you will see a dialog pop up on PC1

"The specified network name is not available"

The copying process got stuck.

Strangely, the problem seems to happen only when the two PC get the IP address via DHCP. If one of the two PCs use the static IP address, the problem seems to go away.

Could this be a problem of netbios with connection tracking? Maybe we need to write a nat helper module for netbios?

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

#1 lore raw
Quoted 5 lines · Song Wang

Hi,

I found a problem with netbios when 2 Windows PCs behind a NAT router try to access the same shared directory on the Windows server sitting on the other side of the NAT router. (kernel 2.4.17 w/ iptables 1.2.7a)

why did you ever think that this would work? Even the microsoft knowledge base contains an article that you'd need some kind of special NAT support for it, in order to mangle the contents of the netbios packets.

Quoted 2 lines

Could this be a problem of netbios with connection tracking? Maybe we need to write a nat helper module for netbios?

yes, indeed. A nat helper would be required. Patches welcome.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie