You need a push directive for the route to your 192.168.5.0/24 network (server config). And on the server router, you want your firewall to allow forwarding between your vpn and lan zones.
uci add firewall zone
uci set firewall.@zone[-1].name="vpnserver"
uci add_list firewall.@zone[-1].network="vpnserver"
uci set firewall.@zone[-1].input="ACCEPT"
uci set firewall.@zone[-1].output="ACCEPT"
uci set firewall.@zone[-1].forward="REJECT"
uci add firewall forwarding
uci set firewall.@forwarding[-1].src="vpnserver"
uci set firewall.@forwarding[-1].dest="lan"
uci commit firewall
maybe this is not even required?
config rule
option target ACCEPT
option src openvpn
option family ipv4
option proto tcp
option dest_ip 192.168.5.101/24
option dest_port 3000
option name allowServer
option enabled 1
A: The iOS VPN API supports only tun-style tunnels at the moment. This is a limitation of the iOS platform. If you try to connect a profile that uses a tap-based tunnel, you will get an error that only layer 3 tunnels are currently supported.
If you’re still having issues, post your client and server OpenVPN config files, network, and firewall so we can see if there might be an error or something missing.
If compression = ON in OpenVPN on iOS, the connection works fine!
There is one more question regarding the "security".
Can the openvpn --> WAN and --> LAN traffic be restricted in the same way as for / with WAN --> REJECT?
config zone
option name 'vpnserver'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option network 'vpnserver'
then, rules like this are required to "open" the traffic to specific IPs only:
E.g. to access Luci
config rule
option enabled '1'
option target 'ACCEPT'
option src 'vpnserver'
option name 'test'
option dest 'lan'
option dest_ip '192.168.5.1'
these are deleted:
config forwarding
option dest 'lan'
option src 'vpnserver'
This one is kept for outgoing traffic, right?
config forwarding
option src 'vpnserver'
option dest 'wan'
this one enables (Internet) WAN --> openvpn server
config rule
option name 'Allow-OpenVPN'
option src 'wan'
option dest_port '1194'
option proto 'tcp udp'
option target 'ACCEPT'
It is like firewalls in enterprise networks. Between the network "zones" the traffic is closed (REJECT), but there are ACLs maintained. Just to be on the safe side.