Hello everybody,
i'm using a Banana Pi as VPN-Gateway for our complete traffic (here in germany it's not smart to let kids use the web without vpn).
Sometimes the VPN-Servers are slow, or the connection ist lost and i have to select another server or i just have to restart the gateway. I'm not at home all the time and my idea is to set up a simple page which allows my son to restart the connection or select another server by himself without having root-access to the Pi.
There are two major commands which have to be executed:
killall openvpn
openvpn --config /etc/openvpn/vpn && iptables -A FORWARD -s 192.168.178.0/24 -i eth0:0 -o eth0 -m conntrack --ctstate NEW -j REJECT && iptables -A FORWARD -s 192.168.178.0/24 -i eth0:0 -o tun0 -m conntrack --ctstate NEW -j ACCEPT && iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
The commands should be executed by a click - it would be perfect if it's possible to use a picture (jpg) of a nation flag ...
I'm not really into php, so i hope for a working template and instructions how i can get it work
Systeminformations:
BananaPi
Bananian Jessie
Apache2
PHP5
Thanks for any helpful hint!
Sebastian
i'm using a Banana Pi as VPN-Gateway for our complete traffic (here in germany it's not smart to let kids use the web without vpn).
Sometimes the VPN-Servers are slow, or the connection ist lost and i have to select another server or i just have to restart the gateway. I'm not at home all the time and my idea is to set up a simple page which allows my son to restart the connection or select another server by himself without having root-access to the Pi.
There are two major commands which have to be executed:
killall openvpn
openvpn --config /etc/openvpn/vpn && iptables -A FORWARD -s 192.168.178.0/24 -i eth0:0 -o eth0 -m conntrack --ctstate NEW -j REJECT && iptables -A FORWARD -s 192.168.178.0/24 -i eth0:0 -o tun0 -m conntrack --ctstate NEW -j ACCEPT && iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
The commands should be executed by a click - it would be perfect if it's possible to use a picture (jpg) of a nation flag ...
I'm not really into php, so i hope for a working template and instructions how i can get it work
Systeminformations:
BananaPi
Bananian Jessie
Apache2
PHP5
Thanks for any helpful hint!
Sebastian