Popular Posts
Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement... Simple Web snapshot import java.util.Date; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.graphics.GC; import org.e... Tired of Hibernate? Try JDBI in your code JDBI Quick sample ICategoryDAO.java : create a data access interface (implement is not required) package com.prhythm.erotic.task.data....
Stats
Build an OpenVPN server on android device

Preparation


  1. An android device, in this case, Sony xperia Z is used
  2. Root permission required
  3. Linux Deploy for deploy image via chroot/proot
  4. OpenVPN


Step

1. Root android device for superuser permission
2. Install Linux Deploy from play store or custom apk.
3. Install linux
  • Click download icon to select which image to deploy

  • Select which distribution and suite to use
  • Set user name & password
  • Allow init system
  • Enable SSH server

  • Deploy distribution

  • After installation completed, start linux

4. Connect to android via SSH
5. Install OpenVPN
  • Install required packages
  • Create certification folder and edit vars configuration
  • Edit vars as blow
  • Build ca, server and client certification

  • Copy required certification to the path of openvpn
  • Clone configuration file from sample config
  • Edit server.conf
  • Edit server.conf as blow, modify what your need
  • Modify networking config sysctl.conf
  • Modify content to allow transfer traffic from vpn
  • Make changes work
  • Edit firewall rules
  • Add following content to allow route from vpn subnet to wireless
  • Edit firewall configuration
  • Allow forward policy
  • Add firewall rule for vpn and ssh
  • Make changes work. (In this case, there was some error but I ignore that)
  • Start openvpn
  • Validate result

6. Use vpn client to connect android device
My Conky config

About Conky: Conky is a free, light-weight system monitor for X, that displays any kind of information on your desktop.


Preview: