From: Kostarev Alexey <kaf@nevod.ru> To: ALT Linux Community <community@lists.altlinux.org> Subject: [Comm] Вопрос по роутингу пакетов в контейнер Date: Wed, 19 Dec 2007 19:50:13 +0500 Message-ID: <47692FA5.3000705@nevod.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 2337 bytes --] На машине организован контейнер, имеющий интерфейс venet0 с адресом 172.16.0.102 На физическом сервере поднят адрес 192.168.0.254 связанный с 172.16.0.2: # ip addr 2: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 4: bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:1c:c4:a8:53:b0 brd ff:ff:ff:ff:ff:ff inet 192.168.0.253/24 brd 192.168.0.255 scope global bond0 inet 192.168.0.254/32 scope global bond0 6: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:1c:c4:a8:53:a0 brd ff:ff:ff:ff:ff:ff ... 1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue link/void ... #ip route 172.16.0.102 dev venet0 scope link ... 192.168.0.0/24 dev bond0 proto kernel scope link src 192.168.0.253 default via 192.168.0.252 dev bond0 #iptables -L -t nat -nvx Chain PREROUTING (policy ACCEPT 55706 packets, 6133124 bytes) pkts bytes target prot opt in out source destination 324 16604 DNAT 0 -- * * 0.0.0.0/0 192.168.0.254 to:172.16.0.102 Chain POSTROUTING (policy ACCEPT 23737 packets, 1750467 bytes) pkts bytes target prot opt in out source destination 408 21401 SNAT 0 -- * * 172.16.0.0/16 0.0.0.0/0 to:192.168.0.254 Chain OUTPUT (policy ACCEPT 16307 packets, 1504056 bytes) pkts bytes target prot opt in out source destination Все пакеты, приходящие из сети на 192.168.0.254 перенаправляются в контейнер на адрес 172.16.0.102 и соответсвенно все пакеты, исходящие с 172.16.0.102 уходят в сеть от адреса 192.168.0.254 Все нормально. Но стоит мне с физического севрера обратиться по адресу 192.168.0.254 (второй внешний адрес на bond0) пакеты идут с адреса 192.168.0.254 на адрес 192.168.0.254 по локальному интерфейсу lo не заходя в цепочки PREROUTING и POSTROUTING и соответсвенно не перенаправляясь на адрес 172.16.0.102 Почему? По lo должны ходить только пакеты 127.0.0.1 Каким мне образом заставить такие пакеты пройти цепочки PREROUTING и POSTROUTING? -- С Уважением Директор ООО НЕВОД Костарев А.Ф. [-- Attachment #2: kaf.vcf --] [-- Type: text/x-vcard, Size: 202 bytes --] begin:vcard fn:Alexey Kostarev n:Kostarev;Alexey org:Nevod Ltd. adr:;;;Perm;;;Russia email;internet:kaf@nevod.ru tel;work:(3422) 196-960 url:http://www.nevod.ru/nevod/staff/kaf/ version:2.1 end:vcard
next reply other threads:[~2007-12-19 14:50 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-12-19 14:50 Kostarev Alexey [this message] 2007-12-20 7:44 ` Kostarev Alexey
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=47692FA5.3000705@nevod.ru \ --to=kaf@nevod.ru \ --cc=community@lists.altlinux.org \ /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