second commit
This commit is contained in:
46
ansible/roles/firewall_nftables/templates/jumphost.nft.j2
Normal file
46
ansible/roles/firewall_nftables/templates/jumphost.nft.j2
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/sbin/nft -f
|
||||
flush ruleset
|
||||
|
||||
table inet filter {
|
||||
chain input {
|
||||
type filter hook input priority 0; policy drop;
|
||||
|
||||
iif lo accept
|
||||
ct state established,related accept
|
||||
ct state invalid drop
|
||||
|
||||
icmp type echo-request limit rate 5/second accept
|
||||
ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate 5/second accept
|
||||
|
||||
tcp dport 22 ip saddr {{ ssh_admin_access_cidr }} accept
|
||||
|
||||
{% if enable_nginx_proxy %}
|
||||
tcp dport 443 accept
|
||||
{% else %}
|
||||
tcp dport {{ jumphost_app_port }} accept
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
}
|
||||
|
||||
chain output {
|
||||
type filter hook output priority 0; policy drop;
|
||||
|
||||
oif lo accept
|
||||
ct state established,related accept
|
||||
|
||||
udp dport 53 accept
|
||||
tcp dport 53 accept
|
||||
udp dport 123 accept
|
||||
|
||||
{% for net in target_networks %}
|
||||
ip daddr {{ net }} accept
|
||||
{% endfor %}
|
||||
|
||||
# ACME/interne PKI (tls_certificates-Rolle) und OS-Paketquellen
|
||||
tcp dport 443 accept
|
||||
tcp dport 80 accept
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user