From: mkasper Date: Sat, 7 Jan 2006 22:52:54 +0000 (+0000) Subject: Import m0n0wall 1.2b3 files. X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a9c39891ce6e8b50e484c88b8c565771adea517;p=m0n0chwall.git Import m0n0wall 1.2b3 files. git-svn-id: https://svn.m0n0.ch/wall/trunk@10 e36fee2c-cc09-0410-a7cc-ebac5c6737de --- diff --git a/captiveportal/index.php b/captiveportal/index.php index c264625..497e506 100644 --- a/captiveportal/index.php +++ b/captiveportal/index.php @@ -119,7 +119,7 @@ EOD; if (isset($config['captiveportal']['httpslogin'])) $htmltext = str_replace("\$PORTAL_ACTION\$", "https://{$config['captiveportal']['httpsname']}:8001/", $htmltext); else - $htmltext = str_replace("\$PORTAL_ACTION\$", "", $htmltext); + $htmltext = str_replace("\$PORTAL_ACTION\$", "http://{$config['interfaces'][$config['captiveportal']['interface']]['ipaddr']}:8000/", $htmltext); if (preg_match("/redirurl=(.*)/", $orig_request, $matches)) $redirurl = urldecode($matches[1]); diff --git a/phpconf/inc/captiveportal.inc b/phpconf/inc/captiveportal.inc index d5d78b1..f12f1da 100644 --- a/phpconf/inc/captiveportal.inc +++ b/phpconf/inc/captiveportal.inc @@ -78,8 +78,9 @@ function captiveportal_configure() {

m0n0wall captive portal

This is the default captive portal page. Please upload your own custom HTML file on the Services: Captive portal screen in the m0n0wall webGUI.

-
+ +
diff --git a/phpconf/inc/filter.inc b/phpconf/inc/filter.inc index f1eb24c..9b41729 100644 --- a/phpconf/inc/filter.inc +++ b/phpconf/inc/filter.inc @@ -55,6 +55,7 @@ function filter_configure() { $tcpidletimeout = $config['filter']['tcpidletimeout']; mwexec("/sbin/sysctl net.inet.ipf.fr_tcpidletimeout={$tcpidletimeout}"); mwexec("/sbin/sysctl net.inet.ipf.fr_tcphalfclosed=480"); + mwexec("/sbin/sysctl net.inet.ipf.fr_udpacktimeout=240"); /* SIP... */ /* generate ipnat rules */ $ipnatrules = filter_nat_rules_generate(); @@ -379,12 +380,14 @@ EOD; unset($sa); if ($route['interface'] == "lan") { + $ip = $lanip; $sa = $lansa; $sn = $lansn; $if = $lanif; } else if (strstr($route['interface'], "opt")) { $oc = $optcfg[$route['interface']]; if ($oc['ip']) { + $ip = $oc['ip']; $sa = $oc['sa']; $sn = $oc['sn']; $if = $oc['if']; @@ -393,6 +396,7 @@ EOD; if ($sa) { $ipfrules .= << $paents) { + if ($paif == "wan" && !(is_ipaddr($config['interfaces']['wan']['ipaddr']) || + ($config['interfaces']['wan']['ipaddr'] == "dhcp") || + ($config['interfaces']['wan']['ipaddr'] == "bigpond"))) + continue; + + $args = $config['interfaces'][$paif]['if'] . " auto"; + + foreach ($paents as $paent) { + if (isset($paent['network'])) + $args .= " " . escapeshellarg($paent['network']); + else if (isset($paent['range'])) + $args .= " " . escapeshellarg($paent['range']['from'] . "-" . + $paent['range']['to']); + } + + mwexec_bg("/usr/local/sbin/choparp " . $args); } + } +} + +function services_dnsupdate_process() { + global $config, $g; + + /* Dynamic DNS updating active? */ + if (isset($config['dnsupdate']['enable'])) { - mwexec_bg("/usr/local/sbin/choparp " . $args); + $wanip = get_current_wan_address(); + if ($wanip) { + + $keyname = $config['dnsupdate']['keyname']; + /* trailing dot */ + if (substr($keyname, -1) != ".") + $keyname .= "."; + + $hostname = $config['dnsupdate']['host']; + /* trailing dot */ + if (substr($hostname, -1) != ".") + $hostname .= "."; + + /* write private key file + this is dumb - public and private keys are the same for HMAC-MD5, + but nsupdate insists on having both */ + $fd = fopen("{$g['varetc_path']}/K{$keyname}+157+00000.private", "w"); + $privkey .= << diff --git a/phpconf/inc/system.inc b/phpconf/inc/system.inc index d2c0b33..2333f23 100644 --- a/phpconf/inc/system.inc +++ b/phpconf/inc/system.inc @@ -226,7 +226,7 @@ EOD; if (isset($syslogcfg['system'])) { $syslogconf .= << attempt DNS update */ + if (is_ipaddr($config['interfaces']['wan']['ipaddr'])) + services_dnsupdate_process(); + /* start DHCP service */ services_dhcpd_configure(); diff --git a/phpconf/rc.newwanip b/phpconf/rc.newwanip index a9bf510..d61069e 100644 --- a/phpconf/rc.newwanip +++ b/phpconf/rc.newwanip @@ -73,6 +73,9 @@ if ($config['interfaces']['wan']['ipaddr'] == "bigpond") interfaces_wan_bigpond_configure($curwanip); + /* perform RFC 2136 DNS update */ + services_dnsupdate_process(); + /* write current WAN IP to file */ $fd = @fopen("{$g['vardb_path']}/wanip", "w"); if ($fd) { diff --git a/webgui/block.gif b/webgui/block.gif index df95240..fafb63c 100644 Binary files a/webgui/block.gif and b/webgui/block.gif differ diff --git a/webgui/block_d.gif b/webgui/block_d.gif index 2d3d980..03d9ab0 100644 Binary files a/webgui/block_d.gif and b/webgui/block_d.gif differ diff --git a/webgui/diag_backup.php b/webgui/diag_backup.php index 888651c..bc4d9d4 100644 --- a/webgui/diag_backup.php +++ b/webgui/diag_backup.php @@ -85,28 +85,28 @@ if ($_POST) {
- +
- - + + + + + - - + +
Backup configuration
  +  

Click this button to download the system configuration in XML format.

- -
-  
-  

Restore configuration
  -

Open a m0n0wall configuration XML file and click the button +

  + Open a m0n0wall configuration XML file and click the button below to restore the configuration.

Note:
@@ -116,8 +116,7 @@ if ($_POST) {

-

-
diff --git a/webgui/diag_logs.php b/webgui/diag_logs.php index fe4d41a..e28c36d 100644 --- a/webgui/diag_logs.php +++ b/webgui/diag_logs.php @@ -64,14 +64,14 @@ function dump_clog($logfile, $tail, $withorig = true) { -<?=gentitle("Diagnostics: System logs");?> +<?=gentitle("Diagnostics: Logs");?> -

Diagnostics: System logs

+

Diagnostics: Logs