table bridge proxmox-firewall-guests {
map vm-map-in {
typeof oifname : verdict
elements = { "tap100i0" : goto guest-100-in }
}
map vm-map-out {
typeof iifname : verdict
elements = { "tap100i0" : goto guest-100-out }
}
chain allow-dhcp-in {
udp sport . udp dport { 547 . 546, 67 . 68 } accept
}
chain allow-dhcp-out {
udp sport . udp dport { 546 . 547, 68 . 67 } accept
}
chain block-dhcp-in {
udp sport . udp dport { 547 . 546, 67 . 68 } drop
}
chain block-dhcp-out {
udp sport . udp dport { 546 . 547, 68 . 67 } drop
}
chain allow-ndp-in {
icmpv6 type { nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, nd-redirect } accept
}
chain block-ndp-in {
icmpv6 type { nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, nd-redirect } drop
}
chain allow-ndp-out {
icmpv6 type { nd-router-solicit, nd-neighbor-solicit, nd-neighbor-advert } accept
}
chain block-ndp-out {
icmpv6 type { nd-router-solicit, nd-neighbor-solicit, nd-neighbor-advert } drop
}
chain allow-ra-out {
icmpv6 type { nd-router-advert, nd-redirect } accept
}
chain block-ra-out {
icmpv6 type { nd-router-advert, nd-redirect } drop
}
chain after-vm-in {
ct state established,related accept
ether type != arp ct state invalid drop
}
chain do-reject {
meta pkttype broadcast drop
ip saddr 224.0.0.0/4 drop
meta l4proto tcp reject with tcp reset
meta l4proto icmp reject with icmp port-unreachable
reject with icmp host-prohibited
}
chain vm-out {
type filter hook prerouting priority 0; policy accept;
iifname vmap @vm-map-out
}
chain vm-in {
type filter hook postrouting priority 0; policy accept;
oifname vmap @vm-map-in
}
chain group-block-lan-in {
}
chain group-block-lan-out {
ip6 daddr fd88::1 accept
ip daddr 10.88.88.1 accept
ip daddr 10.88.88.0/24 jump do-reject
ip6 daddr fc00::/7 jump do-reject
ip daddr 10.132.241.0/24 jump do-reject
}
chain group-vpn-in {
}
chain group-vpn-out {
ip daddr 10.88.88.1 accept
ip6 daddr fd88::1 accept
ip daddr 10.132.241.2 accept
ip6 daddr fc00::/7 jump do-reject
ip daddr 10.88.88.0/24 jump do-reject
ip daddr 10.132.241.0/24 jump do-reject
}
chain guest-100-in {
jump allow-dhcp-in
jump allow-ndp-in
ether type arp accept
jump group-block-lan-in
jump after-vm-in
accept
}
chain guest-100-out {
jump allow-dhcp-out
jump allow-ndp-out
jump allow-ra-out
jump group-block-lan-out
accept
}
}