IPad iOS 9.2 HMAC firewall does not work
- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
IPad iOS 9.2 HMAC firewall does not work
OpenVPN is installed on my root server (Ubuntu 14.4.3) and clients (Windows 10). I am using a HMAC firewall with an entry in the server/clients as follows:
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
# Generate with:
# openvpn --genkey --secret ta.key
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth ta.key 0 # This file is secret
Today I tried to connect IPad and IPhone to the root server, too. I first got connection errors. But when I modified server - and IPad config files, to connect without HMAC (i.e. without the line tls-auth ta.key 0) everything worked fine.
Is it possible to use also HMAC on IPhone and IPad?
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
# Generate with:
# openvpn --genkey --secret ta.key
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth ta.key 0 # This file is secret
Today I tried to connect IPad and IPhone to the root server, too. I first got connection errors. But when I modified server - and IPad config files, to connect without HMAC (i.e. without the line tls-auth ta.key 0) everything worked fine.
Is it possible to use also HMAC on IPhone and IPad?
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: IPad iOS 9.2 HMAC firewall does not work
On the client it should be:
And on the server:
For iOS it`s adviced to use inline:
https://community.openvpn.net/openvpn/w ... nPage#lbAV
Code: Select all
tls-auth ta.key 1
Code: Select all
tls-auth ta.key 0
https://community.openvpn.net/openvpn/w ... nPage#lbAV
Code: Select all
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
Re: IPad iOS 9.2 HMAC firewall does not work
Thank you for the quick reply!
Would the whole XXX.ovpn file for an IPhone then look like this for instance:
client
proto udp
dev tun0
remote XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert XXX.crt
key XXX.key
--tls-auth ta.key 1
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
with the right content replacing the place holders ----Begin ... End?
Would the whole XXX.ovpn file for an IPhone then look like this for instance:
client
proto udp
dev tun0
remote XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert XXX.crt
key XXX.key
--tls-auth ta.key 1
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
with the right content replacing the place holders ----Begin ... End?
- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
Re: IPad iOS 9.2 HMAC firewall does not work
I found this example https://community.openvpn.net/openvpn/wiki/IOSinline
Everything works now! Thank you for your help!

Everything works now! Thank you for your help!



- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: IPad iOS 9.2 HMAC firewall does not work
Trial and error, time and a lot of reading........
When using inline files you can remove the paths to the files.
I would look something like this:
***
Note that
Also note that
Edit:
I see you found the solution by yourself, good

When using inline files you can remove the paths to the files.
I would look something like this:
You can open every file in a text editor and copy the contents to the client config as shown above.tls-client
proto udp
dev tun0
remote XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIIDgIBATANBgkqhkiG9w0BAQsFADBqMQswCQYDVQQGEwJOTDEM
MAoGQwwCgYDVQQKEwNNTUQxDTALBgNVBAsTBE9WUE4xCzAJBgNV
BAMToZIhvcNAQkBFhRkcmVldGplaEBob3RtYWlsLmNvbTAeFw0x
NTA5w0yNTA5MjMwOTAyMDBaMGoxCzAJBgNVBAYTAk5MMQwwCgYD
....
....
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
MIIDqDCCApCgAwIBAgIBBDANBgkqhkiG9w0BAQsFADBqMQswCQ
MAoGA1UECBMDR0xEMQwwCgYDVQQKEwNNTUQxDTALBgNVBAsTBE
YJKoZIhvcNAQkBFhRkcmVldGplaEBob3RtYWlsLmNvbTAeFw0x
BaFw0yMDA5MjMwOTEwMDBaMHIxCzAJBgNVBAYTAk5MMQwwCgYD
....
....
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAuXl0CxfXI6F0Q/SesInid8mcSzZY71pTQKcZH59
ayfAwoMPxZmwcIbiM5yugFmXXyK4LLY0C/AD7UXuHBzzWTWfJ3fxsf+
lX4F79l85pXbrjoyQMoimYqIrjYAkq0+GCP2Xols0HrUS5EAv6t9Bsp
gRh54Y0F7bxa7mKQTcrphJ4hw9hUUPbXDI6OgYRni+du30WaixjucnK
....
....
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
4c3479ec7a96abd2deb9a7615
2d3412f0234fde07da2bf7459
47ded1c65008f4144398279df
3b04099ca055198ea70bf26f8
....
....
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
***
Note that
is replaced withclient
And server config should havetls-client
***tls-server
Also note that
andkey-direction 1
replaces<tls-auth>
-----BEGIN OpenVPN Static key V1-----
4c3479ec7a96abd2deb9a7615
2d3412f0234fde07da2bf7459
47ded1c65008f4144398279df
3b04099ca055198ea70bf26f8
....
....
-----END OpenVPN Static key V1-----
</tls-auth>
*****tls-auth ta.key 1
Edit:
I see you found the solution by yourself, good

- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
Re: IPad iOS 9.2 HMAC firewall does not work
Thank you for your example!
I have just optimized my client.conf
Unfortunately the replacement of client with tls-client does not work. I have already modified the server conf with tls-server, too.
Do you have any idea?
By the way, the usage of just client works together with tls-server used on the server side.
I have just optimized my client.conf
Unfortunately the replacement of client with tls-client does not work. I have already modified the server conf with tls-server, too.
Do you have any idea?
By the way, the usage of just client works together with tls-server used on the server side.
- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
Re: IPad iOS 9.2 HMAC firewall does not work
Using tls-client instead of just client leads to the logentry (Windows 10, Desktop-PC):
Options error: On Windows, --ifconfig is required when --dev tun is used
Use --help for more information.
and nothing happens.
Options error: On Windows, --ifconfig is required when --dev tun is used
Use --help for more information.
and nothing happens.
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: IPad iOS 9.2 HMAC firewall does not work
Please see here:
topic21084.html
or only
which includes both.

topic21084.html
You can use both together:Traffic wrote:--client should not be replaced by --tls-clientKulturmensch wrote:I just learned that client should be replaced by tls-client
Thanks to Pippin
--client expands to --tls-client & --pull
--tls-client does not expand and so you loose --pull
Code: Select all
tls-client
pull
Code: Select all
client
Which I obviously did not doPippin wrote:a lot of reading........![]()

- Kulturmensch
- OpenVPN User
- Posts: 28
- Joined: Tue Feb 16, 2016 8:06 am
- Contact:
Re: IPad iOS 9.2 HMAC firewall does not work
I fully agree
I have read a lot up to know and - obvously - I am not yet through
(What about comp-LZ4 i.e.)
But the current result is already great and I feel more safe getting access to public WiFis!
However, thanks for the clarification


But the current result is already great and I feel more safe getting access to public WiFis!
However, thanks for the clarification
