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 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