From: AVL <info@atmsk.ru> To: м-р <mandrake-russian@altlinux.ru>, сизиф <sisyphus@altlinux.ru> Cc: м-р <mandrake-russian@altlinux.ru> Subject: [mdk-re] ядро 2.2.х и SNAT или знатоки комманды IP (iproute2) wanted Date: Sun Oct 21 17:13:14 2001 Message-ID: <20011021171422.67cb39de.info@atmsk.ru> (raw) После прочтения документации к iproute2 от Алексея Кузнецова возникла уверенность, что под ядром 2.2 возможен source nat то есть подстановка пакету в поле from другого адреса. Поставленная задача на самом деле еще проще: есть шлюз. при этом на интерфейсе смотрящем в интернет стоит адрес 192.168.х.х то есть fake при этом все клиенты и интерфейс на шлюзе смотрящий на них имеют нормальные ip адреса. таким образом при ping с клиента tcpdump показывает в пакетах уходящих в интернет в поле from адрес клиента (реальный адрес) и соответственно все работает. при ping с самого шлюза tcpdump показывает в пакетах уходящих в интернет в поле from адрес интерфейса в интернет этого шлюза (fake адрес) и соответственно ничего не работает. поскольку ntpd работает именно на этом шлюзе, то естесственно все его попытки синхры с зеноном заканчиваются ничем (ответа от зенона нет и быть не может, а с любого клиента в локалке все на ура ). задача: сделать так чтобы в поле from пакетов, сгенерированных ntpd и уходящих с шлюза, в поле from был именно реальный адрес (например, адрес того интерфеса, что с того же шлюза смотрит внутрь, в локалку). то есть нат даже не нужен. простой ip-спуфинг. до чего я додумался с подсказок из документации к iproute2. 1) маркирую пакеты - кандидаты на подстановку другого адреса в поле from ipchains -A input -s localhost -d ntp0.zenon.net -m 45 2) определяю подстановку реального ip и таблицу route правил для этих пакетов. ip rule add prio 320 fwmark 45 nat 213.147.42.65 table usertest 3) обратный нат и роутинг для этих пакетов ip route add nat 213.147.42.65 via 127.0.0.1 table usertest чено я еще не понимаю? и почему все это категорически не работает, даже не заводится.
next reply other threads:[~2001-10-21 17:13 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-21 17:13 AVL [this message] 2001-10-22 18:58 ` [mdk-re] " Alexander Bokovoy
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=20011021171422.67cb39de.info@atmsk.ru \ --to=info@atmsk.ru \ --cc=mandrake-russian@altlinux.ru \ --cc=sisyphus@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