ispmanager 6 lite, pro, host

Determining location via IP address

This article describes how to configure and use the GeoIP module to determine a location based on an IP address.

Configuring alert settings

Go to Settings → Alerts menu.

Configure alerts to be sent via an external mail server or a Telegram bot. To send alerts via email, select External mail server in the Mail server type field.

  • SMTP server address — the address of the mail server that will be used to send alerts.
  • Account — the email address from which alerts will be sent.
  • Password — the password for the account.
  • SMTP server port — the SMTP port on the mail server, the default is 25.
  • Sender name — the name that will be added to emails by default.
  • Server name — the domain name of the server, which will be included in email messages.

Once you click Save, all entered data will be saved to the panel's configuration file.

Configuring user settings

Open the User settings section.

  • Email — the email address used for sending alerts;

    When this value is changed, a confirmation email will be sent to the specified address. Alerts will only be sent to an email address after it has been confirmed.

  • Enable GeoIP module notifications — an option to receive notifications (based on the GeoIP module) regarding the user's region upon login;

    If the GeoIP option is disabled, any previously saved user location data will be deleted.

  • Enable successful login notifications — an option to receive notifications when a successful login occurs;
  • Enable password recovery notifications — an option to receive notifications regarding password recovery;
  • Enable free space notifications — an option to receive alerts when disk space or mailbox storage is running low;
  • nable DNSSEC extension notifications — an option to send notifications from the DNSSEC extension of the DNS server.

Operation principle

This feature utilizes MaxMind databases, which are stored in the /usr/share/GeoIP/ directory. These databases are installed the first time the Enable GeoIP option is activated.

Once the User settings form is saved, the account's current location—determined by its IP address—is recorded.

During any subsequent login attempt, if the new location differs from the previously recorded one, the account will be locked. An email containing instructions on how to unlock the account will be sent to the address specified in the settings.

After the account is unlocked, the recorded location will be updated to the current one.

If the databases are missing at the time of a login attempt, the account will remain locked.

If an account is locked and no email with a confirmation code has been received:

To remove the lock:

  1. Connect to the server via SSH.
  2. Delete the line "GeoIpRegion reg" from the user's configuration file: /usr/local/mgr5/var/userconf/ispmgr.USER 

    Details

    USER — refers to the user's name or identifier in the control panel; reg — represents the account's region, as determined by the IP address when GeoIP was enabled.

  3. Restart the control panel:

    /usr/local/mgr5/sbin/mgrctl -m ispmgr exit