The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"доступ из локальной сети через iptables nat к сетевой папке win"
Версия для распечатки Пред. тема | След. тема
Форум Samba, вопросы интеграции Unix и Windows
Исходное сообщение [ Отслеживать ]

. "доступ из локальной сети через iptables nat к сетевой папке win" +/
Сообщение от mvm (ok), 17-Мрт-12, 00:09 
>
 
> root@triss:~# iptables -t NAT -L
> iptables v1.4.4: can't initialize iptables table `NAT': Table does not exist (do
> you need to insmod?)
> Perhaps iptables or your kernel needs to be upgraded.
> root@triss:~#
>

> Ни на какие мысли не наводит?

Виноват, от руки дописал, в конфиге стоит правильно -t nat.

Оказалось, что протокол SMB не совместим с NAT: http://www.nynaeve.net/?p=93. То есть из-за NAT одновременно к windows серверу может обращаться только один клиент, если пытается обратиться второй, то соединение с первым, или с обоими сервер разрывает. В качестве решения предлагают либо делать NAT на пул IP адресов, чтобы каждый клиент после NAT имел свой IP-адрес, либо запретить direct hosting, запретив обращение клиентов на порт 445. Тогда клиенты переходят на общение с сервером по NetBIOS через TCP/IP, и это нормально работает с NAT. Я запретил direct hosting, теперь наши клиенты в любом количестве могут соединяться с базой данных. Дальше следует цитата с описанием проблемы (или это можно назвать особенностью) SMB:

...Whenever a new transport-layer connection is created, the client is supposed to assign a new VC number. Note that the VcNumber on the initial connection is expected to be zero to indicate that the client is starting from scratch and is creating a new logical session. If an additional VC is given a VcNumber of zero, the server may assume that any existing connections with that same client are now bogus, and shut them down.

Why do such a thing?

The explanation given in the LANMAN documentation, the Leach/Naik IETF draft, and the SNIA doc is that clients may crash and reboot without first closing their connections. The zero VcNumber is the client’s signal to the server to clean up old connections. Reasonable or not, that’s the logic behind it. Unfortunately, it turns out that there are some annoying side-effects that result from this behavior. It is possible, for example, for one rogue application to completely disrupt SMB filesharing on a system simply by sending Session Setup requests with a zero VcNumber. Connecting to a server through a NAT (Network Address Translation) gateway is also problematic, since the NAT makes multiple clients appear to be a single client by placing them all behind the same IP address.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
доступ из локальной сети через iptables nat к сетевой папке win, mvm, 15-Мрт-12, 21:27  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру