I think for headless system, it's cool to have a "cpanel like a vps" to execute command, reboot, check, watchdog on system function failed. So the ESP can be in AP mode for configuration with smartphone, STA+AP for testing config, or STA only when configured - a hardware switch on the board. No screen HDMI, no keyboard, no hub usb needed to rescue the system
For linux side for Tun/Tap software interface, PI and Router Wifi (openwrt) :
http://backreference.org/2010/03/26/tun ... -tutorial/
http://backreference.org/wp-content/upl ... un.tar.bz2