mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #263] Port forward issues #245
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ray73864 on GitHub (Nov 10, 2021).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/263
Real head-scratcher this one is.
I have set up the docker container, set ports 500 and 4500 from the docker host to the docker container, installed strongSwan onto my Android phone and can connect to the VPN just fine using ikev2.
However I want to be able to connect to the VPN externally so that I can access my network when I'm not at home.
I have a Cisco router (Cisco ISR 4321), which has a VPN preconfigured on it so that it is always connected to works network, which means ports 500 and 4500 are already in use by the router itself.
So I set up UDP ports 9000 and 9500 to port forward to the raspberry pi on 500 and 4500 (9000 -> 500, 9500 -> 4500).
Unfortunately when I try and connect externally (phone on mobile data instead of wifi), it just gives up even trying to connect.
I feel like I am missing something really simple, or maybe what I am trying to do just won't be possible?
I checked with an online UDP scanner and it can see the ports are open and talking to the VPN server on the raspberry pi (Both ports show as 'open / filtered').
@hwdsl2 commented on GitHub (Nov 11, 2021):
@ray73864 Hello! I understand that you forwarded UDP ports 9000 and 9500 on your router to the VPN server on the Raspberry Pi, then tried to connect to the VPN externally. Unfortunately, this won't work because IPsec uses UDP ports 500 and 4500, and there isn't a way to specify custom port(s) for IPsec in most VPN clients. For your use case, perhaps you can instead try OpenVPN [1].
[1] https://github.com/Nyr/openvpn-install