Hi,
when I activate PF in my server, I cause connectivity to my jails to be blocked (even when it should not). With PF disabled, everything works. I am likely doing something stupid, but I need other eyes to look at it.
My jails are bound to the only active interface
Here
I create jails with Bastille, e.g. the first jail was created with
My host's PF configuration is as follows:
With this,
when I activate PF in my server, I cause connectivity to my jails to be blocked (even when it should not). With PF disabled, everything works. I am likely doing something stupid, but I need other eyes to look at it.
My jails are bound to the only active interface
igb0
:
Code:
root@host # ifconfig
igb0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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,NOMAP>
ether xx:xx:xx:xx:xx
inet 10.66.90.100 netmask 0xffffff00 broadcast 10.66.90.255
inet 10.66.90.101 netmask 0xffffffff broadcast 10.66.90.101
inet 10.66.90.102 netmask 0xffffffff broadcast 10.66.90.102
[...]
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
[...]
Here
10.66.90.100
is the host's address in my LAN, and the rest are aliases assigned to the jails. My /etc/rc.conf
is:
Code:
root@host # cat /etc/rc.conf
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="server.home.arpa"
ifconfig_igb0="inet 10.66.90.100 netmask 255.255.255.0"
defaultrouter="10.66.90.1"
sshd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
bastille_enable="YES"
pf_enable="YES"
pflog_enable="YES"
I create jails with Bastille, e.g. the first jail was created with
bastille create jail0 13.0-RELEASE 10.66.90.101 igb0
. Inside jail0
:
Code:
root@jail0 # ifconfig
igb0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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,NOMAP>
ether xx:xx:xx:xx:xx:xx
inet 10.66.90.101 netmask 0xffffffff broadcast 10.66.90.101
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
[...]
My host's PF configuration is as follows:
Code:
root@host # cat /etc/pf.conf
ext_if="igb0"
set block-policy return
scrub in on $ext_if all fragment reassemble
set skip on lo
block in all
pass out quick modulate state
antispoof for $ext_if inet
pass in inet proto tcp from any to 10.66.90.100 port ssh flags S/SA keep state
pass in inet proto tcp from any to 10.66.90.101 port https flags S/SA keep state
With this,
nc -nvz 10.66.90.101 443
from the host (or from anywhere in my network) succeeds, but curl -k https://10.66.90.101
hangs (even curl -k https://127.0.0.1
from inside the jail hangs). I have no problem connecting via SSH, though. If I comment out the antispoof rule, then curl
returns curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 54
. What am I doing wrong?