How to force resolving of dns before reconnect after network change? #1846
Unanswered
AnAnalogGuy
asked this question in
Configuration problems
Replies: 1 comment 4 replies
-
if you enable |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My OpenVPN server is running on opnsense. It is listening on the WAN interface as well as on the WLAN interface. The WAN interface has a static public IP4 address while the WAN interface has a static private IP4 address. Both interfaces share the same DNS like firewall.example.com. However, if the smartphone is connected to the WLAN interface, firewall.example.com resolves to the WLANs interface private IP while if the smartphone is connected to the Mobile Network, the public DNS servers return the WAN IP address. Like this, from a configuration point of view, the VPN server can be reached under the same dns no matter which network the smartphone is connected to.
When I manually connect and deconnect while i switch networks, this is working fine. However, there is a problem with this configuration:. Automatic reconnect. When i.e. the vpn tunnel was established when connected to the WLAN, leaving the WLAN area, the smartphone is switching to the mobile network and openvpn client for android detects that there was a change in the network. It therefore starts to reconnect. However it fails. It seems, the reason for this is that the openvpn client does not force a new dns lookup while reconnecting, so when trying to reach firewall.example.com it still is using the WLAN ip that has been resolved earlier. When I say the openvpn client is doing this, I guess it's rather the underlying dns client caching from Androids DNS client. However, when manually connecting and reconnecting, the correct IP is used, so in this case the client is able to trigger/force a DNS lookup.
Does this observation sound consistent with OpenVPN for Android's implemenation? Is there something i can do configuration-wise to solve this issue? Or would it need a change in the code to force a dns lookup on reconnect?
Beta Was this translation helpful? Give feedback.
All reactions