<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; iptables не работают правила]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=31134</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=31134&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «iptables не работают правила».]]></description>
		<lastBuildDate>Sat, 19 Oct 2013 17:59:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: iptables не работают правила]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=370839#p370839</link>
			<description><![CDATA[<p>А если вот так<br /></p><div class="codebox"><pre><code>#!/bin/sh

/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe iptable_filter
/sbin/modprobe iptable_nat

echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward

iptables -F
iptables -t nat -F
iptables -t mangle -F

iptables -X
iptables -t nat -X
iptables -t mangle -X

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT

iptables -t nat -A POSTROUTING -s 10.10.10.10 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.3 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.4 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.5 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.6 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.7 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.8 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.9 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.11 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.12 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.13 -o ppp0 -j MASQUERADE</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kisil)]]></author>
			<pubDate>Sat, 19 Oct 2013 17:59:14 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=370839#p370839</guid>
		</item>
		<item>
			<title><![CDATA[iptables не работают правила]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=370811#p370811</link>
			<description><![CDATA[<p>вот мои правила ниже. Почему-то не открываються сайты... Пинг идет, бинд настроен айпи резольвит...Сеть состоит из 10 компьютеров... на всех должен быть интернет... Настроен через рррое. может где-то ошибка ? </p><div class="codebox"><pre><code>#!/bin/sh

/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe iptable_filter
/sbin/modprobe iptable_nat

echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P OUTPUT ACCEPT


iptables -F
iptables -t nat -F
iptables -t mangle -F

iptables -X
iptables -t nat -X
iptables -t mangle -X

iptables -A INPUT -i eth0 -j ACCEPT
iptables -A FORWARD -i ppp0 -j ACCEPT
#iptables -A FORWARD -i ppp1 -j ACCEPT
#iptables -t nat -A POSTROUTING -s 10.10.10.2 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.10 -o ppp0 -j MASQUERADE
#iptables -t mangle -A FORWARD -s 10.10.10.7 -j MARK --set-mark 103
iptables -t nat -A POSTROUTING -s 10.10.10.3 -o ppp0 -j MASQUERADE
#iptables -t mangle -A FORWARD -s 10.10.10.3 -j MARK --set-mark 106
iptables -t nat -A POSTROUTING -s 10.10.10.4 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.5 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.6 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.7 -o ppp0 -j MASQUERADE
#iptables -t mangle -A FORWARD -s 10.10.10.9 -j MARK --set-mark 105
#iptables -t mangle -A FORWARD -s 10.10.10.6 -j MARK --set-mark 101
iptables -t nat -A POSTROUTING -s 10.10.10.8 -o ppp0 -j MASQUERADE
#iptables -t mangle -A FORWARD -s 10.10.10.8 -j MARK --set-mark 102
iptables -t nat -A POSTROUTING -s 10.10.10.9 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.11 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.12 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.10.13 -o ppp0 -j MASQUERADE</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (uaradio)]]></author>
			<pubDate>Sat, 19 Oct 2013 14:48:39 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=370811#p370811</guid>
		</item>
	</channel>
</rss>
