Httpc, hackney don't work when my work VPN is on

Curl works in terminal, browser works as well.

When I start ‘iex -S mix’ and use :httpc or hackney ( HTTPoison) even simplest requests don’t work.

:httpc.request 'https://elixir-lang.org'

{:error,
 {:failed_connect,
  [{:to_address, {'elixir-lang.org', 443}}, {:inet, [:inet], :nxdomain}]}}
HTTPoison.get("https://elixir-lang.org")

{:error, %HTTPoison.Error{id: nil, reason: :nxdomain}}

Please help.

What operating system are you on? And does your VPN perhaps require use of a proxy? What kind of VPN? Some VPN clients do a lot more than just creating the tunnel, but apply access rules.

1 Like

Ubuntu 19.10.

And does your VPN perhaps require use of a proxy?

I don’t know. How do I find out? It’s a openconnect VPN to which I connect using command line and providing username and password.

I am not sure what exactly fixed it but I got it working by changing OS’s network settings.

Just in case someone else lands here: we’re using Cisco Anyconnect on Windows for connecting to the vpn and there is a known bug that when connected you’re unable to browse pages on your own pc any more. The solution is to disable IPV6 on the network adapter properties and then everything works.

1 Like

I guess it doesn’t do any form of split tunnelling, even for localhost. Thats not good!