ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Maxim.Savrilov@socenter.ru
To: community@altlinux.ru
Subject: [Comm] HELP! Проброс портов через файрволл с политикой DROP
Date: Fri, 3 Sep 2004 09:14:00 +0700
Message-ID: <20040903091400.2c3df2fd.Maxim.Savrilov@socenter.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

Здравствуйте!

Есть файрволл, на котором на всех цепочках по-умолчанию политика DROP
Если мне нужно было какой-то сервис открыть, то я дописывал просто
соответствующие правила и все работало.

Но понадобилось пробросить порты с внешнего интерфейса во внутреннюю сетку.

$CLIENT_IP - ip клиента из внешней сети
$SERVER_IP - ip сервера из внутренней сети
$SERVICE - номер порта
$EXT_IF и $INT_IF = внешний и внутр интерфейсы файрволла
$EXT_IP - внешний ip файрволла

$IPTABLES -t nat -A PREROUTING -i $EXT_IF -p tcp -s $CLIENT_IP -d $EXT_IP --dport $SERVICE -j DNAT --to $SERVER_IP:$SERVICE

Такая конструкция работает, если политики выставлены в ACCEPT
При DROP все это обламывается
Пробовал и в FORWARD прописывать

$IPTABLES -A FORWARD -i $INT_IF -o $EXT_IF -p TCP -s $SERVER_IP --sport $SERVICE -j ACCEPT
$IPTABLES -A FORWARD -i $EXT_IF -o $INT_IF -p TCP -d $SERVER_IP --dport $SERVICE -j ACCEPT

и в INPUT-OUTPUT

$IPTABLES -A INPUT -i $EXT_IF -s $CLIENT_IP -p tcp -m tcp --dport $SERVICE -j ACCEPT
$IPTABLES -A INPUT -i $INT_IF -d $CLIENT_IP -p tcp -m tcp --sport $SERVICE -j ACCEPT
$IPTABLES -A OUTPUT -o $INT_IF -s $CLIENT_IP -p tcp -m tcp --dport $SERVICE -j ACCEPT
$IPTABLES -A OUTPUT -o $EXT_IF -d $CLIENT_IP -p tcp -m tcp --sport $SERVICE -j ACCEPT


смотрел tcpdump на обоих интерфейсах - вроде все пакеты этими правилами перекрываются
Но все равно не работает.
Ничего не понимаю, помогите разобраться, пожалуйста!

-- 
No matter how subtle the wizard,
a knife in the shoulder blades will seriously cramp his style.

[-- Attachment #2: Type: application/pgp-signature, Size: 307 bytes --]

             reply	other threads:[~2004-09-03  2:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03  2:14 Maxim.Savrilov [this message]
2004-09-03  6:17 ` Alexey Morsov
2004-09-03  6:49   ` Maxim.Savrilov
2004-09-03  7:25     ` Alexey Morsov
2004-09-03  7:32       ` Ivan Fedorov
2004-09-03 13:22     ` Dmitry Lebkov
2004-09-07  2:27       ` Maxim.Savrilov
2004-09-07  7:06         ` Serge Polkovnikov

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=20040903091400.2c3df2fd.Maxim.Savrilov@socenter.ru \
    --to=maxim.savrilov@socenter.ru \
    --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