Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iptables
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pe-public
iptables
Commits
9bedb8ed
Commit
9bedb8ed
authored
Oct 11, 2019
by
Alex Tayts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility with firewall 2.x module, refined
parent
89abadea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
data/common.yaml
data/common.yaml
+12
-7
manifests/init.pp
manifests/init.pp
+4
-4
No files found.
data/common.yaml
View file @
9bedb8ed
...
...
@@ -7,14 +7,17 @@ lookup_options:
# ipv4 default rules
iptables::rules_pre:
'100 ipv4'
:
proto
:
icmp
accept_icmp
:
name
:
"
100
ipv4"
action
:
accept
'
110
ipv4'
:
proto
:
icmp
accept_lo
:
name
:
"
110
ipv4"
proto
:
'
all'
iniface
:
'
lo'
action
:
accept
'
120
ipv4'
:
action
:
'
accept'
accept_related_established
:
name
:
"
120
ipv4"
proto
:
'
all'
ctstate
:
-
'
RELATED'
...
...
@@ -22,13 +25,15 @@ iptables::rules_pre:
action
:
accept
iptables::rules_post:
'998 ipv4'
:
reject_remaining_tcp
:
name
:
"
998
ipv4"
chain
:
INPUT
proto
:
tcp
action
:
reject
reject
:
'
tcp-reset'
tcp_flags
:
'
FIN,SYN,RST,ACK
SYN'
'
999
ipv4'
:
reject_remaining_udp
:
name
:
"
999
ipv4"
chain
:
INPUT
proto
:
udp
action
:
reject
...
...
manifests/init.pp
View file @
9bedb8ed
...
...
@@ -53,11 +53,11 @@ class iptables (
# create a hash with the parameters of the class to
# merge with the hiera lookup, which takes precedence
$opts
=
{
'100 log hits'
=>
{
log_attempts
=>
{
rseconds
=>
$ssh_defence_secs
,
rhitcount
=>
$ssh_defence_limit
,
},
'110 drop attacker'
=>
{
drop_connections
=>
{
rseconds
=>
$ssh_defence_secs
,
rhitcount
=>
$ssh_defence_limit
,
}
...
...
@@ -71,11 +71,11 @@ class iptables (
# engage ssh defence for ipv6
if
$public_ipv6
{
$opts_ipv6
=
{
'100 log ipv6 attempts'
=>
{
log_ipv6_attempts
=>
{
rseconds
=>
$ssh_defence_secs
,
rhitcount
=>
$ssh_defence_limit
,
},
'110 drop ipv6 attacker'
=>
{
drop_ipv6_connections
=>
{
rseconds
=>
$ssh_defence_secs
,
rhitcount
=>
$ssh_defence_limit
,
}
...
...
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