LINUX.ORG.RU
ФорумAdmin

[VPN] выполнение команды при подключении

 


0

1

Здравствуйте. Есть сервер, на котором поднят pptpd. Возникла следующая задача: при подключении клиента, сервер должен запустить определенный скрипт. Подскажите, пожалуйста, как это сделать?

система Debian 6.0.3 для vpn использую pptpd

stas@SunFire:/etc/ppp$ cat pptpd-options
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 192.168.1.4
ms-wins 192.168.1.4
nodefaultroute
lock
nobsdcomp 
auth
logfile /var/log/pptpd.log
proxyarp


stas@SunFire:/etc$ cat pptpd.conf
option /etc/ppp/pptpd-options
logwtmp
bcrelay eth0
localip 192.168.1.1
remoteip 192.168.1.102-110

★★★

Ответ на: комментарий от uspen
Pppd invokes the following scripts, if they exist. It is not an error if they don't exist. 
/etc/ppp/auth-up 
A program or script which is executed after the remote system successfully authenticates itself. It is executed with the parameters 
interface-name peer-name user-name tty-device speed 
Note that this script is not executed if the peer doesn't authenticate 
itself, for example when the noauth option is used. 
/etc/ppp/auth-down 
A program or script which is executed when the link goes down, if /etc/ppp/auth-up was previously executed. It is executed in the same manner with the same parameters as /etc/ppp/auth-up. 
/etc/ppp/ip-up 
A program or script which is executed when the link is available for sending and receiving IP packets (that is, IPCP has come up). It is executed with the parameters 
interface-name tty-device speed local-IP-address 
remote-IP-address ipparam 
/etc/ppp/ip-down 
A program or script which is executed when the link is no longer available for sending and receiving IP packets. This script can be used for undoing the effects of the /etc/ppp/ip-up script. It is invoked in the same manner and with the same parameters as the ip-up script. 
/etc/ppp/ipv6-up 
Like /etc/ppp/ip-up, except that it is executed when the link is available for sending and receiving IPv6 packets. It is executed with the parameters 
interface-name tty-device speed local-link-local-address 
remote-link-local-address ipparam 
/etc/ppp/ipv6-down 
Similar to /etc/ppp/ip-down, but it is executed when IPv6 packets can no longer be transmitted on the link. It is executed with the same parameters as the ipv6-up script. 
/etc/ppp/ipx-up 
A program or script which is executed when the link is available for sending and receiving IPX packets (that is, IPXCP has come up). It is executed with the parameters 
interface-name tty-device speed network-number local-IPX-node-address 
remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol local-IPX-router-name remote-IPX-router-name ipparam pppd-pid 
The local-IPX-routing-protocol and remote-IPX-routing-protocol field 
may be one of the following: 
NONE to indicate that there is no routing protocol 

 RIP to indicate that RIP/SAP should be used 
 NLSP to indicate that Novell NLSP should be used 
 RIP NLSP to indicate that both RIP/SAP and NLSP should be used 
/etc/ppp/ipx-down 
A program or script which is executed when the link is no longer available for sending and receiving IPX packets. This script can be used for undoing the effects of the /etc/ppp/ipx-up script. It is invoked in the same manner and with the same parameters as the ipx-up script.
uspen ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.