[ROUTEROS 7] Get your external IP if you’re behind CGNAT

OK, so the scenario is:

  • You’re behind CGNAT and you get results like below when trying to get your external IP info:

[admin@MikroTik] > /ip address print
Flags: D – DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE, VRF
# ADDRESS NETWORK INTERFACE VRF
;;; defconf
0 192.168.88.1/24 192.168.88.0 bridge main
1 D 10.5.174.154/32 10.5.174.154 lte1 main

 

This is a way to get the public IP what you have:

[admin@MikroTik] > /tool fetch url=”https://ident.me” mode=https output=user
status: finished
code: 200
downloaded: 1KiB
total: 1KiB
duration: 0s
data: 5.14.X.X  <— your external IP

Enjoy!