Emil CHERICHES

Emil CHERICHES

OpenVPN and Android

October 28, 2013 Emil C
4 Comments

To be honest I use OpenVPN quite rarely on my Android tablet, and it happens only when I need to access certain locations that tie me to a certain IP address. This type of connection could be more often used when the tabled would serve as an email reading device at a company  that would restrict email usage without a VPN.

So, today, I open my OpenVPN Connect app and try to connect. And I get this message:

Tun interface setup failed: tun_builder_error: one of ifconfig or ifconfig-ipv6 must be specified

2013-10-28 18.43.47

As a good guy the first thing I do is to google the message and what I get are only stupid answers like “brackets inside the config file are wrong”. I take a look in my config file, there are absolutely no brackets. WTF!?

Looking further in the config file I realise that I changed the config on the server, so that it would use a “tap” interface instead of a “tun” one. Ok, I change that in the tablet’s config file and try to connect again. Another error message:

Sorry, but the Android VPN API doesn’t currently allow TAP-based tunnels.

Sorry, but the Android VPN API doesn't currently allow TAP-based tunnels.

WTF again!

I ended up creating a new config on the server, to make the connection on a different port, using tun-based configuration, and reversed tablet’s configuration to using tun-based interface.

Working OpenVPN connection on Android tablet

And everything works! Magic!

Tips & Tricks AndroidOpenVPN
Previous Post

Hosting Websites with Apache and Nginx on Debian Wheezy

Next Post

Use wheezy-backports and set it as default

  1. tdreyer1 October 31, 2013 at 12:44 pm Reply

    I’m running into this same issue except my server config isn’t using a tap device. Would you be willing to post your server and client config files?

    • Emil November 1, 2013 at 1:43 pm Reply

      So, the server is something like:
      port YOUR_PORT
      proto udp
      dev tun0
      ca ca.crt
      cert server.crt
      key server.key
      dh dh1024.pem
      server 10.11.0.0 255.255.255.0
      ifconfig-pool-persist ipp.txt
      push “redirect-gateway def1 bypass-dhcp”
      push “dhcp-option DNS 10.11.0.1 8.8.8.8”
      client-to-client
      keepalive 5 120
      persist-key
      persist-tun
      status openvpn-status.log
      verb 3

      And the client:
      client
      dev tun
      proto udp
      remote YOUR_SERVER YOUR_PORT
      resolv-retry infinite
      nobind
      persist-key
      persist-tun
      ca ca.crt
      cert client.crt
      key client.key
      ns-cert-type server
      verb 3

      • tdreyer1 November 5, 2013 at 1:08 am Reply

        Thanks, that did it! Changed a few of my settings to match yours and this connection oddity disappeared.

  2. caviru January 19, 2016 at 2:56 pm Reply

    Thank you, i think solved mine too.

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts
  • Debian on BTRFS with subvolumes
  • NixOS TIP: OTP in Gnome login screen
  • Arch to Manjaro – the dirty way
  • The anatomy of a smart bulb
  • OpenVPN on 443
Categories
  • from the web
  • just blog
  • linux
    • Debian
    • NixOS
  • phones
  • Phones & Tablets
  • programing
  • security
  • Smart Home
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows
Blogroll
  • cheriches.fr
Subscribe by Email
Recent Posts
  • Debian on BTRFS with subvolumes
  • NixOS TIP: OTP in Gnome login screen
  • Arch to Manjaro – the dirty way
  • The anatomy of a smart bulb
  • OpenVPN on 443
Categories
  • from the web (3)
  • just blog (1)
  • linux (20)
    • Debian (1)
    • NixOS (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (2)
  • Smart Home (1)
  • Tips & Tricks (16)
  • Uncategorized (1)
  • Web development (1)
  • Windows (1)
Blogroll
  • cheriches.fr
Tags cloud
adb ADS aircrack-ng Android Apache apt-get Arch BTRFS CentOS Chrome Cluster CSS debian Docker Firefox firmware flashing GNOME Google Authenticator High Availability HTTPS javascript KVM linux Manjaro MySQL OpenBeken OpenBK7231T OpenVPN OTP php piwik Postfix Proxy_ARP release RHEL Samba ssh Tuya ubuntu UEFI VPN VRRP windows Youtube
Recent Comments
  • Greg M on The anatomy of a smart bulb
  • The anatomy of a smart bulb #LED @EmilsBits « Adafruit Industries – Makers, hackers, artists, designers and engineers! on The anatomy of a smart bulb
  • Emil C on The anatomy of a smart bulb
  • David Brower on The anatomy of a smart bulb
  • 智能灯泡的解剖 - 偏执的码农 on The anatomy of a smart bulb
Proudly powered by WordPress | Theme: Fmi by Forrss.
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional cookies Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}