Skip to content

Commit

Permalink
Merge pull request #1406 from mysteriumnetwork/bugfix/client-dns-not-…
Browse files Browse the repository at this point in the history
…working

Fix openvpn client DNS resolution
  • Loading branch information
tadaskay authored Nov 10, 2019
2 parents d7d0fc5 + a842489 commit db05d22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/openvpn/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *Client) Start(options connection.ConnectOptions) error {
return err
}
c.process = proc
log.Info().Msgf("client config: %v", clientConfig)
log.Info().Interface("data", clientConfig).Msgf("Openvpn client configuration")
removeAllowedIPRule, err := firewall.AllowIPAccess(clientConfig.VpnConfig.RemoteIP)
if err != nil {
return err
Expand Down
4 changes: 4 additions & 0 deletions services/openvpn/client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func NewClientConfigFromSession(vpnConfig *VPNConfig, configDir string, runtimeD
clientFileConfig := newClientConfig(runtimeDir, configDir, enableDNS)
if enableDNS && len(vpnConfig.DNS) > 0 {
clientFileConfig.SetParam("dhcp-option", "DNS", vpnConfig.DNS)
} else {
// TODO remove these once most of the providers are capable of running DNS proxy?
clientFileConfig.SetParam("dhcp-option", "DNS", "208.67.222.222")
clientFileConfig.SetParam("dhcp-option", "DNS", "208.67.220.220")
}
clientFileConfig.VpnConfig = vpnConfig
clientFileConfig.SetReconnectRetry(2)
Expand Down

0 comments on commit db05d22

Please sign in to comment.