Commit Graph

25363 Commits

Author SHA1 Message Date
Chris Buechler
c03512f5b2 include vpn.inc so IPsec CRL reload works. require_once filter.inc in
vpn.inc for callers there that haven't already included it.
2015-07-23 14:34:33 -05:00
Chris Buechler
b0deba232b Most of the flowtable bits were removed some time ago, take out the last of them too. 2015-07-23 00:32:14 -05:00
Chris Buechler
fa944e1dde When a CRL is updated, refresh strongswan's CRLs. 2015-07-23 00:20:46 -05:00
Chris Buechler
85cf3f4f78 Merge pull request #1775 from phil-davis/Interfaces-Widget-2-2 2015-07-22 21:59:01 -05:00
Phil Davis
241c48ef27 Add isset check for strictcrlpolicy
To be consistent with the checks in the rest of this code.
2015-07-22 21:57:54 -05:00
Chris Buechler
bfc1c4b0d5 make the IPsec bypass LAN from LAN subnet to LAN subnet rather than from
LAN subnet to LAN IP. Same end result except it'll work for VIPs on same
interface now.
2015-07-22 15:10:01 -05:00
Chris Buechler
7361628b2a Add IPsec advanced option for strict CRL checking 2015-07-22 15:03:20 -05:00
Chris Buechler
cc31dc7a19 fix typo 2015-07-22 13:32:35 -05:00
Phil Davis
b3bcc72952 Handle IPsec Advanced Settings save before IPsec is enabled
If the Advanced Settings are saved before any other IPsec is set up then $config['ipsec'] can be just the empty string. As a result you can get:
a) If you select some debug settings then those are not saved. The code to save those settings was only executed when $config['ipsec'] was already an array. Actually the code already did the necessary "if isset() then unset()" stuuf. So I just took the the "if is_array()" away from the code block.

b) Some potential unset() can go wrong with errors like:
Fatal error: Cannot unset string offsets in /usr/local/www/vpn_ipsec_settings.php on line 168
This is corrected by adding more "if (isset())" checks.

Fixes Redmine #4865
Conflicts:
	usr/local/www/vpn_ipsec_settings.php
