Project

General

Profile

Download (1.56 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/usr/local/bin/php-cgi -f
2
<?php
3
/*
4
 * rc.newipsecdns
5
 *
6
 * part of pfSense (https://www.pfsense.org)
7
 * Copyright (c) 2009 Seth Mos <seth.mos@dds.nl>.
8
 * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
9
 * All rights reserved.
10
 *
11
 * Originally part of m0n0wall (http://m0n0.ch/wall)
12
 * Copyright (c) 2007 Manuel Kasper <mk@neon1.net>.
13
 * All rights reserved.
14
 *
15
 * Licensed under the Apache License, Version 2.0 (the "License");
16
 * you may not use this file except in compliance with the License.
17
 * You may obtain a copy of the License at
18
 *
19
 * http://www.apache.org/licenses/LICENSE-2.0
20
 *
21
 * Unless required by applicable law or agreed to in writing, software
22
 * distributed under the License is distributed on an "AS IS" BASIS,
23
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
 * See the License for the specific language governing permissions and
25
 * limitations under the License.
26
 */
27

    
28
/* parse the configuration and include all functions used below */
29
require_once("util.inc");
30
require_once("config.inc");
31
require_once("gwlb.inc");
32
require_once("functions.inc");
33
require_once("filter.inc");
34
require_once("shaper.inc");
35
require_once("auth.inc");
36
require_once("ipsec.inc");
37
require_once("vpn.inc");
38

    
39
/* make sure to wait until the boot scripts have finished */
40
if (file_exists("{$g['varrun_path']}/booting")) {
41
	return;
42
}
43

    
44
if (ipsec_enabled()) {
45
	sleep(15);
46
	log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing.");
47
} else {
48
	return;
49
}
50

    
51
$ipseclck = lock('ipsecdns', LOCK_EX);
52

    
53
vpn_ipsec_configure();
54

    
55
unlock($ipseclck);
56
?>
(52-52/78)