[techtalk] Samba question...

Eric Richard Turner turnere at cc.wwu.edu
Tue Jan 9 13:34:22 EST 2001

I have a Linux box doing IP Masquerading for a small home LAN, and want to
provide SMB shares on it for the Windows machines on the LAN. The hostname
and IP address of the Linux box is assigned by a dhcp server via the
interface on the Internet side (eth1 in the diagram below).

                                       |       | Host IP addresses
 name/addr   ---------               --| host1 | are assigned by
 via dhcp   |         | |  |       | dhcpd running on
----eth1----|  Linux  |----eth0-----|   -------  the Linux box.
            |   box   |             |   -------
             ---------              |  |       |
                                     --| host2 |
                                       |       |

In /etc/smb.conf I have added the following directives to only provide SMB 
shares via eth0:

bind interfaces only
interfaces eth0

However, when I try starting the smbd daemon it dies and gives the
following error in /var/log/samba.smb:

Get_Hostbyname: Unknown host evrtwa1-ar1-188-134

If Get_Hostbyname provided the fully-qualified domain name I'm sure smbd
 would work (I added an entry for evrtwa1-ar1-188-134 to /etc/hosts just
to try it out, and was able to access the SMB shares I have set up from MS
Windows machines on the LAN).

Because the hostname is assigned by DHCP, it can (and probably will)
change. Any ideas what I should do? I suppose I could have a script
modify /etc/hosts whenever dhcpc requests/obtains a new hostname and IP
address, but that seems like a bit of a kludge.

Eric R. Turner

My public OpenPGP key can be found at

More information about the Techtalk mailing list