OpenVPN Server - Rounting falsch: Kein Internet

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
raws18
Beiträge: 2
Registriert: 08.07.2011 17:04:44

OpenVPN Server - Rounting falsch: Kein Internet

Beitrag von raws18 » 08.07.2011 17:21:23

Guten Tag,

dieses Forum hat mir bis jetzt schon sehr beim einrichten meines VSevers geholfen doch nun brauch ich einmal "direkte" Hilfe :)

Ich habe vor einem halben Jahr bereits einen OpenVPN Server ans Laufen gebracht, nun habe ich allerdings nur noch die Zertifikate, Firewalleinstellungen und Server.conf zur Verfügung.

Die Client.conf macht mir Probleme. Es lief wie bereits gesagt schon einmal, jedoch mit einer anderen Client.conf..

Server.conf

Code: Alles auswählen

port 1120
local SERVERIP
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
server 10.10.10.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
comp-lzo
user nobody
group users
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 4
mute 10
client-to-client
Firewall(iptables): venet0=eth0

Code: Alles auswählen

    iptables -A INPUT -p tcp --dport 1120 -j ACCEPT
    iptables -A INPUT -i tun+ -j ACCEPT
    iptables -A OUTPUT -o tun+  -j ACCEPT
    iptables -A FORWARD -i tun+ -j ACCEPT
    iptables -A FORWARD -o tun+ -j ACCEPT
    iptables -t nat -A POSTROUTING -o venet0 -s 10.10.10.0/24 -j SNAT --to SEVERIP
Client.conf, welche Ärger macht:

Code: Alles auswählen

client
dev tun
port 1120
proto tcp
remote SERVERIP
ca /home/georg/vpn/key/ca.crt
cert /home/georg/vpn/key/client.crt
key /home/georg/vpn/key/client.key
nobind
persist-tun
persist-key
verb 4
Das Routing schlägt fehl, er verbindet sich zwar, dann bekomme ich aber keine Verbindung zum Internet.

Fehlermeldung auf der Client Konsole: (192.168.178.2 ist mein lokales Gateway)

Code: Alles auswählen

Fri Jul  8 17:12:33 2011 us=478861 SENT CONTROL [froxlor]: 'PUSH_REQUEST' (status=1)
Fri Jul  8 17:12:33 2011 us=784791 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 8.8.8.8,route 10.10.10.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.10.10.6 10.10.10.5'
Fri Jul  8 17:12:33 2011 us=785035 OPTIONS IMPORT: timers and/or timeouts modified
Fri Jul  8 17:12:33 2011 us=785070 OPTIONS IMPORT: --ifconfig/up options modified
Fri Jul  8 17:12:33 2011 us=785095 OPTIONS IMPORT: route options modified
Fri Jul  8 17:12:33 2011 us=785119 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Jul  8 17:12:33 2011 us=785521 ROUTE default_gateway=192.168.178.2
Fri Jul  8 17:12:33 2011 us=795104 TUN/TAP device tun0 opened
Fri Jul  8 17:12:33 2011 us=795161 TUN/TAP TX queue length set to 100
Fri Jul  8 17:12:33 2011 us=795227 /sbin/ifconfig tun0 10.10.10.6 pointopoint 10.10.10.5 mtu 1500
Fri Jul  8 17:12:33 2011 us=797738 /sbin/route add -net SERVERIP netmask 255.255.255.255 gw 192.168.178.2
Fri Jul  8 17:12:33 2011 us=799293 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.10.10.5
Fri Jul  8 17:12:33 2011 us=800784 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.10.10.5
Fri Jul  8 17:12:33 2011 us=803019 /sbin/route add -net 10.10.10.0 netmask 255.255.255.0 gw 10.10.10.5
Fri Jul  8 17:12:33 2011 us=804653 Initialization Sequence Completed
Fri Jul  8 17:12:43 2011 us=642438 write to TUN/TAP : Invalid argument (code=22)
Server Konsole:

Code: Alles auswählen

Fri Jul  8 17:12:36 2011 us=324035 froxlor/93.240.125.222:39301 Bad LZO decompression header byte: 69
Fri Jul  8 17:12:36 2011 us=557569 froxlor/93.240.125.222:39301 Bad LZO decompression header byte: 69
Fri Jul  8 17:12:36 2011 us=676664 froxlor/93.240.125.222:39301 Bad LZO decompression header byte: 69
Fri Jul  8 17:12:37 2011 us=161455 froxlor/93.240.125.222:39301 Bad LZO decompression header byte: 69

Habe bereits verschiedene Routing Ansätze versucht, bin jedoch jedes mal gescheitert..
Ich bedanke mich für Eure Hilfe.

Viele Grüße,

Georg

hec_tech
Beiträge: 1094
Registriert: 28.06.2007 21:49:36
Wohnort: Wien
Kontaktdaten:

Re: OpenVPN Server - Rounting falsch: Kein Internet

Beitrag von hec_tech » 08.07.2011 21:58:53

hier mal meine config wobei du weder tls key noch user auth verwendest

Code: Alles auswählen

dev tun
persist-tun
persist-key
proto udp
cipher AES-256-CBC
tls-client
client
resolv-retry infinite
remote SERVERIP PORT
auth-user-pass
comp-lzo
ca ca.crt
tls-auth ta.key 1
cert cert.crt
key key.key
Ich vermute mal ein Fehler liegt am fehlenden comp-lzo in der client config

Iptables ist bei mir zu lange her. Ich arbeite nur mehr mit BSD im Bereich Firewall Routing und VPN.

raws18
Beiträge: 2
Registriert: 08.07.2011 17:04:44

Re: OpenVPN Server - Rounting falsch: Kein Internet

Beitrag von raws18 » 08.07.2011 22:16:29

Hallo erstmal ;)

hehe, funktioniert sofort...

Danke!

Antworten