ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
* [Sysadmins] Q: IPsec + NAT (или NAT + IPsec)
@ 2006-08-08  9:01 Alexey I. Froloff
  2006-09-12  8:15 ` Alexey I. Froloff
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey I. Froloff @ 2006-08-08  9:01 UTC (permalink / raw)
  To: ALT Linux sysadmin discuss

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Есть примерно такая конфигурация:

10.20.30.40/32 - 1.2.3.4 -(...)- 4.3.2.1 - 4.3.2.10/32

1.2.3.4 и 4.3.2.1 - IPsec шлюзы, 10.20.30.40/32 и 4.3.2.10/32 -
связываемые хосты.

Левая сторона хочет использовать адрес 10.20.30.40/32, праваа
против этого возражает.  Есть свободный адрес 1.2.3.40, можно на
него как-то NAT'ить?  Слева используется OpenS/WAN.

Основная проблема - затащить пакет от 10.20.30.40 к 4.3.2.10 в
ipsec0.  Если тупо зароутить (ip rule, ip route) 4.3.2.10 через
ipsec0 и на нём сделать SNAT (в POSTROUTING) - freeswan подберёт
этот пакет?

-- 
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
  Inform-Mobil, Ltd. System Administrator
       http://www.inform-mobil.ru/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Sysadmins] Q: IPsec + NAT (или NAT + IPsec)
  2006-08-08  9:01 [Sysadmins] Q: IPsec + NAT (или NAT + IPsec) Alexey I. Froloff
@ 2006-09-12  8:15 ` Alexey I. Froloff
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey I. Froloff @ 2006-09-12  8:15 UTC (permalink / raw)
  To: sysadmins

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

* Alexey I. Froloff <raorn@> [060808 13:01]:
> Есть примерно такая конфигурация:

> 10.20.30.40/32 - 1.2.3.4 -(...)- 4.3.2.1 - 4.3.2.10/32

> 1.2.3.4 и 4.3.2.1 - IPsec шлюзы, 10.20.30.40/32 и 4.3.2.10/32 -
> связываемые хосты.

> Левая сторона хочет использовать адрес 10.20.30.40/32, праваа
> против этого возражает.  Есть свободный адрес 1.2.3.40, можно на
> него как-то NAT'ить?  Слева используется OpenS/WAN.

Ну в общем на интерфейсе ipsec+ работает SNAT:

iptables -t nat -A POSTROUTING -o ipsec+ -s 10.20.30.40/32 -d 4.3.2.10/32 -j SNAT --to-source=1.2.3.40

В ipsec.conf:

conn ...
  ...
  leftsubnet=1.2.3.40/32

При этом никаких дополнительных извращений с роутингом не нужно.

-- 
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
  Inform-Mobil, Ltd. System Administrator
       http://www.inform-mobil.ru/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-12  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-08  9:01 [Sysadmins] Q: IPsec + NAT (или NAT + IPsec) Alexey I. Froloff
2006-09-12  8:15 ` Alexey I. Froloff

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git