duannai5879 2014-03-07 09:20
浏览 590
已采纳

从网页打开/关闭OpenVPN隧道

As I don't live in a country where Netflix is available, I bought an OpenVPN access and mounted a tunnel in a Raspberry Pi and configured it to act as a router for my Apple TV.

This configuration works but it also means that I have to keep the tunnel up all the time...

I was thinking about a webpage running on the PI to check the tunnel status and a button to mount or to unmount it.

Have you ever seen that kind app ?

Would it be complicated to check the tunnel status with a PHP script? Mounting or dismounting it would be easy with system commands but checking the status look more complicated for me...

Any idea?

Thanks

  • 写回答

1条回答 默认 最新

  • doupin1073 2014-04-05 00:38
    关注

    And you can always use a tool like webmin to manage RPI(and any Linux) via browser, including openvpn service. There are plenty of detailed guides on how to install it on RPI, the gist is:

    apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python wget http://prdownloads.sourceforge.net/webadmin/webmin_1.660_all.deb dpkg --install webmin_1.660_all.deb

    PS: It should be easy to write a cgi script that wraps around "service openvpn status", "service openvpn start" and "service openvpn stop" in any language, especially if you don't care much about permissions "at home"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果