• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

IPSec mit kvpnc, routet nicht ins vpn

R1YZF

Newbie
hallo,
ich habe den vpn-client kvpnc und auch shrew installiert und jeweils ein vpn zu meiner fritzbox konfiguriert.
Bei beiden steht der Tunnel.
Aber nur mit shrew komme ich per ping ins lokale Netz, würde aber gerne kvpnc verwenden, da er sich besser
in den kde-desktop integriert und komfortabler bedienen lässt. Die Routing Tabelle der beiden clients ist unterschiedlich.
Deshalb vermute ich ein routing-Problem. Gehe bei meinen Versuchen mit einem umts-modem ins netz.

Code:
Routing Tabelle nit shrew:
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
mnhm-590c0daf.p 10.64.64.64     255.255.255.255 UGH   0      0        0 ppp0
192.168.0.0     192.168.0.201   255.255.255.0   UG    0      0        0 tap0
192.168.0.0     *               255.255.255.0   U     0      0        0 tap0
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.64.64.64     0.0.0.0         UG    0      0        0 ppp0

Routing Tabelle mit kvpnc:
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     192.168.0.201   255.255.255.0   UG    0      0        0 ppp0
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.64.64.64     0.0.0.0         UG    0      0        0 ppp0

Wenn mir jemand einen Tipp geben könnte, wie ich kvpnc konfigurieren muss, damit er die routing-tabelle
richtig erstellt, wäre super.
Gruss
 
OP
R

R1YZF

Newbie
Hi,
hier meine config:
Code:
[General Options]
Auto connect profile=
Debug background color=255,255,255
Debug logwindow color=128,128,128
Do auto connect at startup=false
Do kill l2tpd if still running=false
Do kill racoon if still running=false
Do kill xl2tpd if still running=false
Dont quit on CloseEvent=true
Enable FreeSWAN verbose=false
Enable debug Openvpn=false
Enable l2tpd debug=false
Enable openl2tp debug=false
Enable pppd debug=false
Enable pptpd debug=false
Enable xl2tpd debug=false
EnableDebugXl2tpdNetwork=false
EnableDebugXl2tpdpacket=false
EnableDebugXl2tpdstate=false
EnableDebugXl2tpdtunnel=false
Error logwindow color=224,223,222
FeedbackMailSent=false
Hide on startup=false
Hold generated scripts=true
Info logwindow color=0,0,0
Klips Debug=
Kvpnc debuglevel=1
Last Profile=
Log viewer font size=2
Mainwindow height=332
Mainwindow position x=657
Mainwindow position y=110
Mainwindow width=679
Minimize after connect=true
Openvpn debuglevel=1
Openvpn management port=2222
Path to cisco_cert_mgr=/usr/local/bin/cisco_cert_mgr
Path to freeswan=/usr/sbin/ipsec
Path to ifconfig=/sbin/ifconfig
Path to iptables=/sbin/iptables
Path to iputility=/sbin/ip
Path to kill=/bin/kill
Path to kill-all=/usr/bin/killall
Path to ksshaskpass=/usr/bin/ksshaskpass
Path to l2tpd=/usr/sbin/l2tpd
Path to netstat=/bin/netstat
Path to openl2tp=/usr/sbin/openl2tpd
Path to openssl=/usr/bin/openssl
Path to openvpn=/usr/sbin/openvpn
Path to ping=/bin/ping
Path to pkcs11-tool=/usr/bin/pkcs11-tool
Path to pppd=/usr/sbin/pppd
Path to pptp=/usr/sbin/pptp
Path to racoon=/usr/sbin/racoon
Path to racoonctl=/usr/sbin/racoonctl
Path to route=/sbin/route
Path to setkey=/usr/sbin/setkey
Path to ssh=/usr/bin/ssh
Path to ssh-askpass-gnome=/usr/lib/openssh/gnome-ssh-askpass
Path to tail=/usr/bin/tail
Path to vpnc-bin=/usr/sbin/vpnc
Path to vpnclient=/usr/local/bin/vpnclient
Path to vtund=/usr/sbin/vtund
Path to xl2tpd=/usr/sbin/xl2tpd
Pid file for vpnc\s=/var/run/vpnc/pid
Pluto Debug=
Pppd debuglevel=false
Pppd kernel log level=0
Pptp debuglevel=0
Programs in path=true
Racoon debuglevel=info
Remote logwindow color=0,0,255
Show Statusbar=true
Show connection time in Tooltip=true
Show debugconsole=true
Show interface IP in tooltip=true
Ssh debuglevel=1
Success  logwindow color=0,100,0
Try connect timeout=10
Use KWallet=true
Use colorized log output=true
Use silent quit=false
Vpnc debuglevel=0
Write log file=true

