Can't connect to samba from foreign network --- 'Gethostbyaddr failed' error in log.smb

Frank R. Brown frank at
Thu Jun 10 11:10:18 GMT 1999

I figured out what my problem was:

The pc's on the foreign network were not configured to
	"Enable DNS for Windows Resolution",
whereas the pc's on the local network were.  I explicitly
rely on DNS for netbios resolution of the unix hostnames.

The 'Gethostbyaddr failed" error messages were a red herring.

For me the practical problem is I know of no quick netbios
name resolution test (e.g., for ip I can do 'ping hostname',
and I'll see the ip hostname resolution even if the host is
down, or otherwise ignoring ping requests).  Does anyone
know how I can ask 'Hey, Mr. local client.  At what ip address
do you think such-and-such a netbios host resides?

Anyway, I enabled dns as part of the netbios name resolution,
and now the samba shares work fine.

I wrote:

> I have a samba server at ip address
> 	aaa.bbb.ccc.ddd
> I can connect to it from clients on subnets aaa.bbb.eee. and
> aaa.bbb.fff.
> I can't connect to it from clients on ggg.hhh.
> smb.conf has
> 	hosts deny = all
> 	hosts allow = localhost, aaa.bbb., ggg.hhh.
> The client can successfully 'ping mysambaserver' (resolves to
> aaa.bbb.ccc.ddd).  Doing 'net view \\mysambaserver' fails with
> 'network path not found', and coincident with this the following
> error message appears in mysambaserver's log.smb:
> 	Gethostbyaddr failed for ggg.hhh.kkk.lll
> This is different from the client's address of ggg.hhh.iii.jjj

     Frank R.Brown
     Frank.R.Brown at MailAndNews

More information about the samba mailing list