Index: branches/WIFIDOG_1_0_X/wifidog/src/fw_iptables.c
===================================================================
--- branches/WIFIDOG_1_0_X/wifidog/src/fw_iptables.c	(revision 283)
+++ branches/WIFIDOG_1_0_X/wifidog/src/fw_iptables.c	(revision 284)
@@ -92,5 +92,9 @@
     for (auth_server = config->auth_servers; auth_server != NULL;
 		    auth_server = auth_server->next) {
-        iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", inet_ntoa(auth_server->last_ip));
+        if (auth_server->last_ip) {
+            iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", inet_ntoa(auth_server->last_ip));
+        } else {
+            iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->authserv_hostname);
+        }
     }
 
