mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge remote branch 'mainline/master'
Conflicts: etc/inc/filter.inc
This commit is contained in:
commit
cf9f53c827
@ -1064,6 +1064,14 @@ function filter_nat_rules_generate() {
|
||||
$natrules .= "# TFTP proxy\n";
|
||||
$natrules .= "rdr-anchor \"tftp-proxy/*\"\n";
|
||||
|
||||
if (!empty($config['system']['tftpinterface'])) {
|
||||
$tftpifs = explode(",", $config['system']['tftpinterface']);
|
||||
foreach($tftpifs as $tftpif) {
|
||||
if ($FilterIflist[$tftpif])
|
||||
$natrules .= "rdr pass on {$FilterIflist[$tftpif]['if']} proto udp from any to any port tftp -> 127.0.0.1 port 6969\n";
|
||||
}
|
||||
}
|
||||
|
||||
$interface_counter = 0;
|
||||
$vpns_list = filter_get_vpns_list();
|
||||
$direct_networks_list = filter_get_direct_networks_list();
|
||||
@ -1085,7 +1093,7 @@ function filter_nat_rules_generate() {
|
||||
// Open inetd.conf write handle
|
||||
$inetd_fd = fopen("/var/etc/inetd.conf","w");
|
||||
/* add tftp protocol helper */
|
||||
fwrite($inetd_fd, "tftp\tdgram\tudp\twait\t\troot\t/usr/local/sbin/tftp-proxy\ttftp-proxy -v\n");
|
||||
fwrite($inetd_fd, "tftp-proxy\tdgram\tudp\twait\t\troot\t/usr/local/sbin/tftp-proxy\ttftp-proxy -v\n");
|
||||
|
||||
if(isset($config['nat']['rule'])) {
|
||||
if(!isset($config['system']['disablenatreflection'])) {
|
||||
@ -2008,8 +2016,7 @@ EOD;
|
||||
# package manager late specific hook
|
||||
anchor "packagelate"
|
||||
|
||||
EOD;
|
||||
$ipfrules .= <<<EOD
|
||||
anchor "tftp-proxy/*"
|
||||
|
||||
anchor "limitingesr"
|
||||
|
||||
@ -2446,11 +2453,10 @@ function discover_pkg_rules($ruletype) {
|
||||
log_error($errorrules);
|
||||
file_put_contents("{$g['tmp_path']}/rules.packages.{$pkg_inc}", "#{$errorrules}\n");
|
||||
return "";
|
||||
} else {
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
|
||||
// vim: ts=4 sw=4 noexpandtab
|
||||
|
||||
@ -297,6 +297,7 @@ function notify_via_smtp($message) {
|
||||
$smtp->ssl = 0;
|
||||
$smtp->debug = 0;
|
||||
$smtp->html_debug = 0;
|
||||
$smtp->localhost=$config['system']['hostname'].".".$config['system']['domain'];
|
||||
|
||||
if($config['notifications']['smtp']['fromaddress'])
|
||||
$from = $config['notifications']['smtp']['fromaddress'];
|
||||
@ -345,9 +346,12 @@ function notify_via_growl($message) {
|
||||
global $config;
|
||||
$growl_ip = $config['notifications']['growl']['ipaddress'];
|
||||
$growl_password = $config['notifications']['growl']['password'];
|
||||
$growl_name = $config['notifications']['growl']['name'];
|
||||
$growl_notification = $config['notifications']['growl']['notification_name'];
|
||||
|
||||
if(!empty($growl_ip)) {
|
||||
$growl = new Growl($growl_ip, $growl_password);
|
||||
$growl->notify("pfSense growl alert", "pfSense", "{$message}");
|
||||
$growl = new Growl($growl_ip, $growl_password, $growl_name);
|
||||
$growl->notify("{$growl_notification}", "pfSense", "{$message}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,8 +368,12 @@ function register_via_growl() {
|
||||
global $config;
|
||||
$growl_ip = $config['notifications']['growl']['ipaddress'];
|
||||
$growl_password = $config['notifications']['growl']['password'];
|
||||
$growl_name = $config['notifications']['growl']['name'];
|
||||
$growl_notification = $config['notifications']['growl']['notification_name'];
|
||||
|
||||
if($growl_ip) {
|
||||
$growl = new Growl($growl_ip, $growl_password);
|
||||
$growl = new Growl($growl_ip, $growl_password, $growl_name);
|
||||
$growl->addNotification($growl_notification);
|
||||
$growl->register();
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,12 +105,11 @@ $interfaces_menu = msort(array_merge($interfaces_menu, return_ext_menu("Interfac
|
||||
// Firewall
|
||||
$firewall_menu = array();
|
||||
$firewall_menu[] = array("Aliases", "/firewall_aliases.php");
|
||||
if($config['interfaces']['lan'])
|
||||
if(count($config['interfaces']) > 1)
|
||||
$firewall_menu[] = array("NAT", "/firewall_nat.php");
|
||||
$firewall_menu[] = array("Rules", "/firewall_rules.php");
|
||||
$firewall_menu[] = array("Schedules", "/firewall_schedule.php");
|
||||
if($config['interfaces']['lan'])
|
||||
$firewall_menu[] = array("Traffic Shaper", "/firewall_shaper.php");
|
||||
$firewall_menu[] = array("Traffic Shaper", "/firewall_shaper.php");
|
||||
$firewall_menu[] = array("Virtual IPs", "/firewall_virtual_ip.php");
|
||||
$firewall_menu = msort(array_merge($firewall_menu, return_ext_menu("Firewall")),0);
|
||||
|
||||
@ -128,7 +127,7 @@ $services_menu[] = array("OLSR", "/pkg_edit.php?xml=olsrd.xml&id=0");
|
||||
$services_menu[] = array("PPPoE Server", "/vpn_pppoe.php");
|
||||
$services_menu[] = array("RIP", "/pkg_edit.php?xml=routed/routed.xml&id=0");
|
||||
$services_menu[] = array("SNMP", "/services_snmp.php");
|
||||
if($config['interfaces']['lan']) {
|
||||
if(count($config['interfaces']) > 1) {
|
||||
/* no use for UPnP in single-interface deployments
|
||||
remove to reduce user confusion
|
||||
*/
|
||||
@ -166,7 +165,7 @@ $status_menu[] = array("RRD Graphs", "/status_rrd_graph.php");
|
||||
$status_menu[] = array("Services", "/status_services.php");
|
||||
$status_menu[] = array("System Logs", "/diag_logs.php");
|
||||
$status_menu[] = array("Traffic Graph", "/status_graph.php?if=wan");
|
||||
if($config['interfaces']['lan'])
|
||||
if(count($config['interfaces']) > 1)
|
||||
$status_menu[] = array("UPnP", "/status_upnp.php");
|
||||
$ifentries = get_configured_interface_with_descr();
|
||||
foreach ($ifentries as $ent => $entdesc) {
|
||||
|
||||
@ -75,7 +75,7 @@ if ($_POST) {
|
||||
|
||||
if ((!is_ipaddr($_POST['tunnel-local-addr'])) || (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
|
||||
(!is_ipaddr($_POST['remote-addr']))) {
|
||||
$input_errors[] = "All fildes must have valid ip addresses.";
|
||||
$input_errors[] = "The tunnel local and tunnel remote fields must have valid IP addresses.";
|
||||
}
|
||||
|
||||
foreach ($a_gifs as $gif) {
|
||||
|
||||
@ -76,7 +76,7 @@ if ($_POST) {
|
||||
|
||||
if ((!is_ipaddr($_POST['tunnel-local-addr'])) || (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
|
||||
(!is_ipaddr($_POST['remote-addr']))) {
|
||||
$input_errors[] = "All fildes must have valid ip addresses.";
|
||||
$input_errors[] = "The tunnel local and tunnel remote fields must have valid IP addresses.";
|
||||
}
|
||||
|
||||
foreach ($a_gres as $gre) {
|
||||
|
||||
@ -363,18 +363,6 @@ if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", sorttable.init, false);
|
||||
}
|
||||
|
||||
/* for Internet Explorer */
|
||||
/*@cc_on @*/
|
||||
/*@if (@_win32)
|
||||
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
|
||||
var script = document.getElementById("__ie_onload");
|
||||
script.onreadystatechange = function() {
|
||||
if (this.readyState == "complete") {
|
||||
sorttable.init(); // call the onload handler
|
||||
}
|
||||
};
|
||||
/*@end @*/
|
||||
|
||||
/* for Safari */
|
||||
if (/WebKit/i.test(navigator.userAgent)) { // sniff
|
||||
var _timer = setInterval(function() {
|
||||
|
||||
@ -121,6 +121,11 @@ if ($_POST) {
|
||||
else
|
||||
unset($config['system']['disablescrub']);
|
||||
|
||||
if ($_POST['tftpinterface'])
|
||||
$config['system']['tftpinterface'] = implode(",", $_POST['tftpinterface']);
|
||||
else
|
||||
unset($config['system']['tftpinterface']);
|
||||
|
||||
write_config();
|
||||
|
||||
/*
|
||||
@ -287,7 +292,7 @@ function update_description(itemnum) {
|
||||
<tr>
|
||||
<td colspan="2" class="list" height="12"> </td>
|
||||
</tr>
|
||||
<?php if($config['interfaces']['lan']): ?>
|
||||
<?php if(count($config['interfaces']) > 1): ?>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic">Network Address Translation</td>
|
||||
</tr>
|
||||
@ -305,6 +310,20 @@ function update_description(itemnum) {
|
||||
<strong>Enter value for Reflection timeout in seconds.</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">TFTP Proxy</td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="tftpinterface[]" multiple="true" class="formselect" size="3">
|
||||
<?php
|
||||
$ifdescs = get_configured_interface_with_descr();
|
||||
foreach ($ifdescs as $ifent => $ifdesc):
|
||||
?>
|
||||
<option value="<?=$ifent;?>" <?php if (stristr($pconfig['tftpinterface'], $ifent)) echo "selected"; ?>><?=gettext($ifdesc);?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<strong>Choose the interfaces where you want TFTP proxy help to be enabled.</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="list" height="12"> </td>
|
||||
</tr>
|
||||
|
||||
@ -46,6 +46,17 @@ if($config['notifications']['growl']['password'])
|
||||
if($config['notifications']['growl']['ipaddress'])
|
||||
$pconfig['ipaddress'] = $config['notifications']['growl']['ipaddress'];
|
||||
|
||||
if($config['notifications']['growl']['notification_name'])
|
||||
$pconfig['notification_name'] = $config['notifications']['growl']['notification_name'];
|
||||
else
|
||||
$pconfig['notification_name'] = 'pfSense growl alert';
|
||||
|
||||
if($config['notifications']['growl']['name'])
|
||||
$pconfig['name'] = $config['notifications']['growl']['name'];
|
||||
else
|
||||
$pconfig['name'] = 'PHP-Growl';
|
||||
|
||||
|
||||
// SMTP
|
||||
if($config['notifications']['smtp']['ipaddress'])
|
||||
$pconfig['smtpipaddress'] = $config['notifications']['smtp']['ipaddress'];
|
||||
@ -81,6 +92,8 @@ if ($_POST) {
|
||||
// Growl
|
||||
$config['notifications']['growl']['ipaddress'] = $_POST['ipaddress'];
|
||||
$config['notifications']['growl']['password'] = $_POST['password'];
|
||||
$config['notifications']['growl']['name'] = $_POST['name'];
|
||||
$config['notifications']['growl']['notification_name'] = $_POST['notification_name'];
|
||||
|
||||
// SMTP
|
||||
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress'];
|
||||
@ -147,6 +160,20 @@ include("head.inc");
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic">Growl</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Registration Name</td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name='name' value='<?php echo $pconfig['name']; ?>'><br/>
|
||||
Enter the name to register with the Growl server (default: PHP-Growl).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Notification Name</td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name='notification_name' value='<?php echo $pconfig['notification_name']; ?>'><br/>
|
||||
Enter a name for the Growl notifications (default: pfSense growl alert).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">IP Address</td>
|
||||
<td width="78%" class="vtable">
|
||||
|
||||
@ -1178,7 +1178,7 @@ function netbios_change() {
|
||||
<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="10%" class="listhdrr">Disabled</td>
|
||||
<td width="10%" class="listhdrr">Protocol</td>
|
||||
<td width="10%" class="listhdrr">Protocol / Port</td>
|
||||
<td width="30%" class="listhdrr">Tunnel Network</td>
|
||||
<td width="40%" class="listhdrr">Description</td>
|
||||
<td width="10%" class="list"></td>
|
||||
@ -1195,7 +1195,7 @@ function netbios_change() {
|
||||
<?=$disabled;?>
|
||||
</td>
|
||||
<td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
|
||||
<?=htmlspecialchars($server['protocol']);?>
|
||||
<?=htmlspecialchars($server['protocol']);?> / <?=htmlspecialchars($server['local_port']);?>
|
||||
</td>
|
||||
<td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
|
||||
<?=htmlspecialchars($server['tunnel_network']);?>
|
||||
@ -1260,4 +1260,4 @@ function set_checked($var,& $chk) {
|
||||
$chk = '';
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user