From: Michael Shigorin <mike@osdn.org.ua>
To: community@altlinux.ru
Subject: [Comm] Re: шлюз в корпоротивной сети
Date: Wed, 18 Aug 2004 11:38:07 +0300
Message-ID: <20040818083806.GT20614@osdn.org.ua> (raw)
In-Reply-To: <14511264671.20040818144349@inbox.ru>
[-- Attachment #1.1: Type: text/plain, Size: 951 bytes --]
On Wed, Aug 18, 2004 at 02:43:49PM +0900, Игорь wrote:
> Мне надо срочно настроить шлюз, клиенты windows 2000/XP.
> соединение с провайдерор через VPN.
Постарайтесь как можно оперативнее накатить security updates для
начала, что бы ни устанавливали.
По соединению с ISP -- осмысленно пытать самого ISP, если
контингент на суппорте не в курсе -- требовать дежурного
администратора, если нет -- техдиректора.
По раздаче клиентам -- после подъема соединения с провайдером
сделайте себе NAT (документация гуглится по "rusty three line
masquerading guide"), по вкусу -- proxy (пакет squid); его надо
не забыть НЕ выпускать наружу (см. acl в /etc/squid/squid.conf
и/или файрвол, лучше вместе).
Моя дежурная болванка правил firewall/NAT
(/etc/sysconfig/iptables, соответственно service iptables) --
attached. См. тж. man iptables.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
[-- Attachment #1.2: iptables --]
[-- Type: text/plain, Size: 2006 bytes --]
# Generated by iptables-save v1.2.6a on Thu Nov 21 21:15:39 2002
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -d _REAL_IP -i eth0 -p tcp -m tcp --dport _EXT_PORT -j DNAT --to-destination _INT_HOST:_INT_PORT
-A POSTROUTING -s 10.0.1.0/24 -d ! 10.0.1.0/24 -j SNAT --to-source _REAL_IP
COMMIT
# Completed on Thu Nov 21 21:15:39 2002
# Generated by iptables-save v1.2.6a on Thu Nov 21 21:15:39 2002
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Thu Nov 21 21:15:39 2002
# Generated by iptables-save v1.2.6a on Thu Nov 21 21:15:39 2002
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:eth1-in - [0:0]
:eth1-out - [0:0]
:tcprules - [0:0]
-A INPUT -i eth1 -j eth1-in
-A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
-A INPUT -s 10.0.1.0/24 -d 10.0.1.1 -i eth0 -j ACCEPT
-A INPUT -s 10.0.1.0/24 -d _REAL_IP -i eth0 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 110 -j ACCEPT
-A INPUT -d _REAL_IP -i eth0 -p tcp -m tcp --dport 113 -j REJECT --reject-with tcp-reset
-A INPUT -j tcprules
# block :25 to world (only through 10.0.1.1:25)
-A FORWARD -s 10.0.1.0/24 -p tcp -m tcp --dport 25 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -j tcprules
-A OUTPUT -o eth1 -j eth1-out
-A eth1-in -j RETURN
-A eth1-out -j RETURN
-A tcprules -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A tcprules -i ! eth1 -m state --state NEW -j ACCEPT
-A tcprules -i eth1 -m state --state INVALID,NEW -j DROP
-A tcprules -i eth1 -j REJECT --reject-with icmp-host-unreachable
COMMIT
# Completed on Thu Nov 21 21:15:39 2002
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-08-18 8:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-18 5:43 [Comm] " Игорь
2004-08-18 8:38 ` Michael Shigorin [this message]
2004-08-19 1:07 ` [Comm] " Игорь
2004-08-19 5:41 ` Michael Shigorin
2004-08-19 5:52 ` Mike Lykov
2004-08-19 7:00 ` Nizamov Shavkat
2004-08-19 11:03 ` Michael Shigorin
2004-08-19 7:11 ` Myroslav M Rozum
2004-08-19 7:53 ` [Comm][JT] " Andrey Rahmatullin
2004-08-19 8:42 ` Myroslav M Rozum
2004-08-20 7:31 ` [Comm] " Игорь
2004-08-20 7:36 ` Alexey Morsov
2004-08-20 7:45 ` Re[2]: " Игорь
2004-08-20 19:55 ` Michael Shigorin
2004-08-19 8:04 ` Jury Levykin
2004-08-18 8:40 ` [Comm] " Jury Levykin
2004-08-18 9:00 ` Re[2]: " Игорь
2004-08-18 9:04 ` [Comm] " Michael Shigorin
2004-08-18 9:36 ` [Comm] " Jury Levykin
2004-08-19 0:59 ` Re[2]: " Игорь
2004-08-19 7:38 ` Jury Levykin
2004-08-19 7:42 ` Nizamov Shavkat
2004-08-19 7:45 ` Jury Levykin
2004-08-19 11:15 ` Michael Shigorin
2004-08-19 11:13 ` [Comm] " Michael Shigorin
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=20040818083806.GT20614@osdn.org.ua \
--to=mike@osdn.org.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