How about this option for nmbd?

Michael St. Laurent rowl at earthlink.net
Tue Jun 16 15:43:48 GMT 1998


I think it's a great idea that would replicate an ability that the NT WINS
server has.

At 01:35 AM 6/17/98 +1000, Andre Albsmeier wrote:
>Hi,
>
>please imagine the following scenario:
>
>We have 4 local samba networks consisting of multiple
>samba machines and Win95 and NT machines as well. They
>all talk to each other and all works well. We have one
>central (samba) WINS server for all 4 nets. These
>4 nets are connected together and communicate to
>the outside world through a firewall.
>
>Now I want to connect to exactly one share on the other
>side of the firewall. Let's assume the name of this machine
>to be AA_BB and the name of the share APPS. The firewall
>machine has a small program listening on port 139/tcp and
>forwards all packets to port 139 on the AA_BB machine.
>
>On a Win95 client I add AA_BB to the lmhosts file with
>the IP address of the firewall machine (!). Now I can
>connect to \\AA_BB\APPS and everything works great.
>But since I am lazy, I don't want to add this entry to
>all lmhost files. A name resolution by DNS is not possible
>since AA_BB is not a valid hostname and the resolver under
>FreeBSD discards it.
>
>So my solution is now a small hack to the nmbd on the WINS
>server which adds the IP address of AA_BB manually:
>
>*** nmbd_winsserver.c.ORI	Sun Jun 14 19:04:45 1998
>--- nmbd_winsserver.c	Sun Jun 14 19:51:32 1998
>***************
>*** 126,131 ****
>--- 126,137 ----
>  
>    add_samba_names_to_subnet(wins_server_subnet);
>  
>+   { struct in_addr  ip;
>+     ip = *interpret_addr2( "192.168.1.10" );
>+     add_name_to_subnet( wins_server_subnet,
>+                         "AA_BB", 0x0, 0x64, PERMANENT_TTL,
REGISTER_NAME, 1, &ip );
>+   }        
>+ 
>  #ifndef SYNC_DNS
>    /* Setup the async dns. */
>    start_async_dns();
>
>This works great since AA_BB is now resolved through the WINS
>server.
>
>Now my question is:
>Would it make sense to implement this as a global option
>in smb.conf? It could be similiar to the following:
>
>static wins address	=	123.123.123.123/HOST1 234.234.234.234/HOST2
>
>This would add HOST1 with IP 123.123.123.123 and HOST2 with
>IP 234.234.234.234 to the WINS database permanently.
>
>What do you think of this? If you would like to see this
>in the regular samba code, I would try to make a patch for
>samba 1.9.18p8. If not, I will stay with my hack since it
>works for me :-)
>
>Thanks,
>
>	-Andre
>
>

--------------------
Michael St. Laurent
Hartwell Corporation

"Whenever you find yourself on the side of the majority
it is time to pause and reflect."
               -- Mark Twain


More information about the samba mailing list