Community discussions

MikroTik App
 
randomluser
just joined
Topic Author
Posts: 2
Joined: Thu Aug 26, 2021 11:22 pm

Run a script on Wireguard login

Thu Aug 31, 2023 2:50 pm

Hello I try to run a script when a user login via Wireguard. Is that possible? This is what I have:
/interface wireguard set wireguard1 on-up=WireGuardConnectScript
and
/system script add name=WireGuardConnectScript source={
  :log info "Wireguard Login from $peername"
}
Thanks for helping me out
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Run a script on Wireguard login

Thu Aug 31, 2023 4:30 pm

But how, the shitty answer that ChatGPT gave you, just for chat, isn't enough?
 
User avatar
spippan
Member
Member
Posts: 334
Joined: Wed Nov 12, 2014 1:00 pm
Location: Austria

Re: Run a script on Wireguard login

Fri Sep 01, 2023 2:25 am

Hello I try to run a script when a user login via Wireguard. Is that possible? This is what I have:
/interface wireguard set wireguard1 on-up=WireGuardConnectScript
and
/system script add name=WireGuardConnectScript source={
  :log info "Wireguard Login from $peername"
}
Thanks for helping me out
wireguard ("users") peers do not login
there is a handshake but no login - so there is no destinctive event i guess to handle which could invoke a script

Who is online

Users browsing this forum: VirtualEvan and 5 guests