I am a bit new to Mikrotik scripting.
I am trying to get the remote IP address of SSTP-clients that connect to my router. The names are dynamically created through another third party system, therefore, I cannot simply use the following code (which works) as I will not know the interface name:
Code: Select all
:log info [/ip address get [/ip address find interface=<sstp-5B320413>] network]
I run the script using the "On Up" method in the PPP Profile section.
I need a way to obtain the remote IP address of the user that connects at that specific time, as I will use this to add a respective NAT entry for that IP.
I tried obtaining the interface name variable with the following, however, it doesn't work.
Code: Select all
:log info [/interface sstp-client get $int name]
Any ideas how to go about this?
Maybe I can use the sstp,ppp logs to obtain the username/interface name?
Thanks in advance.