Advanced -> Scrub", "pfSenses scrub option has been disabled. See http://www.openbsd.org/faq/pf/scrub.html for more info.", "Scrub"); // $config['system']['scrubnodf'] = "enabled"; // write_config(); filter_configure(); } function frickin_custom_php_deinstall_command() { global $config; // unset($config['system']['scrubnodf']); // file_notice("System -> Advanced -> Scrub", "pfSenses scrub option has been enabled. See http://www.openbsd.org/faq/pf/scrub.html for more info.", "Scrub"); // write_config(); unlink_if_exists("/usr/local/etc/rc.d/frickin.sh"); unlink_if_exists("/usr/local/bin/frickin"); mwexec("killall frickin"); filter_configure(); } function frickin_generate_rules($type) { global $config; $rules = ""; $frickin_conf = $config['installedpackages']['frickin']['config'][0]; if (!is_process_running('frickin')) { log_error("Frickin is installed but not started. Not installing redirect rules."); return; } $ifaces = explode(',', $frickin_conf['active_interface']); $ifaces = array_map('convert_friendly_interface_to_real_interface_name', $ifaces); switch($type) { case 'nat': foreach ($ifaces as $iface) { if(!$iface) { //log_error("Not installing frickin pptp proxy rule. Please set it up"); //continue; } $rules .= "rdr on $iface proto tcp from any to any port = 1723 -> 127.0.0.1\n"; $rules .= "rdr on $iface inet proto gre all -> 127.0.0.1\n"; } break; case 'filter': $ext_if = get_real_wan_interface(); $rules .= "pass out on $ext_if proto gre from any to any keep state\n"; $rules .= "pass in on $ext_if proto gre from any to any keep state\n"; break; default: break; } return $rules; } ?>