I am trying to get my VPN (L2TP IPSec PSK) to work. I have a Synology NAS where I have setup everything as it says on the Synology support page.
In my Asus RT-N66U router I have opened UDP ports 500, 1701 and 4500 for port forwarding to my NAS that has the VPN service running. See the picture below.
But from outside the network I can't connect to my VPN. I have tried both from my computer and from my Android phone. If I am inside the network and set the host of my VPN client to the IP of the NAS/VPN given by my router, it works, so I suppose it has something todo with my Asus RT-N66U router that maybe does not forward the packets properly.
Any ideas on this issue?
EDIT
No logs from my VPN log. Here is a packet dump with only the UDP packets of the L2TP IPsec communication captured by my NAS, so it seems the router forwards the packets accordingly:
DiskStation> tcpdump -i eth0 -n udp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
21:36:41.676327 IP 192.168.1.1.500 > 192.168.1.6.500: isakmp: phase 1 I ident
21:36:41.678225 IP 192.168.1.6.500 > 192.168.1.1.500: isakmp: phase 1 R ident
21:36:41.681985 IP 192.168.1.222.500 > 192.168.1.6.500: isakmp: phase 1 ? ident
21:36:41.691981 IP 192.168.1.6.500 > 192.168.1.222.500: isakmp: phase 1 R ident
21:36:41.705949 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 1 ? ident[E]
21:36:41.709625 IP 192.168.1.6.4500 > 192.168.1.222.4500: NONESP-encap: isakmp: phase 1 R ident[E]
21:36:42.675037 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 2/others ? oakley-quick[E]
21:36:42.676606 IP 192.168.1.6.4500 > 192.168.1.222.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
21:36:42.678285 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 2/others ? oakley-quick[E]
21:36:42.679253 IP 192.168.1.1.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x1), length 116
21:36:43.294988 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x2), length 116
21:36:44.689496 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *PROTO_VER(1.0) *FRAMING_CAP(AS) *BEARER_CAP() *FIRM_VER(1680) *HOST_NAME(DiskStation) *VENDOR_NAME(xelerance.com) *ASSND_TUN_ID(25553) *RECV_WIN_SIZE(4)
21:36:45.296703 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x3), length 116
21:36:46.699567 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x1), length 164
21:36:46.699611 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *PROTO_VER(1.0) *FRAMING_CAP(AS) *BEARER_CAP() *FIRM_VER(1680) *HOST_NAME(DiskStation) *VENDOR_NAME(xelerance.com) *ASSND_TUN_ID(25553) *RECV_WIN_SIZE(4)
21:36:46.700226 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x2), length 68
21:36:47.709533 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x3), length 164
21:36:47.709571 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *PROTO_VER(1.0) *FRAMING_CAP(AS) *BEARER_CAP() *FIRM_VER(1680) *HOST_NAME(DiskStation) *VENDOR_NAME(xelerance.com) *ASSND_TUN_ID(25553) *RECV_WIN_SIZE(4)
21:36:48.719556 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x4), length 164
21:36:48.719600 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *PROTO_VER(1.0) *FRAMING_CAP(AS) *BEARER_CAP() *FIRM_VER(1680) *HOST_NAME(DiskStation) *VENDOR_NAME(xelerance.com) *ASSND_TUN_ID(25553) *RECV_WIN_SIZE(4)
21:36:49.301815 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x4), length 116
21:36:49.302278 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x5), length 68
21:36:49.729532 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x6), length 164
21:36:49.729575 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=0,Nr=1 *MSGTYPE(SCCRP) *PROTO_VER(1.0) *FRAMING_CAP(AS) *BEARER_CAP() *FIRM_VER(1680) *HOST_NAME(DiskStation) *VENDOR_NAME(xelerance.com) *ASSND_TUN_ID(25553) *RECV_WIN_SIZE(4)
21:36:50.388037 IP 192.168.1.222.21327 > 255.255.255.255.21327: UDP, length 112
21:36:50.388972 IP 192.168.1.222.21327 > 255.255.255.255.21328: UDP, length 112
21:36:50.739621 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x7), length 164
21:36:51.749767 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=1,Nr=1 *MSGTYPE(StopCCN) *ASSND_TUN_ID(25553) *RESULT_CODE(1/0 Timeout)
21:36:52.759548 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x8), length 100
21:36:52.759663 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=1,Nr=1 *MSGTYPE(StopCCN) *ASSND_TUN_ID(25553) *RESULT_CODE(1/0 Timeout)
21:36:52.829697 IP 192.168.1.6.4500 > 192.168.1.222.4500: NONESP-encap: isakmp: phase 2/others R inf[E]
21:36:52.962544 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 2/others ? inf[E]
21:36:53.307101 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x5), length 116
21:36:53.307540 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0x9), length 68
21:36:53.769512 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xa), length 100
21:36:53.769553 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=1,Nr=1 *MSGTYPE(StopCCN) *ASSND_TUN_ID(25553) *RESULT_CODE(1/0 Timeout)
21:36:54.779555 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xb), length 100
21:36:54.779597 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=1,Nr=1 *MSGTYPE(StopCCN) *ASSND_TUN_ID(25553) *RESULT_CODE(1/0 Timeout)
21:36:55.789545 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xc), length 100
21:36:55.789589 IP 192.168.1.6.1701 > 192.168.1.1.51432: l2tp:[TLS](22/0)Ns=1,Nr=1 *MSGTYPE(StopCCN) *ASSND_TUN_ID(25553) *RESULT_CODE(1/0 Timeout)
21:36:56.799555 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xd), length 100
21:36:57.311344 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x6), length 116
21:36:57.311810 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xe), length 68
21:37:01.315211 IP 192.168.1.222.4500 > 192.168.1.6.4500: UDP-encap: ESP(spi=0xd949debf,seq=0x7), length 116
21:37:01.315643 IP 192.168.1.6.4500 > 192.168.1.222.4500: UDP-encap: ESP(spi=0x090a5fbd,seq=0xf), length 68
21:37:01.979832 IP 192.168.1.6.4500 > 192.168.1.222.4500: isakmp-nat-keep-alive
21:37:01.979868 IP 192.168.1.6.4500 > 192.168.1.222.4500: isakmp-nat-keep-alive
21:37:02.645006 IP 192.168.1.222.4500 > 192.168.1.6.4500: isakmp-nat-keep-alive
21:37:02.687529 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 2/others ? inf[E]
21:37:02.688145 IP 192.168.1.222.4500 > 192.168.1.6.4500: NONESP-encap: isakmp: phase 2/others ? inf[E]
21:37:02.688189 IP 192.168.1.6.4500 > 192.168.1.222.4500: NONESP-encap: isakmp: phase 2/others R inf[E]
21:37:02.711699 IP 192.168.1.6.4500 > 192.168.1.222.4500: NONESP-encap: isakmp: phase 2/others R inf[E]
21:37:03.881937 IP 192.168.1.222.17500 > 255.255.255.255.17500: UDP, length 104
21:37:03.882667 IP 192.168.1.222.17500 > 192.168.1.255.17500: UDP, length 104