Page 1 of 1

[Solved] one of ifconfig or ifconfig-ipv6 must be specified

Posted: Tue Jan 19, 2016 10:27 pm
by athena
Hello,

I created a config file (with embedded keys) for my iPhone (see below). I transferred it to the iPhone through iTunes. When I try to connect by using openVPN app on the iPhone, I get the following error (see the client log file below). A similar config file for the TAB interface works well for my PC. The server is using the TAB interface. But iPhone requires the TUN interface. This could be the problem but my iPad is working with this server fine (I do not have iPad's ovpn config files anymore (they were uploaded to iPad bu iTunes originally), and I do not know how to export them out from the iPad so that I can use the same config files for the iPhone, any ideas?) So which client parameter is wrong, or do I need an extra one?
2016-01-19 16:26:41 TUN Error: tun_prop_error: one of ifconfig or ifconfig-ipv6 must be specified
2016-01-19 16:26:41 EVENT: TUN_SETUP_FAILED tun_prop_error: one of ifconfig or ifconfig-ipv6 must be specified [ERR]
Server config: (Asus Router)

Code: Select all

Interface:TAP
protocol: UDP
port: 1194
Firewall: Automatic
Authorization Mode:TLS
Extra HMAC authorization (tls-auth): Disabled
Clint Address pool: DHCP
Encyrption cipher: BF-CBC
Compression: Adaptive
TLS renegotiation time: -1
iPhone.ovpn file:

Code: Select all

client
route-method exe
dev tun
proto udp
remote mydomain.com 1194
route-delay 10
resolv-retry infinite
tls-client
cipher BF-CBC
ns-cert-type server
comp-lzo
persist-key
persist-tun
verb 3
route-gateway 192.168.1.1
float

<ca>
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
</key>

key-direction 1
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-auth>

iPhone log:
2016-01-18 19:22:40 ----- OpenVPN Stop -----
2016-01-19 16:26:36 ----- OpenVPN Start -----
OpenVPN core 3.0 ios armv7s thumb2 32-bit
2016-01-19 16:26:36 UNUSED OPTIONS
1 [route-method] [exe]
6 [route-delay] [10]
7 [resolv-retry] [infinite]
8 [tls-client]
12 [persist-key]
13 [persist-tun]
14 [verb] [3]
15 [route-gateway] [192.168.1.1]

2016-01-19 16:26:36 LZO-ASYM init swap=0 asym=0
2016-01-19 16:26:36 EVENT: RESOLVE
2016-01-19 16:26:37 Contacting xx,yy.zz.uu:1194 via UDP
2016-01-19 16:26:37 EVENT: WAIT
2016-01-19 16:26:37 SetTunnelSocket returned 1
2016-01-19 16:26:37 Connecting to mydomain.com:1194 (xx,yy.zz.uu) via UDPv4
2016-01-19 16:26:37 EVENT: CONNECTING
2016-01-19 16:26:37 Tunnel Options:V4,dev-type tun,link-mtu 1542,tun-mtu 1500,proto UDPv4,comp-lzo,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-client
2016-01-19 16:26:37 Peer Info:
IV_GUI_VER=net.openvpn.connect.ios 1.0.5-177
IV_VER=3.0
IV_PLAT=ios
IV_NCP=1
IV_LZO=1

2016-01-19 16:26:39 VERIFY OK: depth=1
cert. version : 3
serial number : 9F:DE:B4:67:C3:94:EF:33
issuer name : C=US, ST=NJ, L=PL, O=HomeVPN, OU=HomeVPN, CN=user, ??=changeme, emailAddress=myemail@address.com
subject name : C=US, ST=NJ, L=PL, O=HomeVPN, OU=HomeVPN, CN=user, ??=changeme, emailAddress=gmyemail@address.com
issued on : 2013-07-18 16:00:31
expires on : 2023-07-16 16:00:31
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true

2016-01-19 16:26:39 VERIFY OK: depth=0
cert. version : 3
serial number : 01
issuer name : C=US, ST=NJ, L=PL, O=HomeVPN, OU=HomeVPN, CN=user, ??=changeme, emailAddress=myemail@address.com
subject name : C=US, ST=NJ, L=PL, O=HomeVPN, OU=HomeVPN, CN=userServer, ??=changeme, emailAddress=myemail@address.com
issued on : 2013-07-18 16:02:51
expires on : 2023-07-16 16:02:51
signed using : RSA with MD5
RSA key size : 2048 bits
basic constraints : CA=false
cert. type : SSL Server
key usage : Digital Signature, Key Encipherment
ext key usage : TLS Web Server Authentication

2016-01-19 16:26:41 SSL Handshake: TLSv1.0/TLS-DHE-RSA-WITH-AES-256-CBC-SHA
2016-01-19 16:26:41 Session is ACTIVE
2016-01-19 16:26:41 EVENT: GET_CONFIG
2016-01-19 16:26:41 Sending PUSH_REQUEST to server...
2016-01-19 16:26:41 OPTIONS:
0 [redirect-gateway] [ipv6]
1 [dhcp-option] [DNS] [192.168.1.1]
2 [route-gateway] [192.168.1.1]
3 [redirect-gateway] [def1]
4 [route-gateway] [dhcp]
5 [ping] [15]
6 [ping-restart] [60]

2016-01-19 16:26:41 LZO-ASYM init swap=0 asym=0
2016-01-19 16:26:41 EVENT: ASSIGN_IP
2016-01-19 16:26:41 TUN Error: tun_prop_error: one of ifconfig or ifconfig-ipv6 must be specified
2016-01-19 16:26:41 EVENT: TUN_SETUP_FAILED tun_prop_error: one of ifconfig or ifconfig-ipv6 must be specified [ERR]
2016-01-19 16:26:41 EVENT: DISCONNECTED
2016-01-19 16:26:41 Raw stats on disconnect:
BYTES_IN : 5867
BYTES_OUT : 4723
PACKETS_IN : 45
PACKETS_OUT : 46
TUN_SETUP_FAILED : 1
2016-01-19 16:26:41 Performance stats on disconnect:
CPU usage (microseconds): 342347
Network bytes per CPU second: 30933
Tunnel bytes per CPU second: 0
2016-01-19 16:26:41 EVENT: DISCONNECT_PENDING
2016-01-19 16:26:41 ----- OpenVPN Stop -----

Re: tun_prop_error: one of ifconfig or ifconfig-ipv6 must be

Posted: Tue Jan 19, 2016 10:34 pm
by Traffic
athena wrote:A similar config file for the TAB interface works well for my PC. The server is using the TAB interface. But iPhone requires the TUN interface
You cannot mix --dev-type tap with --dev-type tun .. they must be the same.
athena wrote:But iPhone requires the TUN interface
Setup --dev-type tun for all your devices .. it is the recommended method.