tmcphee / cyberghostvpn

CyberGhost VPN Client
GNU Affero General Public License v3.0
34 stars 16 forks source link

Always connects to US #5

Closed nicandris closed 1 year ago

nicandris commented 1 year ago

Hey I noticed that the VPN always connects to US. I tried a few countries but it's always US

**************User Defined Vaiables**************
    ACC: [PASSED - NOT SHOWN]
    PASS: [PASSED - NOT SHOWN]
    COUNTRY: CZ
    NETWORK: 172.10.0.0/16
    WHITELISTPORTS: 9091,9696,8989
**************************************************
***********CyberGhost Connection Info***********
    IP: 89.187.177.98
    CITY: New York City
    REGION: New York
    COUNTRY: US
    DNS: 99.83.181.72
************************************************

Any ideas of what could be wrong here?

tmcphee commented 1 year ago

I'm looking into your issue. I'm able to replicate it.

tmcphee commented 1 year ago

After some testing I have determined it to be the Smart DNS. CyberGhost only has Smart DNS for DE, JP, NL, GB, and US. As a result the DNS was defaulting to US. You can add a custom DNS with the ENV variable 'NAMSERVER=1.1.1.1" where 1.1.1.1 is CloudFlare.

It was always grabbing the correct server from CyberGhost, but the Smart DNS was affecting the Location. I'm working on trying to update the CyberGhost CLI to 1.4.1, and will add some improvements to this.

**User Defined Variables** ACC: [PASSED - NOT SHOWN] PASS: [PASSED - NOT SHOWN] COUNTRY: CZ NETWORK: 10.0.0.0/24 WHITELISTPORTS: 9091,9696,8989 NAMESERVER: 1.1.1.1


CyberGhost Connection Info IP: 138.199.56.245 CITY: Prague REGION: Hlavní město Praha COUNTRY: CZ DNS: 1.1.1.1


nicandris commented 1 year ago

ah perfect 👍 thank you for looking into this!!