diff --git a/includes/mollom.class.inc b/includes/mollom.class.inc
index b75020e..3978c1b 100644
--- a/includes/mollom.class.inc
+++ b/includes/mollom.class.inc
@@ -392,7 +392,13 @@ abstract class Mollom {
       // Add OAuth request parameters.
       $query = $this->addAuthentication($method, $server, $path, $data, $headers);
 
+      debug($method);
+      debug($server);
+      debug($path);
+      debug($query);
+      debug($headers);
       $response = $this->request($method, $server, $path, $query, $headers);
+      debug($response);
 
       // Determine basic error condition based on HTTP status code.
       $response->isError = ($response->code < 200 || $response->code >= 300);
@@ -893,7 +899,7 @@ abstract class Mollom {
     if (!isset($publicKey)) {
       $publicKey = $this->publicKey;
     }
-    $result = $this->query('POST', 'site/' . $this->publicKey, $data, array('site', 'publicKey'));
+    $result = $this->query('POST', 'site/' . $publicKey, $data, array('site', 'publicKey'));
     return isset($result['site']) ? $result['site'] : $result;
   }
 
@@ -917,6 +923,38 @@ abstract class Mollom {
   }
 
   /**
+   * Verifies the IP address detection mechanism of this client.
+   *
+   * Determining the IP address of a post author vs. the client's own IP address
+   * can be problematic if there is a reverse-proxy or possibly even an entire
+   * network of reverse-proxies in front of the client. This method allows a
+   * client to verify it determines the correct *inbound* IP address of visitors.
+   * The flow is this:
+   *
+   * - Client issues a request to
+   *   mollom://site/{publicKey}/ping?url=http://example.com/mollom/pong
+   * - Mollom server pings back to the given URL and provides its own IP; e.g.,
+   *   http://example.com/mollom/pong?ip=123.123.123.123
+   * - Client determines the IP as it normally would, and compares its own
+   *   result with the 'ip' parameter provided by the server. If that is
+   *   different, then it is sending wrong IP addresses.
+   *
+   * This ping-pong facility requires authentication. The client needs to
+   * implement a route to handle the inbound request, including the 'ip' query
+   * parameter.
+   *
+   * @param string $url
+   *   The URL to issue an HTTP request to. This endpoint gets the additional
+   *   query parameter 'ip', which holds the IP address of the Mollom server.
+   */
+  public function verifyIP($url) {
+    $data['url'] = (string) $url;
+    $suffix = '?url=' . rawurlencode($url);
+    $result = $this->query('POST', 'site/' . $this->publicKey . '/ping' . $suffix, $data);
+    return $result;
+  }
+
+  /**
    * Deletes a site.
    *
    * @param string $publicKey
diff --git a/mollom.admin.inc b/mollom.admin.inc
index 5946ad8..f5fd0c5 100644
--- a/mollom.admin.inc
+++ b/mollom.admin.inc
@@ -10,6 +10,8 @@
  */
 function mollom_admin_form_list() {
   _mollom_testing_mode_warning();
+  $result = mollom()->verifyIP(url('mollom/pong', array('absolute' => TRUE)));
+  debug($result);
 
   // Reset the cached list of protected forms.
   mollom_form_cache(TRUE);
@@ -838,3 +840,7 @@ function mollom_reports_page($form, &$form_state) {
   return $form;
 }
 
+function mollom_admin_verify_ip() {
+  debug($_GET);
+  debug(ip_address());
+}
diff --git a/mollom.module b/mollom.module
index 22ab9ce..b5cedc5 100644
--- a/mollom.module
+++ b/mollom.module
@@ -283,6 +283,13 @@ function mollom_menu() {
     'type' => MENU_CALLBACK,
   );
 
+  $items['mollom/pong'] = array(
+    'page callback' => 'mollom_admin_verify_ip',
+    'access callback' => TRUE,
+    'file' => 'mollom.admin.inc',
+    'type' => MENU_CALLBACK,
+  );
+
   return $items;
 }
 
