Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
9dfee192
Commit
9dfee192
authored
Sep 05, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(openvpn, csc) add tunnel_networkv6 for
https://github.com/opnsense/core/issues/1161
parent
6abb99d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
openvpn.inc
src/etc/inc/openvpn.inc
+9
-0
vpn_openvpn_csc.php
src/www/vpn_openvpn_csc.php
+19
-1
No files found.
src/etc/inc/openvpn.inc
View file @
9dfee192
...
...
@@ -940,6 +940,15 @@ function openvpn_resync_csc_conf($settings, $server)
$conf
.=
"ifconfig-push
{
$clientip
}
"
.
gen_subnet_mask
(
$mask
)
.
"
\n
"
;
}
}
if
(
!
empty
(
$settings
[
'tunnel_networkv6'
]))
{
list
(
$ipv6
,
$prefix
)
=
explode
(
'/'
,
$settings
[
'tunnel_networkv6'
]);
list
(
$ipv6_1
,
$ipv6_2
)
=
openvpn_get_interface_ipv6
(
$ipv6
,
$prefix
);
if
(
$server
[
'dev_mode'
]
==
'tun'
&&
empty
(
$server
[
'topology_subnet'
]))
{
$conf
.=
"ifconfig-ipv6-push
{
$ipv6_2
}
{
$ipv6_1
}
\n
"
;
}
else
{
$conf
.=
"ifconfig-ipv6-push
{
$ipv6_2
}
{
$prefix
}
\n
"
;
}
}
if
(
!
empty
(
$settings
[
'local_network'
]))
{
$conf
.=
openvpn_gen_routes
(
$settings
[
'local_network'
],
"ipv4"
,
true
);
...
...
src/www/vpn_openvpn_csc.php
View file @
9dfee192
...
...
@@ -35,7 +35,7 @@ require_once("plugins.inc");
// define all fields used in this form
$all_form_fields
=
"custom_options,disable,common_name,block,description
,tunnel_network,local_network,local_networkv6,remote_network
,tunnel_network,
tunnel_networkv6,
local_network,local_networkv6,remote_network
,remote_networkv6,gwredir,push_reset,dns_domain,dns_server1
,dns_server2,dns_server3,dns_server4,ntp_server1,ntp_server2
,netbios_enable,netbios_ntype,netbios_scope,wins_server1
...
...
@@ -131,6 +131,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if
(
$result
=
openvpn_validate_cidr
(
$pconfig
[
'tunnel_network'
],
'IPv4 Tunnel Network'
))
{
$input_errors
[]
=
$result
;
}
if
(
$result
=
openvpn_validate_cidr
(
$pconfig
[
'tunnel_networkv6'
],
'IPv6 Tunnel Network'
,
false
,
"ipv6"
))
{
$input_errors
[]
=
$result
;
}
if
(
$result
=
openvpn_validate_cidr
(
$pconfig
[
'local_network'
],
'IPv4 Local Network'
,
true
,
"ipv4"
))
{
$input_errors
[]
=
$result
;
}
...
...
@@ -466,6 +469,21 @@ if ($act!="new" && $act!="edit") {
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_tunnel_networkv6"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPv6 Tunnel Network"
);
?>
</td>
<td>
<input
name=
"tunnel_networkv6"
type=
"text"
value=
"
<?=
$pconfig
[
'tunnel_networkv6'
];
?>
"
/>
<div
class=
"hidden"
for=
"help_for_tunnel_networkv6"
>
<?=
gettext
(
"This is the IPv6 virtual network used for private "
.
"communications between this server and client "
.
"hosts expressed using CIDR (eg. fe80::/64). "
.
"The first network address will be assigned to "
.
"the server virtual interface. The remaining "
.
"network addresses can optionally be assigned "
.
"to connecting clients. (see Address Pool)"
);
?>
</div>
</td>
</tr>
<tr
id=
"local_optsv4"
>
<td><a
id=
"help_for_local_network"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"IPv4 Local Network"
);
?>
</td>
<td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment