Skip to content
Snippets Groups Projects
Commit 3d7cd8a4 authored by Nils Olof Paulsson's avatar Nils Olof Paulsson
Browse files

gotofirehelld

parent ca9bc9d1
No related branches found
No related tags found
2 merge requests!67Test,!66Devel
Pipeline #129688 failed
This commit is part of merge request !67. Comments created here will be created in the context of that merge request.
# Class for skadereg firewall
class aim_control::firewall {
::server_firewall::constricto_chain { 'skadereg': }
::server_firewall::rules_file { '55-permit-skadereg.rules':
content => template("${module_name}/55-permit-skadereg.rules.erb"),
require => ::Server_firewall::Constricto_chain['skadereg'],
firewalld_rich_rule { 'Allow 33060 from liu ipv4':
ensure => present,
zone => 'liu',
source => { 'ipset' => 'liu-nets_v4' },
port => { 'port' => 33060, 'protocol' => 'tcp' },
action => 'accept',
}
firewalld_rich_rule { 'Allow 33060 from liu ipv6':
ensure => present,
zone => 'liu',
source => { 'ipset' => 'liu-nets_v6' },
port => { 'port' => 33060, 'protocol' => 'tcp' },
action => 'accept',
}
firewalld_rich_rule { 'Allow ssh from liu 10.243.0.0/16':
ensure => present,
zone => 'liu',
source => '10.243.0.0/16',
service => 'ssh',
action => 'accept',
}
firewalld_service { 'Allow https from liu Zone':
ensure => present,
zone => 'liu',
service => 'https',
}
firewalld_service { 'Allow http from liu Zone':
ensure => present,
zone => 'liu',
service => 'http',
}
firewalld_service { 'Allow https from public Zone':
ensure => present,
zone => 'public',
service => 'https',
}
firewalld_service { 'Allow http from public Zone':
ensure => present,
zone => 'public',
service => 'http',
}
}
require services
policy skadereg chain skadereg is
accept service:http
accept service:https
end policy
append rule INPUT -j skadereg
append rule INPUT -s class:liu-nets -p tcp --dport 33060:33060 -j ACCEPT
# <%# Put installed file in view mode when opened with Emacs: -%>
# <%= "Nota bene: Puppet managed file, all local changes will be reverted." %>
# <%= "Local" %> <%= "variables:" %>
# mode: view
# <%= "End:" %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment