ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] iptables
@ 2002-10-09  5:54 Egorov Alexey
  2002-10-09  6:08 ` Ruslan N. Balkin
  0 siblings, 1 reply; 2+ messages in thread
From: Egorov Alexey @ 2002-10-09  5:54 UTC (permalink / raw)
  To: community

Привет всем!
Народ, подскажите такой скрипт iptables достаточен:
*filter
:INPUT ACCEPT [2305:262010]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2743:551432]
COMMIT
*nat
:PREROUTING ACCEPT [188:19967]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [1838:117460]
-A POSTROUTING -s x.x.x.x/255.255.255.0 -o eth0 -j SNAT --to-source y.y.y.y
-A POSTROUTING -s x.x.x.x/255.255.255.0 -d x.x.x.x/255.255.255.0 -j ACCEPT
COMMIT

В принципе все работает, но по безапасности надо что-то делать или нет
( в частности с цепочками :INPUT :FORWARD :OUTPUT) ?




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Comm] iptables
  2002-10-09  5:54 [Comm] iptables Egorov Alexey
@ 2002-10-09  6:08 ` Ruslan N. Balkin
  0 siblings, 0 replies; 2+ messages in thread
From: Ruslan N. Balkin @ 2002-10-09  6:08 UTC (permalink / raw)
  To: community

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

On Wed, 09 Oct 2002 09:54:34 +0400
Egorov wrote:

> Привет всем!
> Народ, подскажите такой скрипт iptables достаточен:
> *filter
> :INPUT ACCEPT [2305:262010]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [2743:551432]
> COMMIT
> *nat
> :PREROUTING ACCEPT [188:19967]
> :POSTROUTING ACCEPT [0:0]
> :OUTPUT ACCEPT [1838:117460]
> -A POSTROUTING -s x.x.x.x/255.255.255.0 -o eth0 -j SNAT --to-source
> y.y.y.y-A POSTROUTING -s x.x.x.x/255.255.255.0 -d x.x.x.x/255.255.255.0
> -j ACCEPT COMMIT
> 
> В принципе все работает, но по безапасности надо что-то делать или нет
> ( в частности с цепочками :INPUT :FORWARD :OUTPUT) ?
> 

То есть, Вы позволяете _КОМУ_УГОДНО_ подключаться _К_ЛЮБОМУ_ПОРТУ_ на
указанном компьютере?

Вообще, как я понимаю, в идеале на каждой из цепочек INPUT, FORWARD должно
стоять правило по умолчанию DROP или REJECT. Просто так, на всякий случай.
А вот чтобы выбрать правильные ACCEPT для этих правил, скорее всего,
придется помучиться.

Лично я нашел наиболее удобным такой способ: протоколирование блокированных
netfilter'ом запросов в /var/log/messages. Сразу видно, какой нужный траффик
не был пропущен netfilter'ом.

И еще мне очень понравился fwbuilder (есть в Сизифе и в Мастере). Начальный
скрипт, от которого плясал, был сгенерен fwbuilder'om, а далее - руки, руки.

-- 
С уважением,
Балькин Руслан.

[-- Attachment #2: For security, this message has been digitally signed. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-09  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09  5:54 [Comm] iptables Egorov Alexey
2002-10-09  6:08 ` Ruslan N. Balkin

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