Hallo Liste,
Ich habe mir eine Testumgebung aufgebaut die so aussieht
---------------------------
| LAN 192.168.1.0/24 |
---------------------------
|
--------------------
| 192.168.1.2 |
| Router1 DMZ |
| 192.168.100.5 |
--------------------
|
--------------------
| 192.168.100.5 |
| VPN Server |
| 195.212.47.60 |
--------------------
|
--------------------
| 195.212.47.58 |
| Router2 |
| 195.212.48.1 |
--------------------
|
----------------------
| 195.212.48.2 (eth1) |
| Router3 mit NAT |
| 192.168.199.1 |
----------------------
|
-------------------
| 192.168.199.104 |
| VPN Client |
-------------------
Der VPN Server und der VPN Client sind jeweils ein Debian Sarge System mit
Kernel: 2.4.27-1-686
openswan 2.2.0-4
openswan-modules-2.4.27-1-686 2.2.0-4+2.4.27-6
Wenn ich den Tunnel vom VPN Client zum VPN Server aufbaue, ohne NAT,
funktioniert alles wunderbar. Es lassen sich Daten �bertragen (ping
192.168.1.11). Der Ping geht duch den Tunnel ich habe es mit tcpdump ger�ft am
VPN Server
-------------
tcpdump -i ipsec0 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ipsec0, link-type EN10MB (Ethernet), capture size 96 bytes
16:32:08.224537 IP 192.168.199.104 > 192.168.1.11: icmp 64: echo request seq 1
16:32:08.225077 IP 192.168.1.11 > 192.168.199.104: icmp 64: echo reply seq 1
-------------
Nur wenn ich das NAT auf Router3 aktiviere l�sst sich der Tunnel aufbauen,
aber es werden keine Daten �bertragen (kein ping 192.168.1.11 m�glich)
Ich habe diesbez�glich auch schon Google gequ�lt nur leider nichts gefunden
(eventuell habe ich falsch gesucht)
Ich hoffe das ihr mir weiterhelfen k�nnt.
Hier noch weitere Details
Am NAT Router3 habe ich das NAT aktiviert:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Es sind keine weiteren FW-Regeln auf den Routern aktive!
VPN aufbau vom Client:
ipsec auto --verbose --up linuxn
002 "linuxn" #6: initiating Main Mode
104 "linuxn" #6: STATE_MAIN_I1: initiate
003 "linuxn" #6: received Vendor ID payload [Dead Peer Detection]
003 "linuxn" #6: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03]
002 "linuxn" #6: enabling possible NAT-traversal with method RFC XXXX
(NAT-Traversal)
002 "linuxn" #6: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
106 "linuxn" #6: STATE_MAIN_I2: sent MI2, expecting MR2
003 "linuxn" #6: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03:
i am NATed
002 "linuxn" #6: I am sending my cert
002 "linuxn" #6: I am sending a certificate request
002 "linuxn" #6: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
108 "linuxn" #6: STATE_MAIN_I3: sent MI3, expecting MR3
002 "linuxn" #6: Peer ID is ID_DER_ASN1_DN: 'C=AT, ST=Austria, L=Hart,
O=KNAPP, CN=vpn-server, [EMAIL PROTECTED]'
002 "linuxn" #6: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4
002 "linuxn" #6: ISAKMP SA established
004 "linuxn" #6: STATE_MAIN_I4: ISAKMP SA established
002 "linuxn" #7: initiating Quick Mode RSASIG+ENCRYPT+COMPRESS+TUNNEL+PFS+UP
{using isakmp#6}
112 "linuxn" #7: STATE_QUICK_I1: initiate
002 "linuxn" #7: Dead Peer Detection (RFC 3706) enabled
002 "linuxn" #7: transition from state STATE_QUICK_I1 to state STATE_QUICK_I2
002 "linuxn" #7: sent QI2, IPsec SA established {ESP=>0xc7137932 <0x8cddcdeb
IPCOMP=>0x000045db <0x00003a5a NATOA=0.0.0.0}
004 "linuxn" #7: STATE_QUICK_I2: sent QI2, IPsec SA established
{ESP=>0xc7137932 <0x8cddcdeb IPCOMP=>0x000045db <0x00003a5a NATOA=0.0.0.0}
Das NAT-T wurde erkannt und der Tunnel ist UP.
ipsec.conf VPN Server
----------snip------------
version 2.0
config setup
interfaces="ipsec0=eth1"
# Debug-logging controls: "none" for (almost) none, "all" for lots.
# klipsdebug=none
# plutodebug="control parsing"
#klipsdebug=all
klipsdebug=none
#plutodebug=all
plutodebug="control"
#
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:!192.168.1.0/24,
%v4:!192.168.100.0/24
crlcheckinterval=600
strictcrlpolicy=yes
conn linuxn
authby=rsasig
keyingtries=1
compress=yes
dpddelay=120
dpdtimeout=370
dpdaction=clear
#
left=195.212.47.60
leftnexthop=195.212.47.58
leftsubnet=192.168.1.0/24
leftcert=vpn-server-cert.pem
leftrsasigkey=%cert
leftid="/C=AT/ST=Austria/L=Hart/O=KNAPP/CN=vpn-server/[EMAIL PROTECTED]"
#
right=%any
rightrsasigkey=%cert
rightsubnet=vhost:%no,%priv
auto=add
----------snip------------
ipsec.conf VPN Client
----------snip------------
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
interfaces="%defaultroute"
# Debug-logging controls: "none" for (almost) none, "all" for lots.
# klipsdebug=none
# plutodebug="control parsing"
klipsdebug=none
plutodebug="control"
#
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:!192.168.1.0/24,
%v4:!192.168.100.0/24
crlcheckinterval=600
strictcrlpolicy=yes
authby=rsasig
keyingtries=0
compress=yes
dpddelay=120
dpdtimeout=370
dpdaction=clear
#
left=195.212.47.60
leftnexthop=195.212.47.59
leftsubnet=192.168.1.0/24
#leftcert=vpn-server-cert.pem
leftrsasigkey=%cert
leftid="/C=AT/ST=Austria/L=Hart/O=KNAPP/CN=vpn-server/[EMAIL PROTECTED]"
#
right=%defaultroute
rightcert=vpn-client-cert.pem
rightrsasigkey=%cert
#rightsubnet=vhost:%no,%priv
rightid="/C=AT/ST=Austria/L=Hart/O=KNAPP/CN=vpn-client/[EMAIL PROTECTED]"
auto=add
----------snip------------
Danke f�r eure hilfe.
Franz Pammer