==== Поднятие static route на macbook air XOS для VPN (pptp) /etc/ppp/ip-up====
#!/bin/sh
ifname=$1
remoteip=$5
case "$remoteip" in
192.168.1.3)
/sbin/route -n add -host 192.168.0.213 192.168.88.249 > /tmp/ppp.log #user1
/sbin/route -n add -host 192.168.0.106 192.168.88.250 >> /tmp/ppp.log #user2
/sbin/route -n add -host 192.168.0.151 192.168.88.251 >> /tmp/ppp.log #user3
;;
esac
exit 0;
==== Удаление static route на macbook air XOS для VPN (pptp) /etc/ppp/ip-down====
#!/bin/sh
ifname=$1
remoteip=$5
case "$remoteip" in
192.168.1.3)
/sbin/route -n delete -host 192.168.0.213 192.168.88.249 > /tmp/ppp.log #user1
/sbin/route -n delete -host 192.168.0.106 192.168.88.250 >> /tmp/ppp.log #user1
/sbin/route -n delete -host 192.168.0.151 192.168.88.251 >> /tmp/ppp.log #user1
;;
esac
exit 0;
#!/bin/sh
ifname=$1
remoteip=$5
case "$remoteip" in
192.168.1.3)
/sbin/route -n add -host 192.168.0.213 192.168.88.249 > /tmp/ppp.log #user1
/sbin/route -n add -host 192.168.0.106 192.168.88.250 >> /tmp/ppp.log #user2
/sbin/route -n add -host 192.168.0.151 192.168.88.251 >> /tmp/ppp.log #user3
;;
esac
exit 0;
==== Удаление static route на macbook air XOS для VPN (pptp) /etc/ppp/ip-down====
#!/bin/sh
ifname=$1
remoteip=$5
case "$remoteip" in
192.168.1.3)
/sbin/route -n delete -host 192.168.0.213 192.168.88.249 > /tmp/ppp.log #user1
/sbin/route -n delete -host 192.168.0.106 192.168.88.250 >> /tmp/ppp.log #user1
/sbin/route -n delete -host 192.168.0.151 192.168.88.251 >> /tmp/ppp.log #user1
;;
esac
exit 0;
Комментариев нет:
Отправить комментарий