My failing setup is not complex. The machine is virtualised with xen. The physical network interfaces belong to a FreeBSD 13 guest which is intended to work as a firewall, routing traffic to a number of guests.
Networking from that FreeBSD system works perfectly. I can make TCP connections, pass ICMP packets, etc.
Here is my stripped-down /etc/pf.conf on that system:
The problem is that the guest "diener" gets poor access to the outside world. Its traffic is silently blocked by the FreeBSD fw system. If I try to connect to port 2201 to trigger the rdr rule, the SYN packet reaches diener as it should, and diener sends a SYN ACK, but that packet is silently tossed by the FreeBSD fw.
TCP traffic from diener to the wider world is blocked already at the first SYN.
ICMP works fine.
Could somebody please enlighten me about the idiosyncrasies with FreeBSD here? Is pf not supposed to be used? Do I need to compile a kernel which works with pf?
(I have used pf for > 20 years, but not with FreeBSD for a very long time. In the last 15 years, it has been with NetBSD. So no newbie, but thus far I have not succeeded with even the trivial pf configuration above with nat and rdr in this system with FreeBSD 13.)
Networking from that FreeBSD system works perfectly. I can make TCP connections, pass ICMP packets, etc.
Here is my stripped-down /etc/pf.conf on that system:
Code:
ext_if="bnxt0"
ext_addr="1.2.3.4" # real IP address suppressed
diener="192.168.0.2"
nat on $ext_if inet from ! ($ext_if) to any -> ($ext_if)
rdr on $ext_if proto tcp from any to $ext_addr port 2201 -> $diener port 2201
TCP traffic from diener to the wider world is blocked already at the first SYN.
ICMP works fine.
Could somebody please enlighten me about the idiosyncrasies with FreeBSD here? Is pf not supposed to be used? Do I need to compile a kernel which works with pf?
(I have used pf for > 20 years, but not with FreeBSD for a very long time. In the last 15 years, it has been with NetBSD. So no newbie, but thus far I have not succeeded with even the trivial pf configuration above with nat and rdr in this system with FreeBSD 13.)