"; break; } $_GET['int'] = easyrule_find_rule_interface($_GET['int']); if ($_GET['int'] === false) { $message .= "Invalid interface for block rule: " . htmlspecialchars($_GET['int']) . "
"; break; } if (easyrule_block_host_add($_GET['src'], $_GET['int'])) { /* shouldn't get here, the function will redirect */ $message .= "Host added successfully" . "
"; } else { $message .= "Failed to create block rule, alias, or add host." . "
"; } } else { $message .= "Tried to block but had no host IP or interface
"; } break; case 'pass': /* Check for valid int, srchost, dsthost, dstport, and proto */ if (isset($_GET['int']) && isset($_GET['proto']) && isset($_GET['src']) && isset($_GET['dst'])) { $_GET['int'] = easyrule_find_rule_interface($_GET['int']); if ($_GET['int'] === false) { $message .= "Invalid interface for pass rule: " . htmlspecialchars($_GET['int']) . "
"; break; } if (getprotobyname($_GET['proto']) == -1) { $message .= "Invalid protocol for pass rule: " . htmlspecialchars($_GET['proto']) . "
"; break; } if (!is_ipaddr($_GET['src'])) { $message .= "Tried to pass invalid source IP: " . htmlspecialchars($_GET['src']) . "
"; break; } if (!is_ipaddr($_GET['dst'])) { $message .= "Tried to pass invalid destination IP: " . htmlspecialchars($_GET['dst']) . "
"; break; } if (($_GET['proto'] != 'icmp') && !isset($_GET['dstport'])) { $message .= "Missing destination port: " . htmlspecialchars($_GET['dstport']) . "
"; break; } if ($_GET['proto'] == 'icmp') { $_GET['dstport'] = 0; } if (!is_numeric($_GET['dstport']) || ($_GET['dstport'] < 0) || ($_GET['dstport'] > 65536)) { $message .= "Tried to pass invalid destination port: " . htmlspecialchars($_GET['dstport']) . "
"; break; } /* Should have valid input... */ if (easyrule_pass_rule_add($_GET['int'], $_GET['proto'], $_GET['src'], $_GET['dst'], $_GET['dstport'])) { /* Shouldn't get here, the function should redirect. */ $message .= "Successfully added pass rule!" . "
"; } else { $message .= "Failed to add pass rule." . "
"; } } else { $message = "Missing parameters for pass rule"; break; } break; } } if(stristr($retval, "error") == true) $message = $retval; include("head.inc"); ?>


Message:
This is the Easy Rule status page, mainly used to display errors when adding rules. If you are seeing this, there apparently was not an error, and you navigated to the page directly without telling it what to do.

This page is meant to be called from the block/pass buttons on the Firewall Logs page, Status > System Logs, Firewall Tab.