[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

snat,dnat and netbios



situation:
pubblic network (A) ----------------- eth0 linux box eth2-------------- private network (B)

in the net A there is a windows domain (one pdc running on win nt4 server and several client win95,98,nt4,2k )



i've planed to move all the win domain into the net B
unfortunately i've to do it step by step....  pc by pc  :P
now i try to move just on pc in B

on linux box (debian woody kernel 2.4...):
ipconfig eth0:1 x.y.z.k   (to answer the arp request)
iptables -t nat -I POSTROUTING 1 -o eth0 -s 10.0.1.2  -j SNAT --to x.y.z.k
iptables -t nat -A PREROUTING -i eth0 -d x.y.z.k -j DNAT --to 10.0.1.2

unplugged  the pc from net A and plugged  into  B (setting its ip to 10.0.1.2)
all protocols works fine but....
i can't join the domain!!!!

running tcpump:

(eth2)
15:51:49.424829 10.0.1.2.netbios-dgm > x.y.z.pdc.netbios-dgm:^M
>>> NBT UDP PACKET(138) Res=0x110E ID=0x802F IP=10 (0xa).0 (0x0).1 (0x1).2 (0x2) Port=138 (0x8a)
                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Length=218 (0xda) Res2=0x0^M
SourceName=CSITE31         NameType=0x00 (Workstation)^M
DestName=^M
^M

(eth0)
15:51:49.324518 x.y.z.k.netbios-dgm > x.y.z.pdc.netbios-dgm:^M
>>> NBT UDP PACKET(138) Res=0x100E ID=0x802E IP=10 (0xa).0 (0x0).1 (0x1).2 (0x2) Port=138 (0x8a) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :(((((
Length=218 (0xda) Res2=0x0^M
SourceName=CSITE31         NameType=0x00 (Workstation)^M
DestName=^M
^M


but the is no answer!!!

i think that the pdc try to reply to the ip in the pl and not to the ip in the header !!!!!
and obviously the reply was lost !!!  (i don't have access to the net A gw!!)
there is some modules/tricks  to solve the problem??

tia

cesare fontana







Reply to: