N
N
Nicholas Secret2015-12-14 19:05:07
linux
Nicholas Secret, 2015-12-14 19:05:07

How to execute a script when a client connects via VPN?

Good day!
The task is simple, but I can’t find a normal solution for two days. I am a VPN server, I have three remote clients, I have pptpd up. They connect to me and get ip addresses from chap-secret , each one needs to execute a script when connecting, each to his own. Tell me how to implement?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alegzz, 2015-12-14
@Ncla

/etc/ppp/ip-up.d/
create a script, on connection it will be run with parameters
$1 interface name used by pppd
$2 tty device name
$3 tty device speed
$4 local IP address for interface
$5 remote IP address
$6 parameter specified by option 'ipparam' in pppd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question