ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Serge Kompan <skompan@kspu.kr.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Iptables консультация нужна
Date: Tue, 28 Jun 2005 14:58:50 +0300
Message-ID: <200506281458.50742.skompan@kspu.kr.ua> (raw)
In-Reply-To: <1842225358.20050628152433@narod.ru>

В сообщении от Вторник 28 Июнь 2005 14:24 Oleg Pan написал(a):
> Hello community,
>
>   есть сеть win
>   полностью за firewall iptables
>
>   в сети пользуется msn.messenger
>   внутри сети все работает нормально
>
>   для того что-бы messenger работал и с инетом тоже надо разрешить
>   udp порты 5004-65535 в обоих направлениях
>
>   делаю так:
>
> $IPTABLES -A FORWARD -p udp -s $my_ip -d 0.0.0.0/0.0.0.0 -j ACCEPT
> $IPTABLES -A FORWARD -p udp -s 0.0.0.0/0.0.0.0 -d $my_ip -j ACCEPT
> $IPTABLES -t nat -A PREROUTING -p udp -s 0.0.0.0/0.0.0.0 -d $INET_IP\
> --dport 5004:65535 -j DNAT --to-destination $my_ip
>
> но так с инетом можно работать только с одной машины, а хочется с
> нескольких
>
> Есть-ли кокое-нибудь решение этой проблемы?
да есть
for my_ip in 192.168.1.1 192.168.1.2
do
$IPTABLES -A FORWARD -p udp -s $my_ip -d 0.0.0.0/0.0.0.0 -j ACCEPT
$IPTABLES -A FORWARD -p udp -s 0.0.0.0/0.0.0.0 -d $my_ip -j ACCEPT
$IPTABLES -t nat -A PREROUTING -p udp -s 0.0.0.0/0.0.0.0 -d $INET_IP\
 --dport 5004:65535 -j DNAT --to-destination $my_ip
done



  reply	other threads:[~2005-06-28 11:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 11:24 Oleg Pan
2005-06-28 11:58 ` Serge Kompan [this message]
2005-06-28 12:15   ` Re[2]: " Oleg Pan
2005-06-28 13:14 ` Alexander Vasiliev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506281458.50742.skompan@kspu.kr.ua \
    --to=skompan@kspu.kr.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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