I have set my Server app (OSX) to use VPN feature, with L2TP, using a VPN Host Name who is a FQDN pointed to my public static IP. By default it came with a shared secret, and a small range of IP's. In the DNS settings i have this server and the router of this private network, both IP's are internal.
Since there is a port for L2TP (https://support.apple.com/en-us/HT202944), i have done a port forwarding in this router, to my server, through UDP in port 1701.
I am not able to test this properly, because i have test it with other mac who is inside of the same private network as this server, with the FQDN. There i add login credentials like i am using internally and set the connection to be L2TP and added the shared key manually. The error that i am getting is:
The VPN-L2TP server doesnt respond. Try to connect again. If this problem continue, check the definitions and contact the Administrator of the system.
Now i dont know if i am unable to connect because i am in the same network, or if i have config something wrong.
Thanks in advance!
UPDATE2:
I add the IKE port (500) for port forwarding and still nothing.
In /var/log/ppp.log i have:
l2tp_get_router_address
l2tp_get_router_address 192.168.1.254 from dict 1
L2TP connecting to server '<FQDN>' (<IP>) ...
IPSec connection started
IPSec connection failed
L2TP IPSec agressive mode retry with DH group 2
l2tp_get_router_address
l2tp_get_router_address 192.168.1.254 from dict 1
L2TP connecting to server '<FQDN>' (<IP>) ...
IPSec connection started
IPSec connection failed