mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 07:54:42 +02:00
feat: initial commit — Ansible roles storage-01/gpu-01 opérationnels
This commit is contained in:
commit
b3fce8af5d
70 changed files with 2688 additions and 0 deletions
63
ansible/roles/gateway/templates/nftables.conf.j2
Normal file
63
ansible/roles/gateway/templates/nftables.conf.j2
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#!/usr/sbin/nft -f
|
||||
# Géré par Ansible — ne pas modifier manuellement
|
||||
|
||||
flush ruleset
|
||||
|
||||
table inet filter {
|
||||
chain input {
|
||||
type filter hook input priority 0; policy drop;
|
||||
|
||||
# Loopback
|
||||
iif lo accept
|
||||
|
||||
# Connexions établies
|
||||
ct state established,related accept
|
||||
|
||||
# ICMP
|
||||
ip protocol icmp accept
|
||||
ip6 nexthdr icmpv6 accept
|
||||
|
||||
# SSH depuis le LAN domestique et le LAN cluster
|
||||
tcp dport 22 ip saddr { 192.168.1.0/24, 192.168.10.0/24 } accept
|
||||
|
||||
# DNS (dnsmasq)
|
||||
udp dport 53 ip saddr 192.168.10.0/24 accept
|
||||
tcp dport 53 ip saddr 192.168.10.0/24 accept
|
||||
|
||||
# NFS
|
||||
tcp dport { 111, 2049 } ip saddr 192.168.10.0/24 accept
|
||||
udp dport { 111, 2049 } ip saddr 192.168.10.0/24 accept
|
||||
|
||||
# Services données (accès cluster uniquement)
|
||||
tcp dport { 5432, 6333, 6334, 9000, 9001 } ip saddr 192.168.10.0/24 accept
|
||||
|
||||
# Hermes gateway (accès LAN domestique + cluster)
|
||||
tcp dport 8080 ip saddr { 192.168.1.0/24, 192.168.10.0/24 } accept
|
||||
|
||||
# LiteLLM (localhost uniquement — pas d'accès réseau direct)
|
||||
# Port 4000 non exposé ici intentionnellement
|
||||
|
||||
log prefix "nft-drop: " drop
|
||||
}
|
||||
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
|
||||
# Forwarding LAN cluster → WAN
|
||||
iif {{ lan_interface }} oif {{ wan_interface }} ct state new,established,related accept
|
||||
iif {{ wan_interface }} oif {{ lan_interface }} ct state established,related accept
|
||||
}
|
||||
|
||||
chain output {
|
||||
type filter hook output priority 0; policy accept;
|
||||
}
|
||||
}
|
||||
|
||||
table ip nat {
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 100;
|
||||
|
||||
# NAT masquerade pour le LAN cluster
|
||||
oif {{ wan_interface }} ip saddr 192.168.10.0/24 masquerade
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue