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
621d703a
Commit
621d703a
authored
Nov 25, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openvpn: provide all local routes to export
PR:
https://github.com/opnsense/core/issues/1275
parent
df469d32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
vpn_openvpn_export.php
src/www/vpn_openvpn_export.php
+6
-5
No files found.
src/www/vpn_openvpn_export.php
View file @
621d703a
...
@@ -621,7 +621,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
...
@@ -621,7 +621,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
// add basic settings
// add basic settings
$conf
=
"dev tun
\n
"
;
$conf
=
"dev tun
\n
"
;
if
(
!
empty
(
$settings
[
'tunnel_networkv6'
]))
{
if
(
!
empty
(
$settings
[
'tunnel_networkv6'
]))
{
$conf
.=
"tun-ipv6
\n
"
;
$conf
.=
"tun-ipv6
\n
"
;
}
}
$conf
.=
"persist-tun
\n
"
;
$conf
.=
"persist-tun
\n
"
;
...
@@ -632,10 +632,11 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
...
@@ -632,10 +632,11 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
$conf
.=
"pull
\n
"
;
$conf
.=
"pull
\n
"
;
$conf
.=
"resolv-retry infinite
\n
"
;
$conf
.=
"resolv-retry infinite
\n
"
;
$conf
.=
"remote
{
$server_host
}
{
$server_port
}
\n
"
;
$conf
.=
"remote
{
$server_host
}
{
$server_port
}
\n
"
;
if
(
$settings
[
'local_network'
])
{
if
(
!
empty
(
$settings
[
'local_network'
]))
{
list
(
$ip
,
$mask
)
=
explode
(
'/'
,
$settings
[
'local_network'
]);
$conf
.=
openvpn_gen_routes
(
$settings
[
'local_network'
],
'ipv4'
);
$mask
=
gen_subnet_mask
(
$mask
);
}
$conf
.=
"route
$ip
$mask
\n
"
;
if
(
!
empty
(
$settings
[
'local_networkv6'
]))
{
$conf
.=
openvpn_gen_routes
(
$settings
[
'local_networkv6'
],
'ipv6'
);
}
}
if
(
!
empty
(
$settings
[
'tunnel_network'
]))
{
if
(
!
empty
(
$settings
[
'tunnel_network'
]))
{
list
(
$ip
,
$mask
)
=
explode
(
'/'
,
$settings
[
'tunnel_network'
]);
list
(
$ip
,
$mask
)
=
explode
(
'/'
,
$settings
[
'tunnel_network'
]);
...
...
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