From: Alexey Morsov <samurai@ricom.ru> To: community@altlinux.ru Subject: Re: [Comm] Re: Linux Gate Date: Wed, 26 Nov 2003 12:40:54 +0300 Message-ID: <3FC47526.1050302@ricom.ru> (raw) In-Reply-To: <20031126075223.GC11169@localhost.localdomain> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Денис Смирнов пишет: | On Tue, Nov 25, 2003 at 03:41:09PM +0300, Alexey Morsov wrote: | | > Есть необходимость настроить на базе linux-машины gate для | > небольшой (30-40 компьютеров) сетки с выходом как в интеренет | > через ADSL. | | Ключевые слово для поиска документации -- NAT, MASWUERADE. Погряз уже во всех этих NAT =) | | > 2. Поднимаем и настроаиваем iptables так что бы все порты извне | > кроме http, ftp и https были закрыты. | | Зачем открывать http, ftp, https? Это нужно только если на этой машине | есть соответствующие сервера. Обычно снаружи бывает смысл держать smtp, и, | если админ удалённый, то ssh. Дело в том что в нашей сетке стоят и www и ftp и mail сервера (хотя прописаны они в сетке провайдера - т.е. видны извне) - но физчески они в нашей сетке... Сейчас у нас cisco так и настроена - - от нас вовне доступно все - к нам извне только http, ftp (ну плюс видимо все порты от 1024 и выше... они вроде как почти всегда открыт) - никаких телнетов и ssh А - ну почта конечно... Вот нужно такое же дело изобразить на Linux (для adsl) | | > 3. Указываем в правилах iptables так что бы все запросы из | > феёкового пространства адресов форвардились на второй интерфейс. | | _Форвардились_ это указывается в route. А в iptables нужно настроить NAT. И вот тут непонятка - сейчас у нас route сеть провайдера (те 8 адресов что он нам выделил как внешние) настроен. Если я втыкаю в комп вторую сетевуху, то по идее у меня долна таблица route выглядить типа как: route -net 201.xxx.xxx.xxx netmask 201.xxx.xxx.xxx gw 201.xxx.xxx.xxx dev eth0 (первый провайдер) route -net 202.xxx.xxx.xxx netmask 202.xxx.xxx.xxx gw 202.xxx.xxx.xxx dev eth1 (второй провайдер) И в iptables я так понимаю надо сделать что-то типа: iptables -t nat -A PREROUTING -i eth0 -j SNAT --to-source 202.xxx.xxx.xxx:1024-32000 и дальше route его закинет куда надо, как я поинмаю А вот что с ответной частью (т.е. с ответом что прийдет извне - он ведь прийдет на 202.xxx.xxx.xxx)? | | > 4. Заводим все http, ftp и https запросы пользователй на прокси. | | С ftp, AFAIK, малореально, да и ненужно чаще всего. Пусть лучше через NAT | ходят. Или нужно журналировать все посещения? Да заводить пожалуй не надо - просто я думаю надо настроить iptables так чтобы онно запрещало доступ мимо прокис а прокси прописывать явно... | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/xHUmanU3DZdZEiwRAsqtAJ9KuHLoEX+Sc821gWNRqyYUgS6B9QCfWfcl XHimUleQMP0P2D7adxa6JJs= =/oP5 -----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-11-26 9:40 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-11-25 12:41 [Comm] " Alexey Morsov 2003-11-25 13:16 ` Dmitry Nechaev 2003-11-26 7:52 ` [Comm] " Денис Смирнов 2003-11-26 8:14 ` Andrey Rahmatullin 2003-11-26 9:40 ` Alexey Morsov [this message] 2003-11-26 12:56 ` Денис Смирнов 2003-11-26 15:02 ` Alexey Morsov 2003-11-27 3:02 ` Денис Смирнов 2003-11-27 3:30 ` aek 2003-11-27 4:04 ` Денис Смирнов 2003-11-27 7:52 ` aek 2003-11-27 8:07 ` Michael Shigorin 2003-11-27 11:45 ` Денис Смирнов 2003-11-27 8:07 ` Michael Shigorin 2003-11-27 11:49 ` Денис Смирнов 2003-11-28 21:59 ` Michael Shigorin 2003-11-29 5:00 ` Денис Смирнов 2003-11-29 10:29 ` Michael Shigorin 2003-11-30 8:04 ` Денис Смирнов 2003-11-27 15:52 ` [Comm] DROP vs. REJECT (was: Linux Gate) Andrey Rahmatullin 2003-11-28 8:02 ` [Comm] Re: DROP vs. JECT " Денис Смирнов 2003-11-28 8:14 ` Dmytro O. Redchuk 2003-11-30 14:32 ` [Comm] Re: Linux Gate Maxim Tyurin 2003-11-30 21:46 ` Денис Смирнов 2003-12-01 4:24 ` Gosha 2003-12-01 9:43 ` Denis Smirnov 2003-12-01 11:33 ` Maxim Tyurin 2003-12-01 19:04 ` Денис Смирнов 2003-12-01 19:50 ` Maxim Tyurin 2003-12-02 7:57 ` Денис Смирнов 2003-12-01 7:52 ` Maxim Tyurin 2003-12-01 11:17 ` Денис Смирнов 2003-12-01 18:10 ` Maxim Tyurin
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=3FC47526.1050302@ricom.ru \ --to=samurai@ricom.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