nmbd uses wrong source ip when sending udp
don_mccall at hp.com
Mon Sep 24 09:21:03 GMT 2001
That's right - it uses the first one it finds. If you want to change this
behavior, you can set
interfaces = 10.x.x.x
so it will be forced to choose this interface instead.
From: Torbjörn Jansson
[mailto:tobbe%mariedal-32-147.student.mh.se at mh.se]
Sent: Monday, September 24, 2001 12:14
To: samba-technical at lists.samba.org
Subject: nmbd uses wrong source ip when sending udp
when nmbd starts it tries to send some udp packets to the wins server that i
have configured in smb.conf.
but it uses the wrong source ip in the udp packets wich makes my iptables
firewall thow away the packets.
since nmbd cant send packets to my wins it cant become a domain master
(accessing shares and files works fine on samba despite the problems with
im using samba 2.2.1a.
eth0 is my internal network with ip 192.168.0.1 and eth1 is my external
network with ip 10.x.x.x
the wins server is on the 10.x.x.x subnet.
here is a few lines from my loggs (wins ip replaced with 10.y.y.y):
nmbd: [2001/09/22 16:11:14, 0] libsmb/nmblib.c:send_udp(776)
kernel: IN= OUT=eth1 SRC=192.168.0.1 DST=10.y.y.y LEN=96 TOS=0x00 PREC=0x00
TTL=64 ID=0 DF PROTO=UDP SPT=137 DPT=137 LEN=76
nmbd: Packet send failed to 10.y.y.y(137) ERRNO=Operation not
the reason it failes is becaus i have a filter rule in iptables so that no
packets with wrong source ip can get out, but that doesnt explain why nmbd
does this in the first place.
when i was lookning thru the sourcecode for nmbd it seems like nmbd uses the
first found interface when sending packets, is it realy ok to do that?
i gues i coud try to swap eth0 and eth1 and see if it works better, but i
think this shoudnt be nessesary.
i wonder if it nmbd works if i take eth0 down temprarily and start samba and
then restarts eth0 again, that might force eth1 to be first interface.
More information about the samba-technical