OK, well I have read the how to, and a few other tutorials on OPNSense site to site. Have made a little progress. The tunnel comes up on both sides, but the server is for whatever reason not assigning an ip address to the tun interface on the client. Consequently the client is not receiving routes for other side of VPN. In Client logs I see this (note I have sanitized this to remove sensitive info):
Feb 8 14:55:45 : [Myopensensevpnserver.com] Inactivity timeout (--ping-restart), restarting
Feb 8 14:55:45 : SIGUSR1[soft,ping-restart] received, process restarting
Feb 8 14:55:45 : Restart pause, 5 second(s)
Feb 8 14:55:50 : WARNING: --ns-cert-type is DEPRECATED. Use --remote-cert-tls instead.
Feb 8 14:55:50 : TCP/UDP: Preserving recently used remote address: [AF_INET]222.32.190.156:1194
Feb 8 14:55:50 : Socket Buffers: R=[212992->212992] S=[212992->212992]
Feb 8 14:55:50 : UDP link local: (not bound)
Feb 8 14:55:50 : UDP link remote: [AF_INET]222.32.190.156:1194
Feb 8 14:55:56 : TLS: Initial packet from [AF_INET]222.32.190.156:1194, sid=976df475 d06c103d
Feb 8 14:55:57 : VERIFY OK: depth=1, <blah,blah,blah>
Feb 8 14:55:57 : VERIFY OK: nsCertType=SERVER
Feb 8 14:55:57 : VERIFY OK: depth=0, <blah,blah,blah>
Feb 8 14:55:57 : WARNING: 'ifconfig' is present in remote config but missing in local config, remote='ifconfig 172.16.72.192 172.16.72.194'
Feb 8 14:55:57 : Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
Feb 8 14:55:57 : [MYopensensevpnserver.com] Peer Connection Initiated with [AF_INET]222.32.190.156:1194
Feb 8 14:55:58 : SENT CONTROL [Myopensensevpnserver.com]: 'PUSH_REQUEST' (status=1)
Feb 8 14:55:58 : PUSH: Received control message: 'PUSH_REPLY,route 192.168.124.0 255.255.255.0,peer-id 0'
Feb 8 14:55:58 : OPTIONS IMPORT: route options modified
Feb 8 14:55:58 : OPTIONS IMPORT: peer-id set
Feb 8 14:55:58 : OPTIONS IMPORT: adjusting link_mtu to 1625
Feb 8 14:55:58 : Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
Feb 8 14:55:58 : Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
Feb 8 14:55:58 : Incoming Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
Feb 8 14:55:58 : Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
Feb 8 14:55:58 : Preserving previous TUN/TAP instance: tun5
Feb 8 14:55:58 : Initialization Sequence Completed
If I do an ip add command on the client I see this for tun5:
61: tun5: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 100 link/none
Doing route command shows no route to 192.168.124.0 /24, even though log shows it recieved a PUSH_REPLY
This entry concerns me:
WARNING: 'ifconfig' is present in remote config but missing in local config, remote='ifconfig 172.16.72.192 172.16.72.194'
The ip addresses it is showing for the server and client are wrong. Shouldn't it show 172.16.72.193 172.16.72.194?
in the server config file I have this:
tls-server
ifconfig 172.16.72.193 172.16.72.194
tls-verify "/usr/local/etc/inc/plugins.inc.d/openvpn/ovpn_auth_verify tls 'Myopensensevpnserver.com' 1"
lport 1194
management /var/etc/openvpn/server1.sock unix
push "route 192.168.124.0 255.255.255.0"
route 192.168.110.0 255.255.255.0
ca /var/etc/openvpn/server1.ca
cert /var/etc/openvpn/server1.cert
key /var/etc/openvpn/server1.key
dh /usr/local/etc/dh-parameters.2048.sample
tls-auth /var/etc/openvpn/server1.tls-auth 0
comp-lzo adaptive
topology subnet
Seems like OPNSense is not sending right info to client. I can repost complete server and client configs if that helps. Is this a bug in OPNSense, or is my config just wrong?