[GH-ISSUE #329] Domain name support for ikev2-vpn #304

Closed
opened 2026-03-02 08:01:13 +03:00 by kerem · 1 comment
Owner

Originally created by @brego81 on GitHub (Nov 29, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/329

Describe the issue
I am unable to use a domain name when setting up an ikev2-vpn server. In specific, by default the docker pick-up my server IP and there is no way to override it using environment variables.
I tried to user both VPN_DNS_NAME and VPN_PUBLIC_IP but did not worked.

Once the server is up and running I see:

IKEv2 is already set up. Details for IKEv2 mode:
VPN server address: 151.30.XX.XX

While I would like to see

VPN server address: xxxx.duck.dns

To Reproduce
Run the ikev2-vpn server using the default setting and try to set a domain name instead of an IP
If I try to connect using the server IP address it works, differently with the domain name doesn't

Server

  • Docker host OS: fedora 36 server

Client

  • OS: android 13
  • VPN mode: IKEv2
Originally created by @brego81 on GitHub (Nov 29, 2022). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/329 **Describe the issue** I am unable to use a domain name when setting up an ikev2-vpn server. In specific, by default the docker pick-up my server IP and there is no way to override it using environment variables. I tried to user both VPN_DNS_NAME and VPN_PUBLIC_IP but did not worked. Once the server is up and running I see: > IKEv2 is already set up. Details for IKEv2 mode: > VPN server address: 151.30.XX.XX While I would like to see > VPN server address: xxxx.duck.dns **To Reproduce** Run the ikev2-vpn server using the default setting and try to set a domain name instead of an IP If I try to connect using the server IP address it works, differently with the domain name doesn't **Server** - Docker host OS: fedora 36 server **Client** - OS: android 13 - VPN mode: IKEv2
kerem closed this issue 2026-03-02 08:01:13 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Nov 29, 2022):

@brego81 Hello! This is not a bug. As mentioned in the README, the VPN_DNS_NAME variable has no effect if IKEv2 is already set up in the Docker container. This variable can be used to set a DNS name for IKEv2.

What you can do is to first remove the container and the ikev2-vpn-data Docker volume:

docker rm -f ipsec-vpn-server
docker volume rm ikev2-vpn-data

Warning: These commands above will permanently delete all existing VPN data including IKEv2 certificates and keys.

After that, re-create the Docker container using instructions in the README. Be sure to specify the correct VPN_DNS_NAME in your "env" file.

<!-- gh-comment-id:1331158914 --> @hwdsl2 commented on GitHub (Nov 29, 2022): @brego81 Hello! This is not a bug. As mentioned in the README, the VPN_DNS_NAME variable has no effect if IKEv2 is already set up in the Docker container. This variable can be used to set a DNS name for IKEv2. What you can do is to first remove the container and the ikev2-vpn-data Docker volume: docker rm -f ipsec-vpn-server docker volume rm ikev2-vpn-data Warning: These commands above will permanently delete all existing VPN data including IKEv2 certificates and keys. After that, re-create the Docker container using instructions in the README. Be sure to specify the correct VPN_DNS_NAME in your "env" file.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-ipsec-vpn-server#304
No description provided.