ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: CyberSkunk <cyberskunk@gmail.com>
To: community@altlinux.ru
Subject: Re[4]: [Comm]routing problems, iptables?
Date: Thu, 13 Oct 2005 14:47:34 +0400
Message-ID: <1144522131.20051013144734@gmail.com> (raw)
In-Reply-To: <105571641.20051013143014@maximagroup.ru>

Hello Наумкин,

Thursday, October 13, 2005, 2:30:14 PM, you wrote:

> Здравствуйте, CyberSkunk.

>> Есть провайдер. Инет через адсл-модем.
>> Есть IP адрес(IP_ADDR1).
>> Есть второй IP от того же провайдера(IP_ADDR2).
>> Хочется сделать DNAT на машину из локальной сети(LAN_IP)на машине
>> с IP_ADDR1 типа

>> iptables -t nat -A PREROUTING -d IP_ADDR2 -j DNAT --to-destinnation LAN_IP

>> чтобы при коннекте из инета на IP_ADDR2 пакеты порекидывались в локалку
>> на LAN_IP машиной с IP_ADDR1.
>> Не работает.
>> Откуда могут ноги расти? Как можно эти ноги поискать?

>> -- 
>> Best regards,
>>  CyberSkunk                          mailto:cyberskunk@gmail.com

>> _______________________________________________
>> Community mailing list
>> Community@altlinux.ru
>> https://lists.altlinux.ru/mailman/listinfo/community

>> Ну вопервых обратный трафик надо выпустит (выполнять SNAT)
> А разве DNAT не делает обратную замену адреса? Впрочем, это не важно,
> я пробовал и нечто вроде
>  iptables -t nat -A POSTROUTING -s ! LAN_IP -j SNAT --to-source\
>  IP_ADDR_1
>  iptables -t nat -A POSTROUTING -s LAN_IP -j SNAT --to-source\
>  IP_ADDR2
>> во вторых форвардинг пакетов разрешить
> А я из этой локалки, так что если бы бы его не было, я бы не смог
> письма послать:)
>> в третьих в таблице filter указать соответствующие правила для
>> транзитных пакетов( цепочка FORWARD)
> Есть такое дело.

> Но все равно не пашет.

> -- 
> Best regards,
>  CyberSkunk                            mailto:cyberskunk@gmail.com

> _______________________________________________
> Community mailing list
> Community@altlinux.ru
> https://lists.altlinux.ru/mailman/listinfo/community

> InetIP -Реальный адрес машины в инете
> SrvIP  -IP адрес машины в сети на которую осуществляется маршрутизация
echo "1" >> /proc/sys/net/ipv4/ip_forward включаем
echo "1" >> форвардинг пакетов ядре
это понятно
> iptables -t nat -A POSTROUTING -s 0/0 -j SNAT --to-source IP_ADDR_1 SrvIP
не совсем понял что при этом происходит,
но выяснил такую штуку:
если запустить на хосте, который проводит маршрутизацию
tcpdump -i eth0 dst IP_ADDR2
и попробовать с удаленной машины пингануть IP_ADDR2, то я вижу
14:34:50.899457 arp who-has IP_ADDR2 tell IP_PROV_GW
где IP_PROV_GW - адрес провайдеровского гейтвея. Что с этим можно
сделать?
-- 
Best regards,
 CyberSkunk                            mailto:cyberskunk@gmail.com



  reply	other threads:[~2005-10-13 10:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 14:47 CyberSkunk
2005-10-12 15:29 ` Наумкин Сергей
2005-10-13 10:23   ` Re[2]: " CyberSkunk
2005-10-13 10:30     ` Re[3]: " Наумкин Сергей
2005-10-13 10:47       ` CyberSkunk [this message]
2005-10-13 13:17       ` Re[5]: [Comm]routing problems, iptables? - SOLUTION? CyberSkunk
2005-10-13 11:05     ` Re[2]: [Comm]routing problems, iptables? Alexander Volkov
2005-10-13 18:55   ` [Comm][JT]routing " Metalking
2005-10-13 19:17     ` [Comm] Re: [JT]routing " 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=1144522131.20051013144734@gmail.com \
    --to=cyberskunk@gmail.com \
    --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