Skip to content

Commit

Permalink
[infra] fix: update firewall rules to initialize networking properly
Browse files Browse the repository at this point in the history
  • Loading branch information
amatissart committed Dec 10, 2023
1 parent c87240b commit 8fd5908
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion infra/ansible/roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

- name: Configure hosts file
blockinfile:
path: /etc/hosts
path: "{{ item }}"
create: true
block: |
127.0.1.1 {{machine_name}} {{domain_name}} {{api_domain_name}}
loop:
- /etc/hosts
- /etc/cloud/templates/hosts.debian.tmpl # Template used by cloud-init on startup

- name: Install minimal set of packages
apt:
Expand Down
3 changes: 3 additions & 0 deletions infra/ansible/roles/nftables/templates/nftables.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ table inet filter {

ip protocol igmp accept

# accept DHCPv6: necessary to initialize networking.service on Infomaniak cloud
ip6 daddr fe80::/10 udp sport 547 udp dport 546 accept

# accept SSH, HTTP, HTTPS
tcp dport { 22, 80, 443 } accept
}
Expand Down

0 comments on commit 8fd5908

Please sign in to comment.