[GH-ISSUE #210] Couldn't detect public IP #195

Closed
opened 2026-03-02 07:44:41 +03:00 by kerem · 2 comments
Owner

Originally created by @attinderdhillon on GitHub (Nov 5, 2020).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/210

It is a ubuntu minimal instance on oracle cloud.

I have installed dns-utils and can get the public ip with 'dig @resolver1.opendns.com -t A -4 myip.opendns.com +short'

I've also tried defining VPN_PUBLIC_IP in "--env-file ./vpn.env"

docker start -a ipsec-vpn-server

Trying to auto discover IP of this server...
dig: couldn't get address for 'resolver1.opendns.com': failure
Error: Cannot detect this server's public IP. Define it in your 'env' file as 'VPN_PUBLIC_IP'.
Originally created by @attinderdhillon on GitHub (Nov 5, 2020). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/210 It is a ubuntu minimal instance on oracle cloud. I have installed dns-utils and can get the public ip with 'dig @resolver1.opendns.com -t A -4 myip.opendns.com +short' I've also tried defining VPN_PUBLIC_IP in "--env-file ./vpn.env" ``` docker start -a ipsec-vpn-server Trying to auto discover IP of this server... dig: couldn't get address for 'resolver1.opendns.com': failure Error: Cannot detect this server's public IP. Define it in your 'env' file as 'VPN_PUBLIC_IP'. ```
kerem closed this issue 2026-03-02 07:44:41 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Nov 7, 2020):

@attinderdhillon Hello! This may indicate network access problems from within your Docker container. If you read the source code, the run.sh script tries to detect your server's public IP using both DNS and HTTP methods. Can you test using another Docker image that you are able to access the network (including resolving DNS) from within containers?

<!-- gh-comment-id:723396408 --> @hwdsl2 commented on GitHub (Nov 7, 2020): @attinderdhillon Hello! This may indicate network access problems from within your Docker container. If you read the source code, the `run.sh` script tries to detect your server's public IP using both DNS and HTTP methods. Can you test using another Docker image that you are able to access the network (including resolving DNS) from within containers?
Author
Owner

@attinderdhillon commented on GitHub (Nov 7, 2020):

After recreating instance and installing image It is working perfectly now. Must be an issue at my end.

<!-- gh-comment-id:723437619 --> @attinderdhillon commented on GitHub (Nov 7, 2020): After recreating instance and installing image It is working perfectly now. Must be an issue at my end.
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#195
No description provided.