hwdsl2 / docker-ipsec-vpn-server

Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
https://hub.docker.com/r/hwdsl2/ipsec-vpn-server
Other
6.37k stars 1.38k forks source link

Change default ports #385

Closed grinono closed 1 year ago

grinono commented 1 year ago

I'm running this container on Kubernetes, but exposing it with nodePort will change the output ports to 30000+. I do not have a load balancer to trim down the ports again. There is no other"simple" way to directly expose to a lower range for UDP traffic.

Would it be somehow possible to change the exposed ports and then populate these in the generated config files? So the client connections are established directly to these non-standard ports?

hwdsl2 commented 1 year ago

@grinono Hello! Currently, with this Docker image it is not supported to change the default ports (UDP 500 and 4500) for the IPsec VPN. The related Libreswan option is leftikeport, read more at this link. You can customize this Docker image yourself and add this option to the IPsec configuration in run.sh, and modify the Dockerfile to expose different ports. This has not been tested, however, and IPsec VPN clients may not support connecting to custom ports.