From: "Nick S. Grechukh" <ngrechukh@ua.fm> To: community@altlinux.ru Subject: Re: [Comm] хитрый нат Date: Tue, 31 Aug 2004 17:13:47 +0300 Message-ID: <200408311713.54544.ngrechukh@ua.fm> (raw) In-Reply-To: <464429148.20040831180138@inbox.ru> [-- Attachment #1: Type: text/plain, Size: 2105 bytes --] В сообщении от Вторник 31 Август 2004 17:01 Michael Varamashvili написал(a): > Hу здpаcте community, > > надо сделать вот что: > > есть интерфейс eth1, он смотрит в инет, у него реальный ip, есть > внутреннея сетка 10.33.20.0/24. У прова есть своя внутренняя сетка, > 10.0.0.0/8. Как сделать так, что бы если ломимся в инет, то уж в инет, а > если нет, то в сетку? Я так понял, что просто ip подменять не надо. Сделал > так: > [root@router rc.d]# route > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface 195.49.232.208 * 255.255.255.252 U 0 0 > 0 eth1 10.33.20.0 * 255.255.255.0 U 0 0 > 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 > 0 lo default 195.49.232.209 0.0.0.0 UG 0 0 > 0 eth1 > > 195.49.232.209 - гейт который мне сказали. > > eth1 Link encap:Ethernet HWaddr 4C:00:10:38:44:AA > inet addr:195.49.232.210 Bcast:195.49.232.211 > Mask:255.255.255.252 > > iptables -t nat -A POSTROUTING -o eth1 --dst ! 10.0.0.0/8 -j SNAT > --to-source 195.49.232.210 > > инет ходит, а внутреннея сетка нет. я понимаю, что что-то с натом, но не > понимаю что... O:) ну здрасьте. проверьте, оно и без ната не работает (в смысле с машины гейта). потому что между вашей сеткой (которая действительно является подсетью 10.0.0.0) и провайдерской стоит интерфей с реальным адресом. а все потому что: интерфейс 195.49.232.210 не входит в сетку 10.0.0.0. следовательно пакеты кидаются на гейтвэй. а поскольку он не указан, то идет все на default gw, который в серую сеть уже не пускает. (я так подозреваю что в сетку прова вы не вломитесь, независимо от ваших внутренних серых адресов, просто потому что _ваш_ шлюз имеет белый адрес и находится "в интернете". со всеми вытекающими.) -- Regards, Nick S. Grechukh NSG1-UANIC network administrator at many places :-) === ALT Linux fortune: ======================== > ... но на самом деле хочется БАСОВ =))) Тогда нужны КОЛОНКИ :)) -- mike in community@ [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-08-31 14:13 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-31 14:01 Michael Varamashvili 2004-08-31 14:07 ` Alexandr Leutin 2004-08-31 14:21 ` Re[2]: " Michael Varamashvili 2004-08-31 14:13 ` Nick S. Grechukh [this message] 2004-08-31 14:23 ` Michael Varamashvili 2004-08-31 15:50 ` Nick S. Grechukh
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=200408311713.54544.ngrechukh@ua.fm \ --to=ngrechukh@ua.fm \ --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