[KFileDialog Settings]
Height 768=420
Recent Files[$e]=vpnuser_com.cfg
Width 1366=683

[Notification Messages]
hideOnCloseInfo=false

[Profile_dyndns]
Additional network routes=192.168.0.0/24#192.168.0.201#tap0,/##
Allow empty private key password=false
Allow ip address change of peer=false
AllowEmptyGroupPassword=false
Application version=
AskUserPasswordOnEachConnect=false
Auth method=mschap-v2
Auth type=psk
AuthWithUsernameAndPassword=false
Authentication algorithm=hmac_sha1
Authentication direction=none
Ca certificate=
Cert path=
CiscoNatMode=natt
Command after connect=
Command after connect delay time=3
Command after disconnect=
Command before connect=
Command before disconnect=
Connection check status interval=20
Connection check success count=10
Connection type=racoon
DNS server=
DPD idle timeout=300
Description=Import von /home/com.cfg
Disable CCP=false
Disable LZO compression=false
Disable MPPE compression=false
Disable address control compression=false
Disable data encryption=false
Disable opportunistic encryption=true
Disable protocol field compression=false
DisableBind=false
DisableHeaderCompression=false
DisableIpx=false
DisableMagicNumberNegotiation=false
DisablePushFromServer=false
Do not use no IP by default=false
Do reconnect after connection lost=true
Dont save username=false
Encryption algorithm=aes
Exchange mode=aggressive
Execute command after connect=false
Execute command after disconnect=false
Execute command before connect=false
Execute command before disconnect=false
Fix path mtu discovery problem=true
Fragment=1300
HTTP Proxy Auth pass=
HTTP Proxy Auth user=
HTTP Proxy Authtype=basic
HTTP proxy host=
HTTP proxy port=3128
HTTP proxy timeout=99
Hash algorithm=md5
Hide group password in accountdata dialog=false
IKE group=modp1024
IPSec ESP=3des-md5,3des-sha1,aes128-sha1,aes256-sha1
IPSec IKE=aes
Ipsec vpn mode=tunnel
L2tpDaemon=0
Left next hop=
LeftSourceIp=192.168.0.201
Local ID type=user_fqdn
Local port=500
Local virtual IP=
MRU for pppd=1500
MTU for pppd=1500
MaxConnectTries=3
NS cert type=
NT domain name=
Network device=default
PSK is in file=false
PeerTimeout=60
Perfect forward secrety=modp1024
Ping host IP=
Pkcs11 id=
Pkcs11 id type=
Pkcs11 providers=
Pkcs11 sign mode=
Pkcs11 slot=
Pkcs11 slot type=
Pre shared key=schluessel
Pre shared key file=
Private key=
PrivateKey password=
Reconnect delay=5
Remote ID type=none
Remote net address=192.168.0.0
Remote net mask=24
Remote port=500
Remote virtual IP=
RenegSec=0
Replace default route=true
RequireEap=false
Right next hop=
RightSourceIp=
Save PSK=true
Save private key password=false
Save user password=true
Search domain in resolv conf=
Special local ID=Benutzername
Special remote ID=
Special server certificate=
SshConfigRemoteScript=
TLS auth file=
TLS remote host=
Tunnel device type=tun
TunnelPing=0
TunnelPingRestart=600
Use DPD idle timeout=false
Use HTTP Proxy Authentication=false
Use HTTP proxy=false
Use IKE group=true
Use NS cert type=false
Use NT domain name=false
Use Pkcs11 providers=false
Use TLS auth=false
Use TLS host=false
Use UDP-port=false
Use UDP-protocol=true
Use Xauth interactive=false
Use additional network routes=true
Use advanced settings=false
Use application version=false
Use authentication algorithm=true
Use connection status check=true
Use custom esp=false
Use custom ike=false
Use delay at reconnect=false
Use global IPSec secret=false
Use left next hop=false
Use local port=false
Use mail address as identifier=false
Use mode config=false
Use no BSD compression=false
Use no deflate=false
Use only CA cert and user auth=false
Use own MRU=false
Use own MTU=false
Use perfect Forward Secrety=true
Use redirect gateway=false
Use remote network=true
Use remote port=false
Use right next hop=false
Use search domain in resolv conf=false
Use single DES=false
Use smartcard=false
Use special local ID=true
Use special remote ID=false
Use special server certificate=false
Use userdef packet size=false
Use userdefined port=false
Use userdefinied cipher=false
Use userdefinied packet size for fragmentation=false
Use virtual IP=false
Use virtual subnets=false
UseCiscoCertStore=false
UseLeftSourceIp=true
UseNat=true
UseRenegSec=false
UseRightSourceIp=false
UseSshConfigRemoteScript=false
UseTunnelPing=false
UseTunnelPingRestart=false
User password=
Userdefined port=10000
Userdefinied cipher=
Username=
VPN Gateway=dyndns
VPN ID=
Verify ca cert=true
Virtual IP=
Virtual subnets=
Vtun profile=
do ping ip=false
local UDP port=0
refuse 128 bit encryption=false
refuse 40 bit encryption=false
require mppe=true
require stateless encryption=false
use DNS-server=false
use DNS_UPDATE=true
x509 certificate=

