TUN Write Error. Once Again!

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Locked
Randoslap
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 09, 2013 8:23 pm

TUN Write Error. Once Again!

Post by Randoslap » Mon Sep 09, 2013 8:33 pm

I have hit a wall. For the life of me I cannot seem to get openvpn working. The clients are able to connect but I am plagued with

Code: Select all

2013-09-09 15:46:52 TUN write error: cannot identify IP version for prefix
2013-09-09 15:47:02 TUN write error: cannot identify IP version for prefix
2013-09-09 15:47:42 Session invalidated
2013-09-09 15:47:42 Client terminated, restarting in 2...
2013-09-09 15:47:44 EVENT: RECONNECTING
The clients seem to connect fine, but no traffic is exchanged. I've googled far and wide and came up short.

Here are my configs
Server
http://pastebin.com/CMR1Acr9

Client
http://pastebin.com/WgGaE6db

I found another article on the forum on the same exact topic but it did not help me...
So if anyone could help me I'd be very gracious! :D Thank you in advance, Randoslap

P.S. Running Ubuntu Server 12.10 x86_64

Randoslap
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 09, 2013 8:23 pm

Re: TUN Write Error. Once Again!

Post by Randoslap » Wed Sep 11, 2013 8:19 pm

Sorry about lack of information. Dumb Newbie here. :?

Anyways, I'll get those logs and clean up the config files!

Randoslap
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 09, 2013 8:23 pm

Re: TUN Write Error. Once Again!

Post by Randoslap » Wed Sep 11, 2013 9:20 pm

I can't seem to edit my original post so theres that, but nevertheless,

Logs

Server Log
http://pastebin.com/3rPsZUiA
(I know pastebin links are unwelcome, but its a long file.)

Client Log (iOS)

Code: Select all

2013-09-11 16:27:57 SSL Handshake: TLSv1.0/SSL-EDH-RSA-AES-256-SHA
2013-09-11 16:27:57 Session is ACTIVE
2013-09-11 16:27:58 EVENT: GET_CONFIG
2013-09-11 16:27:58 Sending PUSH_REQUEST to server...
2013-09-11 16:27:58 OPTIONS:
0 [redirect-gateway] [def1] 
1 [dhcp-option] [DNS] [10.8.0.1] 
2 [route] [10.8.0.1] 
3 [topology] [net30] 
4 [ping] [10] 
5 [ping-restart] [120] 
6 [ifconfig] [10.8.0.6] [10.8.0.5] 

2013-09-11 16:27:58 EVENT: ASSIGN_IP
2013-09-11 16:27:58 Connected via tun
2013-09-11 16:27:58 EVENT: CONNECTED @[Server IP]:1194 ([Server IP]) via /UDPv4 on tun/10.8.0.6/
2013-09-11 16:28:07 TUN write error: cannot identify IP version for prefix
2013-09-11 16:28:17 TUN write error: cannot identify IP version for prefix
2013-09-11 16:28:28 TUN write error: cannot identify IP version for prefix
2013-09-11 16:28:38 TUN write error: cannot identify IP version for prefix
2013-09-11 16:28:48 TUN write error: cannot identify IP version for prefix
2013-09-11 16:28:58 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:07 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:18 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:28 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:38 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:48 TUN write error: cannot identify IP version for prefix
2013-09-11 16:29:58 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:08 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:18 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:28 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:38 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:48 TUN write error: cannot identify IP version for prefix
2013-09-11 16:30:58 TUN write error: cannot identify IP version for prefix
2013-09-11 16:31:08 TUN write error: cannot identify IP version for prefix
2013-09-11 16:31:18 TUN write error: cannot identify IP version for prefix
2013-09-11 16:31:28 TUN write error: cannot identify IP version for prefix
2013-09-11 16:31:38 TUN write error: cannot identify IP version for prefix
2013-09-11 16:31:48 TUN write error: cannot identify IP version for prefix
2013-09-11 16:33:07 OS Event: SLEEP
2013-09-11 16:33:07 EVENT: PAUSE
2013-09-11 16:45:05 OS Event: WAKEUP
2013-09-11 16:45:08 EVENT: RESUME
2013-09-11 16:45:08 EVENT: RECONNECTING
2013-09-11 16:45:08 Contacting [Server IP]:1194 via UDP
2013-09-11 16:45:08 EVENT: WAIT
2013-09-11 16:45:08 Connecting to [Server IP]:1194 ([Server IP]) via UDPv4
2013-09-11 16:45:10 EVENT: CONNECTING
2013-09-11 16:45:10 Tunnel Options:V4,dev-type tun,link-mtu 1541,tun-mtu 1500,proto UDPv4,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,key-method 2,tls-client
2013-09-11 16:45:10 Peer Info:
IV_VER=1.0
IV_PLAT=ios
IV_NCP=1
Config Files

Server Config

Code: Select all

port 1194
proto udp
dev tun
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 6
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
Client Config

Code: Select all

client
dev tun
proto udp
remote (A Real IP) 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
verb 9
key-direction 1
<ca>
-----BEGIN CERTIFICATE-----
(...)
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
(...)
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE -----
(...)
-----END PRIVATE KEY-----
</key>
Hopefully that's better for anyone who wants to help me. :)

Randoslap
OpenVpn Newbie
Posts: 4
Joined: Mon Sep 09, 2013 8:23 pm

Re: TUN Write Error. Once Again!

Post by Randoslap » Wed Sep 11, 2013 9:38 pm

Whoops! The Lack of authentication is a simple copying over to forum error.

Code: Select all

ca ca.crt
cert (RealName).crt
key (RealName).key
That's a me typing error, It really does have authentication, sorry about that.

Also, my issue seems not to be a Authentication error as everything in that respect seems to work.

I have a feeling that i've gotten something wrong when it comes the network settings in the config.

Locked