Well... a few steps forward, a few steps backwards.
I created the client key, cert, ta.key ,dh2048.pem, and the 3des.key. I then created the opvn file with this script from Jodoin
https://gist.github.com/laurenorsini/10013430 and loaded it in the iPhone opvn app.
client
dev tun
proto udp
remote <pi.flacco.com> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20
<ca>
-----BEGIN CERTIFICATE-----
(redacted)
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
(redacted)
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info:
(redacted)
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>
Alas,when trying to connect from the client (from outside the home network), I get the following error:
Transport Error: DNS resolve error on '<pi.flacco.com>' for UDP session: Host not found (authoritative)
Alas I get the following error:
Transport Error: DNS resolve error on '<pi.flacco.com>' for UDP session: Host not found (authoritative)
I have the appropriate ports forwarded on y modem/router:
LAN IP Protocol Ports Forwarded Remote Ports Remote Defined
192.168.0.100 TCP/UDP 22 N/A N/A
192.168.0.100 UDP 1194 N/A N/A
192.168.0.100 TCP 80 N/A N/A
The server side seems to be working
root@raspberrypi:/home/pi# ps auxwww | grep -i openvpn
root 15909 0.0 0.1 4276 1816 pts/0 S+ 07:47 0:00 grep -i openvpn
root 31947 0.0 0.1 5112 1800 ? Ss Dec24 0:01 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --config /etc/openvpn/server.conf
but then:
$ sudo nmap -sU localhost -p 1194
Starting Nmap 6.47 ( http://nmap.org ) at 2016-12-25 11:59 PST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00016s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
1194/udp closed openvpn
sudo tail -100 /var/log/openvpn.log
Sun Dec 25 12:04:44 2016 us=881659 library versions: OpenSSL 1.0.1t 3 May 2016, LZO 2.08
Sun Dec 25 12:04:44 2016 us=892707 Diffie-Hellman initialized with 2048 bit key
Sun Dec 25 12:04:44 2016 us=909099 Control Channel Authentication: using '/etc/openvpn/easy-rsa/keys/ta.key' as a OpenVPN static key file
Sun Dec 25 12:04:44 2016 us=909265 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Dec 25 12:04:44 2016 us=909308 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Dec 25 12:04:44 2016 us=909356 TLS-Auth MTU parms [ L:1558 D:166 EF:66 EB:0 ET:0 EL:0 ]
Sun Dec 25 12:04:44 2016 us=909409 Socket Buffers: R=[163840->131072] S=[163840->131072]
Sun Dec 25 12:04:44 2016 us=909482 TCP/UDP: Socket bind failed on local address [AF_INET]192.168.0.100:1194: Cannot assign requested address
Sun Dec 25 12:04:44 2016 us=909519 Exiting due to fatal error
I wasn't getting this error before, I'm not sure why I'm getting it now.
[oconf= /etc/openvpn/server.conf]local 192.168.0.100 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/vpn-server.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/vpn-server.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh2048.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
##ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
##push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OpenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
##push "route 192.168.0.100 255.255.255.0" # SWAP THE IP NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
# Set primary domain name server address to the SOHO Router
# If your router does not do DNS, you can use Google DNS 8.8.8.8
##push "dhcp-option DNS 192.168.2.1" # This should already match your router address and not need to be changed.
#push "dhcp-option DNS 192.168.0.1 # changed to this to test
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
#user nobody
#group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 4[/oconf]