Hey all
I somehow fail to write basic firewall rules for my system. When I run
If I try to ask for more debug output, I get the same result.
My pf.conf contains the following
I'm not sure whether the config is correct since pfctl doesn't check it.
I somehow suspect the reason for this is that the system does not have an IPv4 address configured. However as far as I can tell I didn't specify any IPv4-specific rule in the ruleset.
(Obviously I did redact the IP addresses, the second public IP is used in a jail)
This is on a FreeBSD 15.0 using pkgbase.
Thanks, Beni
EDIT: Fix re comment of ShelLuser
I somehow fail to write basic firewall rules for my system. When I run
pfctl -nf /etc/pf.conf it fails with an error:
Code:
# pfctl -nf /etc/pf.conf
pfctl: Failed to open netlink: Bad file descriptor
If I try to ask for more debug output, I get the same result.
Code:
# pfctl -x loud -gvnf /etc/pf.conf
pfctl: Failed to open netlink: Bad file descriptor
My pf.conf contains the following
Code:
# Macros
mgt_if = "igb0"
zg_range6 = "2a10:8240::/29"
ksz_range6 = "2001:4b20::/29"
ssh_sources = "{ zg_range6, ksz_range6 }"
# Settings
set skip on lo0
set block-policy drop
# Tables
table <icmpratelimit> persist
# Basic security rules
antispoof quick for { $mgt_if }
scrub in all
block quick log from { <icmpratelimit> }
# Default policy
block in on $mgt_if
pass out on $mgt_if
# ICPM with rate limit
pass inet6 proto icmp6 all icmp6-type $icmp_types \
keep state (max-src-conn-rate 6/4, overload <icmpratelimit> flush global)
# Basic services
pass in on $mgt_if proto tcp port 22 from $ssh_sources
I'm not sure whether the config is correct since pfctl doesn't check it.
I somehow suspect the reason for this is that the system does not have an IPv4 address configured. However as far as I can tell I didn't specify any IPv4-specific rule in the ruleset.
Code:
# ifconfig igb0
igb0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=4e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
ether 18:c0:4d:b6:a9:bc
inet6 2001:db8:0:1::2 prefixlen 64
inet6 fe80::1ac0:afff:afff:afff%igb0 prefixlen 64 scopeid 0x1
inet6 2001:db8:0:1::1:a prefixlen 64
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
(Obviously I did redact the IP addresses, the second public IP is used in a jail)
This is on a FreeBSD 15.0 using pkgbase.
Thanks, Beni
EDIT: Fix re comment of ShelLuser