2015-07-22 13:24:24 -05:00
Chris Buechler
5bded426ab write out built-in CRLs for strongswan 2015-07-22 13:05:22 -05:00
Phil Davis
d97992c75c Interfaces widget use more obscure separator RELENG_2_2
Redmine #4859 fix for RELENG_2_2
2015-07-22 10:53:57 +05:45
Phil Davis
8c378f3fd2 Unset old CA and Cert in left system config
Unset any old CA and Cert in the system section that might still be there from when upgrade_066_to_067 did not unset them. That will tidy up old configs that had the conversion done originally but these old sections were left behind.
2015-07-21 19:25:40 -05:00
Phil Davis
ebd900f946 Allocate dnpipe and dnqueue numbers even if no filter rules
It would be quite unusual to have no filter rules array, but if that is indeed the case then the first part of this code that sets dnpipe and dnqueue numbers should execute anyway.
2015-07-21 13:51:19 -03:00
Phil Davis
2abf33edb2 Captive Portal zoneid upgrade fix var name typo
With the typo, this empty() test would always have been true. So maybe on upgrade some existing captive portal zoneid values have been getting overwritten by this even number counter? Or?
2015-07-21 13:41:20 -03:00
jim-p
685c323cb1 Add "netstat -ni" to status.php 2015-07-21 08:44:12 -04:00
jim-p
58fb43263a Allow pre-filling (but no automatic action) of the download filename on exec.php. Setup a link to download the status output.tgz in status.php 2015-07-21 08:43:17 -04:00
Chris Buechler
f5b3758860 fix indent my editor broke in my earlier commit 2015-07-21 00:22:44 -05:00
Chris Buechler
68ebb88416 Add IPsec IKE Intermediate EKU to server certificates. The serverAuth EKU already added suffices for Windows clients, though strongswan docs suggest setting this as well. 2015-07-20 23:46:07 -05:00
Chris Buechler
b27567ca40 Specify keyUsage and extendedKeyUsage in openssl.cnf, use crl_ext. 2015-07-20 20:20:49 -05:00
doktornotor
99f89b047c Fix caps 2015-07-19 08:09:41 -03:00
doktornotor
31268c873b Bug #4551 - consistent usage of Forwarder/Resolver across the WebGUI
Clarify that this applies to DNS Resolver as well. Update the translations template.
2015-07-19 08:09:23 -03:00
doktornotor
bc8cf469df Bug #4551 - consistent usage of Forwarder/Resolver across the WebGUI
Clarify that this applies to DNS Resolver as well.
2015-07-19 08:09:08 -03:00
doktornotor
f9e30314cb Bug #4551 - consistent usage of Forwarder/Resolver across the WebGUI
Clarify that this applies to DNS Resolver as well.
2015-07-19 08:07:26 -03:00
Renato Botelho
2d6713ef46 Merge pull request #1762 from doktornotor/patch-3 2015-07-18 13:26:17 -03:00
Renato Botelho
c4f9f44941 Merge pull request #1756 from phil-davis/traffic-graph-widget-2-2 2015-07-18 13:12:14 -03:00
Phil Davis
49fc1967c6 Really avoid error loading rules for numeric host name in alias
Create a host-type alias. Put just a number in "IP or FQDN" - e.g. I made alias name "Zqw" and a single host "23". The webGUI reports:
There were error(s) loading the rules: /tmp/rules.debug:44: syntax error - The line in question reads [44]: table { 23 }
and /tmp/rules.debug has:
table { 23 }
Zqw = ""
which pf does not cope with.
This change will differentiate between a number in the context of a port alias and a number that is_hostname.
This time I think it really works :) The call to alias_get_type() needed to send the alias name as parameter. alias_get_type() is a bit expensive - it scans through the whole list of aliases looking for a match on the name. So I made this code just call it once for the name and then use that $alias_type var each time as it loops through all the addresses in an alias.
I have tried this successfully with a few combinations of nested port/host/network aliases. But maybe there is some wacky combination of nested aliases possible that could still break this? I don't see how, but it needs testing on some configs that have all sorts of nested alias types.
2015-07-18 12:58:34 -03:00
Renato Botelho
642e925fa1 Merge pull request #1761 from doktornotor/patch-2 2015-07-18 12:43:09 -03:00
doktornotor
8e16582894 Add labels to some default firewall rules
... so that people can get useful descriptions in the System Logs - Firewall GUI, instead of useless tracker numbers.
2015-07-18 11:42:20 +02:00
Chris Buechler
6eb520938c Handle OpenVPN bound to gateway groups using CARP IPs in rc.carpmaster/backup. Ticket #4854 2015-07-18 04:24:58 -05:00
doktornotor
6d854579eb Fix Firewall - Aliases GUI inconsistencies for URL Table type aliases
The GUI should show descriptions according to what's selected from the dropdown, but currently does not for URL Table (IPs) and URL Table (Ports) type of aliases.

This is for RELENG_2_2 branch.
2015-07-17 22:37:02 +02:00
Renato Botelho
896b851013 Fixes for IPSec ASN1.DN, ticket #4792
- Do not add leftid to confir when value is empty
- When asn1dn param is in binary form, explicit type
- Always add double quotes for asn1dn
2015-07-17 15:16:23 -03:00
Chris Buechler
4df4c7d6b5 Only add outgoing-interface if IP. Ticket #4852 2015-07-17 13:00:27 -05:00
Renato Botelho
e4b7410b9b Fix #4794:
- Add a upgrade code to fix asn1dn string format to match strongSwan needs
- Bump config version to 11.8
2015-07-17 09:51:15 -03:00
Chris Buechler
d6908784ee Contrary to some reports this is actually usable in some cases, just not
mandatory. Revert "myid_data and peerid_data fields are not relevant with asn1dn."

