Re: WLAN absichern (long)
* Patrick Preuster <sica@megami.de>, 2004-06-06 13:29 +0200:
> Andre Berger wrote:
[...]
> ich habe hier das gleiche Setup wie du und ich benutze dafür OpenVPN,
> das läuft auf allen angesprochenen Betriebssystemen (auf Windows tut das
> im Gegensatz zu IPSEC sogar sehr schön als Service) ohne Probleme. Ein
> Kernelpatch ist wohl auch nicht nötig, das einzige was passieren kann
> ist, dass du den Kernel neu kompilieren musst, da du den TUN/TAP Treiber
> brauchst. Alles weitere findest du auf der OpenVPN Homepage, die Sven ja
> schon genannt hat.
Hallo Sven und Patrick,
danke fuer die sehr vielversprechende Rueckmeldung (besonders auch
die Links)! Hab mir openvpn von backports.org installiert sowie unter
MacOS X die entspr. .kext installiert und openvpn (ohne lzo)
kompiliert und versucht, es 'nach Bert seiner Anleitung' zu
konfigurieren. Allerdings verstehe ich das Konzept noch nicht so
ganz.
192.168.6.7 hvk-vpn macosx
192.168.6.9 benroth-vpn router woody
hvk-vpn:
# ls -l /usr/local/etc/openvpn
total 24
-rw-r--r-- 1 root andreber 181 6 Jun 15:06 tunnel1.conf
-rw------- 1 root andreber 636 6 Jun 14:51 tunnel1.key
-rwxr-xr-x 1 root andreber 58 6 Jun 15:11 tunnel1.up
# cat /usr/local/etc/openvpn/tunnel1.conf
remote hvk-vpn
float
port 4999
dev tun
ifconfig 192.168.6.7 192.168.6.9
persist-tun
#comp-lzo
ping 30
up /usr/local/etc/openvpn/tunnel1.up
secret /usr/local/etc/openvpn/tunnel1.key
# cat /usr/local/etc/openvpn/tunnel1.up
#!/bin/bash
#BSD-Syntax!
route add -net 192.168.6.7 $5 255.255.255.0
auf benroth-vpn, meinem Router:
# ls -l /etc/openvpn
total 16
-rw-r--r-- 1 root root 165 Jun 6 15:15 tunnel1.conf
-rw------- 1 root root 636 Jun 6 13:49 tunnel1.key
-rwxr-xr-x 1 root root 68 Jun 6 13:55 tunnel1.up
# cat /etc/openvpn/tunnel1.conf
remote benroth-vpn
float
port 4999
dev tun
ifconfig 192.168.6.9 192.168.6.7
persist-tun
#comp-lzo
ping 30
up /etc/openvpn/tunnel1.up
secret /etc/openvpn/tunnel1.key
# cat /etc/openvpn/tunnel1.up
#!/bin/bash
route add -net 192.168.6.9 netmask 255.255.255.0 gw $5
Die Datei tunnel1.key ist jeweils identisch.
Dabei bekomme ich bei /etc/init.d/openvpn start den syslog-Eintrag
(sorry fuer die langen Zeilen):
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: OpenVPN 1.6.0 i386-pc-linux-gnu [SSL] [LZO] [PTHREAD] built on May 31 2004
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: WARNING: --remote address [192.168.6.9] conflicts with --ifconfig address pair [192.168.6.9, 192.168.6.7]
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: WARNING: potential conflict between --remote address [192.168.6.9] and --ifconfig address pair [192.168.6.9, 192.168.6.7] -- this is a warning only that is triggered when local/remote addresses exist within the same /24 subnet as --ifconfig endpoints
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: TUN/TAP device tun0 opened
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: /sbin/ifconfig tun0 192.168.6.9 pointopoint 192.168.6.7 mtu 1256
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: /etc/openvpn/tunnel1.up tun0 1256 1300 192.168.6.9 192.168.6.7 init
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: script failed: shell command exited with error status: 4
Jun 6 15:39:59 benroth ovpn-tunnel1[1031]: Exiting
Irgend etwas mache ich ganz falsch, muss man generell weitere
IP-Adressen vergeben oder habe ich da einen "Dreher" in remote und
local? Und, ganz platt gefragt, wie stelle ich denn sicher, dass der
Tunnel immer benutzt wird?
-Andre
Reply to: