Checking WAN IP - Possibly forwarding to FreeRadius

Good morning.

I’ve only as of the beginning of this week been exposed to the Routerboard750 and thus RouterOS in general.

Now I’ve been asked to come up with a billing solution, directly linked to WAN IP issues to the Mikrotik 750, by the Router it is attached to.


Is there any possible way to check the WAN IP, either via the terminal or Winbox?


And then if so, how would I go about forwarding that information to FreeRadius for billing purposes?


Thanks in advance.

Welcome to the MikroTik forum!

You should be able to see the addresses in “/ip address”. I use the CLI, but it is not difficult to translate to WinBox.

The hotspot is the service I use with FreeRADIUS. No problems with what you want to do. Take a look at the wiki (FAQ and Examples link at the top of this page) and the manual. Should be some good stuff for you in both. If you have any questions, this is the place to ask.

Well “/ip address” gives back the Local IP address provided to the Gateway (Port 1) via DHCP.

However what I’m looking for is that actual WAN IP connection made to the world outside, as we need that to make billing easier via the FreeRadius database.

Effectively I want the feedback I would get if I ran a WhatIsMyIP query on my own machine, but from the Mikrotik itself.


I am most certainly not a networking expert by any means, so please treat me like a pure n00b.

I don’t use the public ip addresses as much as the “radius-location-name” in the “/ip hotspot profile” settings. Does your public ip change when you use WhatisMyIp? Your ISP’s connection should be static. Once you get that public ip, it shouldn’t change. Your private IP might change tho. You might want to check with your ISP about the public address just to be certain.

Unfortunately this isn’t for our own network, but rather for roll out to clients.

And effectively they get a Static (but Dynamically assigned) IP address.

We have access to this information, but it’s a very manual process at present as we can’t get Radius to pick up on the information, and thus include it in queries to the Radius database.

Thus I was hoping there would be some way to get the Mikrotik to forward such information, and if I could at least know that it’s possible to get the WAN IP from the Mikrotik, then we could have our DBA scratch further for a solution.

I use “radius-location-name” for that. I can restrict users to a specific AP or set of APs with FreeRADIUS in this manner. I use the RADIUS “WISPr-Location-Name” parameter in the radcheck table with the “radius-location-name” in the hotspot profile. These must match to login.
I also change the hotspot name from “hotspot1” to something more useful. It also shows up in the RADIUS database.
Any of those help?

Hmm, using a unique Hotspot name might work, but I’m not sure it will quite solve the problem.

We will effectively run one “open” network on one of the ports, and then a Hotspot-based network on another.

We ultimately need the WAN IP to see where it came from, all of it, not just the hotspot.

I get all the info from Nas-IP-Address and Framed-IP-Address and so on.

Effectively I just need a third one “Wan-IP-Address” and have that register in the Radius Database.