This reverts commit b8754cc85d.
2015-07-16 17:22:59 -05:00
Chris Buechler
b8754cc85d myid_data and peerid_data fields are not relevant with asn1dn. 2015-07-16 17:16:15 -05:00
Phil Davis
693c13cb74 Restrict serial ports glob to cua followed by alpha
Improve this a little more to match only alpha after /dev/cua (/dev/cuau for example)
2015-07-16 16:03:02 -03:00
Phil Davis
3eed76d729 Make serial ports glob cope with many more possibilities
It originally coped with things like cuau1 cuau1.1
Then I made it cope with things like cuau1 cuau11 but it stopped working for cuau1.1
This one copes with:
cuau1
cuau1.1
cuau1.11
cuau11
cuau11.1
cuau11.11
That should allow for all sorts of reasonable device name files without matching other stuff in /dev (like cuau1.init cuau1.lock) that we need to ignore.
Please think if I have covered the bases here.
2015-07-16 16:03:02 -03:00
Renato Botelho
31ae45d253 Add leftid and rightid value between double quotes on ipsec config when type is asn1dn. Ticket #4792 2015-07-16 15:56:45 -03:00
Chris Buechler
088af065f5 Remove old, unused NetUtils.js 2015-07-16 11:44:47 -05:00
Renato Botelho
d423b1d781 Revert "Avoid error loading rules for numeric host name in alias"
This reverts commit 6605035f9d.
2015-07-15 19:34:14 -03:00
Renato Botelho
bb68cbbb47 Merge pull request #1755 from phil-davis/patch-2 2015-07-15 13:50:16 -03:00
Phil Davis
dea04167b4 Display any advanced DHCP server settings RELENG_2_2
Cherry pick of 90ad3a76ed
2015-07-15 22:25:12 +05:45
Renato Botelho
36b622c3ae Merge pull request #1754 from phil-davis/cr_2_2 2015-07-15 13:27:53 -03:00
Phil Davis
3e41547819 Cancel button after input error for RELENG_2_2 2015-07-15 21:41:33 +05:45
Phil Davis
f8bcdede22 Fix issue_ip_type var name spelling
Actually there was no real problem, but having a mis-spelling like this means that English speakers will waste time (like I did) double-checking to see if the mis-spelling would cause a real problem.
2015-07-15 12:05:16 -03:00
Phil Davis
4433cf85f6 Firewall Aliases Import display error message for invalid alias name
If you open firewall_aliases_import and enter just an invalid Alias Name (e.g. a$b) and press save or press save with all fields empty, then the screen redraws but the input error(s) is not displayed.
This fixes it.
2015-07-15 12:04:18 -03:00
Phil Davis
043e61ee1b Firewall Aliases Edit ensure input_addresses array exists
If you click "+" to add an alias, then press Save without entering anything, you get:
Warning: Invalid argument supplied for foreach() in /usr/local/www/firewall_aliases_edit.php on line 402
as well as the various messages related to $input_errors.
This change ensures that $input_addresses array always exists (even if it has no real entries) so that the foreach() warning does not happen.
2015-07-15 12:01:13 -03:00
Phil Davis
6605035f9d Avoid error loading rules for numeric host name in alias
Create a host-type alias. Put just a number in "IP or FQDN" - e.g. I made alias name "Zqw" and a single host "23". The webGUI reports:
There were error(s) loading the rules: /tmp/rules.debug:44: syntax error - The line in question reads [44]: table { 23 }
and /tmp/rules.debug has:
table <Zqw> {   23 }
Zqw = "<Zqw>"
which pf does not cope with.
It is possible to have a host name that is a number, and end up with a domain name like 23.mycompany.com - unfortunately some Wally allowed such things in standards many years ago, so it can be rather difficult to tell the difference between a number and a host name.
This change improves the check when looking through alias entries and deciding if they are meant to be a name or a "bottom-level" value (address, subnet, port, port range). Anything that ends up looking like a host name gets given to filterdns to sort out. "Names" like "23" now get given to filterdns instead of being put directly into the table in pf. This makes things happier. Even if filterdns cannot resolve "23", at least it tries and nothing barfs.
2015-07-15 10:44:11 -03:00
Phil Davis
6b30491f4a Interfaces GIF Edit fix do_input_validation
Make the required fields be correct and match thier text names, which should each have their own gettext() cal so as to build a proper array at line 81. Basically it was all broken and the errors displayed when field/s were left empty were rubbish.
2015-07-15 10:38:49 -03:00
Phil Davis
e3a5f4876f Interfaces GRE Edit fix required fields text
The reqdfields had only 4 entries but reqdfieldsn has 5 entries and the field names to text descriptions did not match up.
Fixed it.
2015-07-15 10:30:09 -03:00