diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a836a86..901a86b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,8 @@
- Show admins the email server error message when email sending fails
- Fix issue where the current theme cannot be found in list of themes
- Fix page preview so that it accounts for the provided format
+- Add links from User/Team Profile IP addresses to a User IP address search page
+- Add city geolocation to Team Profile IP addresses
**API**
diff --git a/CTFd/themes/admin/templates/modals/teams/addresses.html b/CTFd/themes/admin/templates/modals/teams/addresses.html
index aacd8a2d..bbc22f58 100644
--- a/CTFd/themes/admin/templates/modals/teams/addresses.html
+++ b/CTFd/themes/admin/templates/modals/teams/addresses.html
@@ -1,40 +1,49 @@
-
-
-
-
- | User |
- IP Address |
- Last Seen |
- Country |
-
-
-
- {% for addr in addrs %}
-
- |
-
- {{ addr.user.name }}
-
- |
- {{ addr.ip }} |
-
-
- |
- {% set country = lookup_ip_address(addr.ip) %}
- {% if country %}
-
-
-
- {{ lookup_country_code(country) }}
- |
- {% else %}
-
- |
- {% endif %}
-
- {% endfor %}
-
-
-
+
+
+
+
+ | User |
+ IP Address |
+ Last Seen |
+ City |
+ Country |
+
+
+
+ {% for addr in addrs %}
+
+ |
+
+ {{ addr.user.name }}
+
+ |
+
+
+ {{ addr.ip }}
+
+ |
+
+
+ |
+ {% set city = lookup_ip_address_city(addr.ip) %}
+
+ {% if city %}{{ city }}{% endif %}
+ |
+ {% set country = lookup_ip_address(addr.ip) %}
+
+ {% if country %}
+
+
+ {{ lookup_country_code(country) }}
+ {% endif %}
+ |
+
+ {% endfor %}
+
+
+
+ IP Geolocation by DB-IP
+
+
diff --git a/CTFd/themes/admin/templates/modals/users/addresses.html b/CTFd/themes/admin/templates/modals/users/addresses.html
index c0e60023..4012e3a9 100644
--- a/CTFd/themes/admin/templates/modals/users/addresses.html
+++ b/CTFd/themes/admin/templates/modals/users/addresses.html
@@ -12,7 +12,11 @@
{% for addr in addrs %}
- | {{ addr.ip }} |
+
+
+ {{ addr.ip }}
+
+ |
|