Community discussions

MikroTik App
 
etienneschwiz
just joined
Topic Author
Posts: 4
Joined: Thu May 10, 2018 7:20 pm

Get dynamic names of SSTP

Thu May 10, 2018 7:31 pm

Hi,

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:
: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.
: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.

Who is online

Users browsing this forum: No registered users and 20 guests