From: Igor Tertishny <rassil@elterrus.org>
To: community@altlinux.ru
Subject: [Comm] Прошу помочь с настройкой файерволла
Date: Tue, 19 Oct 2004 14:34:04 +0200
Message-ID: <200410191434.05095.rassil@elterrus.org> (raw)
Здравствуйте все! Я столкнулся с проблемой. У меня небольшая сеть, раздающая
клиентам интернет и иные сервисы. Многие качают файлы с помощью edonkey. Но
стоящим за сервером (за файерволлом) клиентам сервера edonkey выдают только
самый низший приоритет (lowid). Маскарадинг включен и почему так происходит
понять не могу. Знаю, что нужно открыть порты по списку. Открывал в
файерволле вообще все, не помогает. Клиенты дергают - сделай, другие же
делают. А я просто не знаю как, увы мне. Файерволл уже поставил простейший,
но снова ничего не дало. Он ниже. Прошу подсказать как открыть порт 4661,
например, чтобы сервер edonkey и не догадывался, что ним коннектит не мой
сервер, а стоящий за ним клиент. Ведь если я ставлю осла на моем сервере, то
все работает как положено. Но не держать же его на сервере? нонсенс ведь.
Ниже мой файерволл. Понимаю, что полный примитив, но даже с ним проблемы.
Заранее благодарен за помощь.
# Включаем маршрутизацию пакетов.
echo 1 > /proc/sys/net/ipv4/ip_forward
# Interface to Internet
EXTIF=ppp+
ANY=0.0.0.0/0
#iptables -F
#Очистка таблицы преобразования адресов.
iptables -t nat -F
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
# Syn-flood protection.
# Защита от Syn-flood.
iptables -A INPUT -p tcp --syn -m limit --limit 1/s -j ACCEPT
iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
# Furtive port scanner.
# Защита от скрытого сканирования портов.
iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s
-j ACCEPT
iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit
1/s -j ACCEPT
# Ping of death.
# Защита от Ping of death.
iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s -j
ACCEPT
iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j
ACCEPT
# Deny NEW end INVALID incoming or required routings packets from ppp0.
# Запрещаем NEW и INVALID входящие или требующие маршрутизации пакеты с ppp0.
iptables -A INPUT -i $EXTIF -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i $EXTIF -m state --state NEW,INVALID -j DROP
# Allow a packets which is related to, and part of an existing connection.
# Разрешаем пакеты принадлежащие и относящиеся к уже установленному
соединению.
iptables -N block
iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A block -m state --state NEW -i ! $EXTIF -j ACCEPT
iptables -A block -j DROP
iptables -A INPUT -j block
iptables -A FORWARD -j block
# Do masquerading.
# Маскарадим ppp0.
iptables -t nat -A POSTROUTING -j MASQUERADE -s 192.168.0.0/24 -o ppp0
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
#Разрешаем конектится из локальной сети к любому сервису
iptables -A INPUT -s 192.168.0.0/24 -i $EXTIF -j ACCEPT
#Разрешаем приходить и форвадится связанным пакетам (которые являются ответами
на запросы)
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT
next reply other threads:[~2004-10-19 12:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-19 12:34 Igor Tertishny [this message]
2004-10-19 12:52 ` Mikhail Pokidko
2004-10-20 11:36 ` Igor Tertishny
2004-10-19 13:00 ` Myroslav M Rozum
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=200410191434.05095.rassil@elterrus.org \
--to=rassil@elterrus.org \
--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