* [Comm] синтаксис iptables
@ 2004-12-17 7:07 Roman V. Tutov
2004-12-17 7:01 ` Nizamov Shavkat
2004-12-17 7:14 ` Mike Lykov
0 siblings, 2 replies; 3+ messages in thread
From: Roman V. Tutov @ 2004-12-17 7:07 UTC (permalink / raw)
To: Community
Здравствуйте, Community.
Господа подскажите. Как правильно написать правило не для адреса а для
всей сети ?
правило в оригинале
/sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.247/32 -m multiport --dport 5222,5223 -j MASQUERADE
правильно так ?
/sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.0/32 -m multiport --dport 5222,5223 -j MASQUERADE
или так ?
/sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.1-192.168.30.245 -m multiport --dport 5222,5223 -j MASQUERADE
почему-то система ест и то и то правило и не ругаеться .
А проверить не могу . ибо машина далеко
--
Тутов Роман Викторович
Системный администратор
ASTON Agro Industrial Company Group
Россия,344002, г.Ростов-на-Дону,Промзона "Заречная"
ул.1-я Луговая,3 тел.: (863 2) 999049
JID:tutov@jabber.aston.ru
mailto:tutov@aston.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] синтаксис iptables
2004-12-17 7:07 [Comm] синтаксис iptables Roman V. Tutov
@ 2004-12-17 7:01 ` Nizamov Shavkat
2004-12-17 7:14 ` Mike Lykov
1 sibling, 0 replies; 3+ messages in thread
From: Nizamov Shavkat @ 2004-12-17 7:01 UTC (permalink / raw)
To: community
> /sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.0/32 -m
> multiport --dport 5222,5223 -j MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.0/24 -m
multiport --dport 5222,5223 -j MASQUERADE
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] синтаксис iptables
2004-12-17 7:07 [Comm] синтаксис iptables Roman V. Tutov
2004-12-17 7:01 ` Nizamov Shavkat
@ 2004-12-17 7:14 ` Mike Lykov
1 sibling, 0 replies; 3+ messages in thread
From: Mike Lykov @ 2004-12-17 7:14 UTC (permalink / raw)
To: community
В сообщении от Пятница 17 Декабрь 2004 11:07 Roman V. Tutov написал:
> /sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.247/32 -m
> multiport --dport 5222,5223 -j MASQUERADE
> правильно так ?
> /sbin/iptables -t nat -A POSTROUTING -o eth0 -p TCP -s 192.168.30.0/32 -m
> multiport --dport 5222,5223 -j MASQUERADE
вы про маски подсетей-то почитайте, что такое означает это /32. А означает оно
как раз "один хост". Поэтому то, что вы поменяли только адрес и не поменяли
маску - бессмысленно.
--
Mike Lykov
Samara, "Vesna" parfum company, System administrator
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-17 7:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17 7:07 [Comm] синтаксис iptables Roman V. Tutov
2004-12-17 7:01 ` Nizamov Shavkat
2004-12-17 7:14 ` Mike Lykov
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git