<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Samba: настройка iptables]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=8758&amp;type=atom" />
	<updated>2014-09-02T10:34:16Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=8758</id>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=421348#p421348" />
			<content type="html"><![CDATA[<p>SMB запущен на гостевом Debian7 на виртуальной машине VBox.<br />Путем чтения логов и методом тыка&nbsp; <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /> удалось получить доступ с хоста под Windows7 путем открытия в iptables еще и 5353/udp - Multicast DNS (помимо обычных). Иначе не работает. <br />Это потому что VBox или это от настроек SMB зависит?</p>]]></content>
			<author>
				<name><![CDATA[mexx]]></name>
				<uri>https://linuxforum.ru/profile.php?id=8516</uri>
			</author>
			<updated>2014-09-02T10:34:16Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=421348#p421348</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117380#p117380" />
			<content type="html"><![CDATA[<p>Kettler, спасибо</p>]]></content>
			<author>
				<name><![CDATA[safronowmax]]></name>
				<uri>https://linuxforum.ru/profile.php?id=12636</uri>
			</author>
			<updated>2010-11-29T15:27:52Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117380#p117380</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117346#p117346" />
			<content type="html"><![CDATA[<p>Ну вот смотри у меня как<br /># Разрешаем ssh серверу<br />iptables -A INPUT -i eth1 -p tcp --dport 22 -j ACCEPT #<br />iptables -A OUTPUT -o eth1 -p tcp --sport&nbsp; 22 -j ACCEPT #</p><p># Разрешаем dns серверу<br />iptables -A INPUT -i eth1 -p udp --sport 53 -j ACCEPT #<br />iptables -A OUTPUT -o eth1 -p udp --dport 53 -j ACCEPT #</p><p>#share а тут так пример samba<br />iptables -A INPUT -i eth1 -p udp -m multiport&nbsp; --ports 135,136,137,138,139,445 -j ACCEPT<br />iptables -A OUTPUT -o eth1 -p udp -m multiport&nbsp; --ports 135,136,137,138,139,445 -j ACCEPT<br />iptables -A INPUT -i eth1 -p tcp -m multiport&nbsp; --ports 135,136,137,138,139,445 -j ACCEPT<br />iptables -A OUTPUT -o eth1 -p tcp -m multiport&nbsp; --ports 135,136,137,138,139,445 -j ACCEPT</p>]]></content>
			<author>
				<name><![CDATA[Kettler]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11719</uri>
			</author>
			<updated>2010-11-29T13:15:37Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117346#p117346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117314#p117314" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>safronowmax пишет:</cite><blockquote><p>Kettler, т.е. получается правильно, что в INPUT должен быть sport, в OUTPUT dport? Если так, почему во всех руководствах написано наоборот?</p></blockquote></div><p>Потому что кто-то не подумал, когда писал, что исходящее подключение не обязательно должно начинаться с порта, на котором висит демон сам&nbsp; wink</p>]]></content>
			<author>
				<name><![CDATA[zerg]]></name>
			</author>
			<updated>2010-11-29T12:18:55Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117314#p117314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117310#p117310" />
			<content type="html"><![CDATA[<p>Kettler, т.е. получается правильно, что в INPUT должен быть sport, в OUTPUT dport? Если так, почему во всех руководствах написано наоборот?</p>]]></content>
			<author>
				<name><![CDATA[safronowmax]]></name>
				<uri>https://linuxforum.ru/profile.php?id=12636</uri>
			</author>
			<updated>2010-11-29T12:07:13Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117310#p117310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117301#p117301" />
			<content type="html"><![CDATA[<p>Потому что идёт запрос к тебе но не от от тебя. А если вод днс тогда наоборот.<br />INPUT вход source - порт точнее входящий запрос на порт 137:139 разрешить.</p><p>Из man iptables<br />-sport &quot;Исходный порт, с которого был отправлен пакет&quot;<br />-dport &quot;Порт или диапазон портов, на который адресован пакет&quot;</p>]]></content>
			<author>
				<name><![CDATA[Kettler]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11719</uri>
			</author>
			<updated>2010-11-29T11:35:08Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117301#p117301</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117295#p117295" />
			<content type="html"><![CDATA[<p>i2ks, в приведенных вами ссылках примеры в том виде в каком они есть тоже не работают, только если поменять dport на sport, а sport на dport.</p><p>Remedy, почему не обязательно?</p>]]></content>
			<author>
				<name><![CDATA[safronowmax]]></name>
				<uri>https://linuxforum.ru/profile.php?id=12636</uri>
			</author>
			<updated>2010-11-29T10:29:45Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117295#p117295</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117294#p117294" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>INPUT - входящий поток, значит должен быть входной порт dport, а OUTPUT - исходящий поток, значит должен быть порт источника sport.</p></blockquote></div><p>Совершенно не обязательно.</p>]]></content>
			<author>
				<name><![CDATA[Remedy]]></name>
				<uri>https://linuxforum.ru/profile.php?id=13291</uri>
			</author>
			<updated>2010-11-29T10:16:22Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117294#p117294</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117291#p117291" />
			<content type="html"><![CDATA[<p><strong>safronowmax</strong>, примеры:<br /><a href="http://www.cyberciti.biz/faq/configure-iptables-to-allow-deny-access-to-samba/">configure-iptables-to-allow-deny-access-to-samba</a><br /><a href="http://troy.jdmz.net/samba/fw/">Samba and IPTables</a></p>]]></content>
			<author>
				<name><![CDATA[i2ks]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16</uri>
			</author>
			<updated>2010-11-29T10:10:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117291#p117291</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Samba: настройка iptables]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=117288#p117288" />
			<content type="html"><![CDATA[<p>Не пойму, почему так. Нужно в iptables открыть порты для samba. </p><p>&lt;code&gt;<br />iptables -A INPUT -i eth0 -p TCP --dport 137:139 -j ACCEPT <br />iptables -A INPUT -i eth0 -p UDP --dport 137:139 -j ACCEPT <br />iptables -A OUTPUT -o eth0 -p TCP --sport 137:139 -j ACCEPT <br />iptables -A OUTPUT -o eth0 -p UDP --sport 137:139 -j ACCEPT <br />&lt;code&gt;<br />Так не работает, а если поменять местами dport и sport, то все работает<br />&lt;code&gt;<br />iptables -A INPUT -i eth0 -p TCP --sport 137:139 -j ACCEPT <br />iptables -A INPUT -i eth0 -p UDP --sport 137:139 -j ACCEPT <br />iptables -A OUTPUT -o eth0 -p TCP --dport 137:139 -j ACCEPT <br />iptables -A OUTPUT -o eth0 -p UDP --dport 137:139 -j ACCEPT <br />&lt;code&gt;</p><p>Почему так, ведь у нас INPUT - входящий поток, значит должен быть входной порт dport, а OUTPUT - исходящий поток, значит должен быть порт источника sport. Но так не работает, почему?</p>]]></content>
			<author>
				<name><![CDATA[safronowmax]]></name>
				<uri>https://linuxforum.ru/profile.php?id=12636</uri>
			</author>
			<updated>2010-11-29T10:05:44Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=117288#p117288</id>
		</entry>
</feed>
