ich habe mir heute doch mal Zeit genommen um mein Wlan mit openswan abzusichern. Nur leider ist es nicht sicher geworden - den Ärger hatte ich schon fast befürchtet. Daher wollte ich es erst mit ssh versuchen, wie ich in einem anderen Beitrag geschrieben hatte.
Es geht um folgende Konfiguration.
Server:
Router ins Internet
mit zwei Ethernet-Interfaces
läuft unter SuSE 9.2
Client:
Notebook mit Debian Sarge
nur ein PCMCIA-Slot mit Wlan-Karte
Ich will nun über Wlan mit meinem Notebook ins Internet und auch auf den Server zugreifen z.B. mit ssh und shfs. Dabei möchte ich alles über ein verschlüsseltes VPN senden.
Also habe ich unter beiden Systemen openswan eingerichtet.
Server
Code: Alles auswählen
# /etc/ipsec.conf - Openswan IPsec configuration file
# RCSID $Id: ipsec.conf.in,v 1.13 2004/03/24 04:14:39 ken Exp $
# This file: /usr/share/doc/packages/openswan/ipsec.conf-sample
#
# Manual: ipsec.conf.5
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
# Debug-logging controls: "none" for (almost) none, "all" for lots.
#klipsdebug=all
#plutodebug="control parsing"
#plutodebug=all
# Certificate Revocation List handling
#crlcheckinterval=600
#strictcrlpolicy=yes
# Change rp_filter setting, default = 0 (switch off)
#rp_filter=%unchanged
# Switch on NAT-Traversal (if patch is installed)
#nat_traversal=yes
# default settings for connections
conn %default
# Default: %forever (try forever)
#keyingtries=3
# Sig keys (default: %dnsondemand)
leftrsasigkey=%cert
rightrsasigkey=%cert
# Lifetimes, defaults are 1h/8hrs
#ikelifetime=20m
#keylife=1h
#rekeymargin=8m
# Add connections here
conn wlan
left=192.168.0.13
leftid=@nightwish.zuhause.de
leftrsasigkey=0sAQN.................
leftnexthop=%defaultroute
right=192.168.0.11
rightsubnet=192.168.0.0/24
rightid=@linux.zuhause.de
rightrsasigkey=0sAQ...............
rightnexthop=%defaultroute auto=add
# sample VPN connection
#sample# conn sample
#sample# # Left security gateway, subnet behind it, next hop toward right.
#sample# left=10.0.0.1
#sample# leftsubnet=172.16.0.0/24
#sample# leftnexthop=10.22.33.44
#sample# # Right security gateway, subnet behind it, next hop toward left.
#sample# right=10.12.12.1
#sample# rightsubnet=192.168.0.0/24#sample# rightnexthop=10.101.102.103
#sample# # To authorize this connection, but not actually start it, at startup,
#sample# # uncomment this.
#sample# #auto=start
#Disable Opportunistic Encryption
include /etc/ipsec.d/examples/no_oe.conf
Code: Alles auswählen
# /etc/ipsec.conf - Openswan IPsec configuration file
# RCSID $Id: ipsec.conf.in,v 1.13 2004/03/24 04:14:39 ken Exp $
# This file: /usr/share/doc/openswan/ipsec.conf-sample
#
# Manual: ipsec.conf.5
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
# Debug-logging controls: "none" for (almost) none, "all" for lots.
# klipsdebug=none
# plutodebug="control parsing"
# Add connections here
conn wlan
left=192.168.0.13
leftid=@nightwish.zuhause.de
leftrsasigkey=0sAQ..........
leftnexthop=%defaultroute
right=192.168.0.11
rightsubnet=192.168.0.0/24
rightid=@linux.zuhause.de
rightrsasigkey=0sAQ...........
rightnexthop=%defaultroute
auto=add
# sample VPN connection
#sample# conn sample
#sample# # Left security gateway, subnet behind it, next hop toward right.
#sample# left=10.0.0.1
#sample# leftsubnet=172.16.0.0/24
#sample# leftnexthop=10.22.33.44
#sample# # Right security gateway, subnet behind it, next hop toward left.
#sample# right=10.12.12.1
#sample# rightsubnet=192.168.0.0/24
#sample# rightnexthop=10.101.102.103
#sample# # To authorize this connection, but not actually start it, at startup,
#sample# # uncomment this.
#sample# #auto=start
#Disable Opportunistic Encryption
include /etc/ipsec.d/examples/no_oe.conf
Code: Alles auswählen
104 "wlan" #8: STATE_MAIN-I1: initiate
106 "wlan" #8: STATE_MAIN-I2: sent MI2, expecting MR2
108 "wlan" #8: STATE_MAIN-I3: sent MI3, expecting MR3
004 "wlan" #8: STATE_MAIN-I4: ISAKMP SA established
112 "wlan" #9: STATE_QUICK_I1: initiate
004 "wlan" #9: STATE_QUICK_I2: sent Q12, IPsec SA established {ESP=>0x8aa2cfac < 0x995528af}
Dann habe ich mit Kismet mein eigenes Netzwerk abgehört und in der Dumpdatei ist der HTML-Code von http://www.pro-linux.de ohne Probleme zu lesen. Also keine Verschlüsselung.
ipsec auto --status sag:
Code: Alles auswählen
000 interface lo/lo 127.0.0.1
000 interface eth0/eth0 192.168.0.13
000 %myid = (none)
000 debug none
000
000 algorithm ESP encrypt: id=2, name=ESP_DES, ivlen=8, keysizemin=64, keysizemax=64
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=8, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=7, name=ESP_BLOWFISH, ivlen=8, keysizemin=40, keysizemax=448
000 algorithm ESP encrypt: id=11, name=ESP_NULL, ivlen=0, keysizemin=0, keysizemax=0
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=252, name=ESP_SERPENT, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=253, name=ESP_TWOFISH, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=5, name=AUTH_ALGORITHM_HMAC_SHA2_256, keysizemin=256, keysizemax=256
000 algorithm ESP auth attr: id=251, name=(null), keysizemin=0, keysizemax=0
000
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, keydeflen=192
000 algorithm IKE hash: id=2, name=OAKLEY_SHA, hashsize=20
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024, bits=1024
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536, bits=1536
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048, bits=2048
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072, bits=3072
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096, bits=4096
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144, bits=6144
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192, bits=8192
000
000 stats db_ops.c: {curr_cnt, total_cnt, maxsz} :context={0,18,36} trans={0,18,336} attrs={0,18,224}
000
000 "wlan": 192.168.0.13[@nightwish.zuhause.de]...192.168.0.11---192.168.0.11[@linux.zuhause.de]===192.168.0.0/24; erouted; eroute owner: #9
000 "wlan": ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0
000 "wlan": policy: RSASIG+ENCRYPT+TUNNEL+PFS+UP; prio: 32,24; interface: eth0;
000 "wlan": newest ISAKMP SA: #8; newest IPsec SA: #9;
000 "wlan": IKE algorithms wanted: 5_000-1-5, 5_000-1-2, 5_000-2-5, 5_000-2-2, flags=-strict
000 "wlan": IKE algorithms found: 5_192-1_128-5, 5_192-1_128-2, 5_192-2_160-5, 5_192-2_160-2,
000 "wlan": IKE algorithm newest: 3DES_CBC_192-MD5-MODP1536
000 "wlan": ESP algorithms wanted: 3_000-1, 3_000-2, flags=-strict
000 "wlan": ESP algorithms loaded: 3_000-1, 3_000-2, flags=-strict
000 "wlan": ESP algorithm newest: 3DES_0-HMAC_MD5; pfsgroup=<Phase1>
000
000 #9: "wlan" STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 27503s; newest IPSEC; eroute owner
000 #9: "wlan" esp.8aa2cfac@192.168.0.11 esp.995528af@192.168.0.13 tun.0@192.168.0.11 tun.0@192.168.0.13
000 #8: "wlan" STATE_MAIN_I4 (ISAKMP SA established); EVENT_SA_REPLACE in 2546s; newest ISAKMP
000
Gruss
E. coli