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
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
Andre Albsmeier <andre.albsmeier@mchp.siemens.de> wrote:> 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.If you add AA_BB's address to the lmhosts file of the WINS server this entry won't be added to the WINS database? Did you give it a try? E.- -- Eloy A. Paris Information Technology Department Rockwell Automation Venezuela Telephone: +58-2-9432311 Fax: +58-2-9431645
On Wed, 17 Jun 1998, Andre Albsmeier wrote:> please imagine the following scenario:[Sets up WINS so that firewall proxies a remote SMB server]> 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....> So my solution is now a small hack to the nmbd on the WINS > server which adds the IP address of AA_BB manually:....> This works great since AA_BB is now resolved through the WINS > server.Note also that the firewall could connect to the remote SMB server using SSH or some other sound encryption strategy, rather than directly, giving nice remote LAN access. You might have to watch for startup latency - I don't know how tolerant M$ clients are of slow servers. With a smart inetd on the firewall, and IP aliasing, you could handle multiple remote servers this way. Charlie Brady - Telstra |internet: cbrady@ind.tansu.com.au Network Products |Snail : Locked Bag 6581, GPO Sydney 2001 Australia Platform Technologies |Physical : Lvl 2, 175 Liverpool St, Sydney 2000 IN-Sub Unit - Sydney | Phone: +61 2 9206 3470 Fax: +61 2 9281 1301