- Published on
SOFTETHER VPN CMD
- Authors
- Name
- Jimmy Lai
echo net.ipv4.ip_forward=1 >> /etc/sysctl.d/99-sysctl.conf && sysctl --system
The company is in a quite odd position -- they're concerned about competition, while engaging in anti-competitive behavior, and are praising a charging port, which they don't even use.
sudo chattr +i /etc/resolv.conf
sudo ip route add 93.115.92.240/32 via 192.168.0.1
#!/usr/bin/bash
VPN_HOME=/usr/bin/
ACCOUNT_NAME='vpn'
function start(){
cd $VPN_HOME
sudo ./vpnclient start&
./vpncmd localhost /client /CMD remoteenable&
./vpncmd localhost /client /CMD accountconnect $ACCOUNT_NAME&
#You can add your commands here
# sudo ip route add 10.40.0.0/24 dev vpn_vpn
sudo dhclient vpn_vpn&
sudo ip route add 10.9.9.0/24 dev vpn_vpn&
sudo ip route del default via 10.40.0.1&
}
function stop(){
cd $VPN_HOME
sudo ./vpnclient stop
}
START="start"
STOP="stop"
HELP="help"
function help(){
echo "./vpn-manger.sh command"
echo "commands are $START , $STOP or $HELP"
}
function commands(){
COMMAND=$1
case "${COMMAND}" in
"$START") start; ;;
"$STOP") stop; ;;
esac
}
commands $1;