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
5d3729e4
Commit
5d3729e4
authored
Nov 06, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(filter) move IPsec internal host to host
parent
4b61811b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
filter.inc
src/etc/inc/filter.inc
+1
-5
filter.lib.inc
src/etc/inc/filter.lib.inc
+9
-0
No files found.
src/etc/inc/filter.inc
View file @
5d3729e4
...
...
@@ -2522,6 +2522,7 @@ function filter_rules_generate(&$FilterIflist)
$log
[
'block'
]
=
!
isset
(
$config
[
'syslog'
][
'nologdefaultblock'
])
?
"log"
:
""
;
$log
[
'pass'
]
=
!
isset
(
$config
[
'syslog'
][
'nologdefaultpass'
])
?
"log"
:
""
;
// TODO : route-to needs to be refactored / simplified.
foreach
(
$FilterIflist
as
$ifdescr
=>
$ifcfg
)
{
if
(
isset
(
$ifcfg
[
'virtual'
]))
{
continue
;
...
...
@@ -2553,11 +2554,6 @@ function filter_rules_generate(&$FilterIflist)
}
}
/* add ipsec interfaces */
if
(
!
empty
(
$FilterIflist
[
'enc0'
][
'descr'
]))
{
$ipfrules
.=
"pass out
{
$log
[
'pass'
]
}
on
\$
{
$FilterIflist
[
'enc0'
][
'descr'
]
}
all keep state label
\"
IPsec internal host to host
\"\n
"
;
}
if
(
is_array
(
$config
[
'system'
][
'webgui'
])
&&
!
isset
(
$config
[
'system'
][
'webgui'
][
'noantilockout'
]))
{
$alports
=
filter_get_antilockout_ports
();
...
...
src/etc/inc/filter.lib.inc
View file @
5d3729e4
...
...
@@ -294,4 +294,13 @@ function filter_core_rules_system($fw, $defaults)
'quick'
=>
false
,
"label"
=>
"let out anything from firewall host itself"
),
$defaults
[
'pass'
]
);
// ipsec
if
(
!
empty
(
$fw
->
getInterfaceMapping
()[
'enc0'
]))
{
$fw
->
registerFilterRule
(
5
,
array
(
'direction'
=>
'out'
,
'statetype'
=>
'keep'
,
'quick'
=>
false
,
'interface'
=>
'enc0'
,
'label'
=>
'IPsec internal host to host'
),
$defaults
[
'pass'
]
);
}
}
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