diff --git a/heartbeat/http-mon.sh b/heartbeat/http-mon.sh
index 586051c..7346ef2 100644
--- a/heartbeat/http-mon.sh
+++ b/heartbeat/http-mon.sh
@@ -11,11 +11,13 @@
 #
 # Copyright:	(C) 2002-2005 International Business Machines
 #
+#
+# OCF parameters:
+#  OCF_RESKEY_bindaddress
 
 # default options for http clients
 # NB: We _always_ test a local resource, so it should be
 # safe to connect from the local interface.
-WGETOPTS="-O- -q -L --no-proxy --bind-address=127.0.0.1"
 CURLOPTS="-o - -Ss -L --interface lo"
 
 #
@@ -31,11 +33,27 @@ curl_func() {
 	fi
 }
 wget_func() {
+	ret=0
 	auth=""
-	cl_opts="$WGETOPTS $test_httpclient_opts"
 	[ x != "x$test_user" ] &&
 		auth="--http-user=$test_user --http-passwd=$test_password"
-	wget $auth $cl_opts "$1"
+	if [ -n "$OCF_RESKEY_bindaddress" ]; then
+		WGETOPTS="-O- -q -L --no-proxy --bind-address=$OCF_RESKEY_bindaddress"
+		cl_opts="$WGETOPTS $test_httpclient_opts"
+		wget $auth $cl_opts "$1"
+		ret=$?
+	else
+		for bind_address in 127.0.0.1 ::1 ; do
+			WGETOPTS="-O- -q -L --no-proxy --bind-address=$bind_address"
+			cl_opts="$WGETOPTS $test_httpclient_opts"
+			wget $auth $cl_opts "$1"
+			ret=$?
+			[ $ret = 0 ] && break;
+			# recent wget could [ $ret != 4 ] && break,
+			# "Network error". But older wget return 1...
+		done
+	fi
+	return $ret
 }
 #
 # rely on whatever the user provided
