Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_server_hardening
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_server_hardening
Commits
71537746
Commit
71537746
authored
1 year ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
sec: block ICMP timestamp requests/replies
parent
33d5b63f
No related branches found
No related tags found
No related merge requests found
Pipeline
#4276
failed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
handlers/main.yml
+1
-1
1 addition, 1 deletion
handlers/main.yml
tasks/configure_iptables.yml
+33
-0
33 additions, 0 deletions
tasks/configure_iptables.yml
with
34 additions
and
1 deletion
handlers/main.yml
+
1
−
1
View file @
71537746
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
ansible.builtin.apt
:
ansible.builtin.apt
:
name
:
[
name
:
[
'
iptables-persistent'
,
'
iptables-persistent'
,
'
netfilter-persistent'
,
'
netfilter-persistent'
,
# required, iptables plugin for netfilter-persistent
]
]
state
:
present
state
:
present
listen
:
"
save
iptables
rules"
listen
:
"
save
iptables
rules"
...
...
This diff is collapsed.
Click to expand it.
tasks/configure_iptables.yml
+
33
−
0
View file @
71537746
...
@@ -117,6 +117,39 @@
...
@@ -117,6 +117,39 @@
-
save iptables rules
-
save iptables rules
# http://shouldiblockicmp.com
# http://shouldiblockicmp.com
# OID: 1.3.6.1.4.1.25623.1.0.103190 MITIGATION:
# - http://www.securityspace.com/smysecure/catid.html?id=1.3.6.1.4.1.25623.1.0.103190
# - https://access.redhat.com/solutions/6123331
# "Need to disable ICMP type 13 (timestamp requests) and 14 (timestamp
# replies) without using firewalld, iptables, or nftables. (...)
# At this time there is no method to disable ICMP timestamp requests and
# replies in RHEL without using a firewall solution."
# - https://beyondsecurity.freshdesk.com/support/solutions/articles/44001709477--how-can-i-mitigate-icmp-timestamp-
# "Linux offers neither a sysctl nor a /proc/sys/net/ipv4 interface to
# disable ICMP timestamp responses. Therefore, you should block ICMP on the
# affected host using iptables, and/or block it at the firewall."
# - The risk is mainly mitigated by using the "DROP" Default Policy for the
# INPUT chain in iptables and only allowing specific ICMP packes. However,
# to mitigate against misconfigurations of the Default Policy, we now
# explicitely DROP these packages.
# Kudos to @Steidl for building the initial version of this.
-
name
:
>
"mitigate OID: 1.3.6.1.4.1.25623.1.0.103190 'ICMP Timestamp Reply
Information Disclosure'"
ansible.builtin.iptables
:
action
:
"
insert"
chain
:
"
{{
item.chain
|
default('INPUT')
}}"
comment
:
"
{{
item.comment
|
default(omit)
}}"
icmp_type
:
"
{{
item.icmp_type
|
default(omit)
}}"
jump
:
"
DROP"
protocol
:
"
icmp"
state
:
"
{{
item.state
|
default('present')
}}"
table
:
"
filter"
loop
:
"
{{
vault_iptables_icmp
|
flatten(levels=1)
}}"
notify
:
-
save iptables rules
# TODO: Outgoing iptables Regeln erstellen, und bloß keine vergessen!!!
# TODO: Outgoing iptables Regeln erstellen, und bloß keine vergessen!!!
## Configure specific rules - Chain OUTPUT
## Configure specific rules - Chain OUTPUT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment