Hallo zusammen,
ich habe zwei Jails welche jeweils eine öffenltiche IPv6 haben.
Jetzt überlege ich gerade wie die pf.conf dazu aussehen sollte. Kann mir jemand helfen?
Vorschlag:
/etc/pf.conf
ich habe zwei Jails welche jeweils eine öffenltiche IPv6 haben.
Jetzt überlege ich gerade wie die pf.conf dazu aussehen sollte. Kann mir jemand helfen?
Vorschlag:
/etc/pf.conf
Code:
ext_if = "em0"
# Ports for Host
host_tcp_ports = "{ 2342 }" host_udp_ports = "{ 2342, 60000:61000 }"
# ICMP
icmp_types = "{ echoreq, unreach }"
icmp6_types = "{ echoreq, routersol, routeradv, neighbradv, neighbrsol }"
# Jails
foo_jail = "2a01:aa:bb:cc::f00"
foo_ports = "{ 80, 443 }"
bar_jail = "2a01:aa:bb:cc::beef"
bar_ports= "{ 25, 465, 993 }"
pass quick on lo0 no state
block in all
pass in inet proto tcp to $foo_jail port $foo_ports
pass in inet proto tcp to $bar_jail port $bar_ports
# Host
pass in inet proto tcp to $ext_if port $host_tcp_ports
pass in inet proto udp to $ext_if port $host_udp_ports
pass in inet6 proto tcp to $ext_if port $host_tcp_ports
pass in inet6 proto udp to $ext_if port $host_udp_ports
# icmp
pass on $ext_if inet proto icmp all icmp-type $icmp_types keep state
pass on $ext_if inet6 proto icmp6 all icmp6-type $icmp6_types keep state
pass out all keep state