Das angegeben device tap0 wird nicht erstellt:
Additional network routes=192.168.0.0/24#192.168.0.201#tap0,/##

Auch hab ich in /root/.kde4/share/apps/kvpnc scripte gefunden, welche die routing Tabelle aendern.
Aber ich glaube, sie werden nicht ausgeführt.
Dieses z.B:
#!/bin/bash
/sbin/route add -net 192.168.0.0/24 gateway 192.168.0.201 tap0
/sbin/route add -net /

Bei mir erscheint in der routing-tabelle nur das ppp0 device.
Ich schau mir noch die logs an, vielleicht steht dort was weiter hilft.
 

spoensche

Moderator
Teammitglied
R1YZF schrieb:
Das angegeben device tap0 wird nicht erstellt:
Additional network routes=192.168.0.0/24#192.168.0.201#tap0,/##

tap0 wird nicht erstellt, weil der Eintrag nur eine zusätzliche Route anlegt und voraussetzt, dass das Interface existiert und eine IP hat.

Die Route macht nur dann Sinn, wenn dein Rechner als Router arbeitet, also selber das Gateway in das Netz 192.168.0.0/24 ist, was aber nicht der Fall ist.
Bei Shrew funktioniert das nur, weil die richtige Route nach 192.168.0.0/24 über irgendein Gateway (0.0.0.0) vorhanden ist.

Poste mal bitte die Ausgabe von
Code:
ip link show
 
OP
R

R1YZF

Newbie
Hallo,
hier die Ausgabe:
Code:
Nur UMTS-Verbindung:
probook:~> ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:24:d6:60:44:14 brd ff:ff:ff:ff:ff:ff
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
4: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 

Nach Tunnelaufbau mit shrew:
probook:~> ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:24:d6:60:44:14 brd ff:ff:ff:ff:ff:ff
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
4: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
5: tap0: <BROADCAST,UP,LOWER_UP> mtu 1380 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether 16:77:4b:89:2d:77 brd ff:ff:ff:ff:ff:ff

Nach Tunnelaufbau mit kvpnc:
probook:~> ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:24:d6:60:44:14 brd ff:ff:ff:ff:ff:ff
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
4: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp

Das Device tap0 ist nicht vorhanden. Bei Shrew wird das automatisch erstellt. Muss ich also bei kvpnc in der
Konfiguration angeben, das tap0 anzulegen ist und die richtige route setzen?
 
Oben