Hello,
Can someone please help me figure out how to forward ports from inside of a jail? I think I need the pf firewall to do this, but I could be wrong.
I have three iocage jails, each on their own VLAN, each running tailscale inside. My goal is to have incoming connections over tailscale blocked unless they're on ports 22 and 443. When those connections pass through, instead of answering them directly, I want the jail to port forward to a different host on the same subnet. The host I have in mind is one that can't run tailscale on it's own, so e.g. I need to come up with a workaround. Normally, a tailscale user would use the subnet feature to solve this problem, but that's not available to me for reasons.
Now I am stuck trying to get pf to run in a jail:
Any ideas on how to get pf working, or how to achieve this differently, would be appreciated!
- Evan Rowley
Can someone please help me figure out how to forward ports from inside of a jail? I think I need the pf firewall to do this, but I could be wrong.
I have three iocage jails, each on their own VLAN, each running tailscale inside. My goal is to have incoming connections over tailscale blocked unless they're on ports 22 and 443. When those connections pass through, instead of answering them directly, I want the jail to port forward to a different host on the same subnet. The host I have in mind is one that can't run tailscale on it's own, so e.g. I need to come up with a workaround. Normally, a tailscale user would use the subnet feature to solve this problem, but that's not available to me for reasons.
Now I am stuck trying to get pf to run in a jail:
Code:
root@jail90-csg01:~ # service pf restart
pfctl: /dev/pf: No such file or directory
kldload: can't load pf: Operation not permitted
/etc/rc.d/pf: WARNING: Unable to load kernel module pf
root@jail90-csg01:~ # service pf status
pf.ko is not loaded
root@jail90-csg01:~ # kldload pf.ko
kldload: can't load pf.ko: Operation not permitted
Any ideas on how to get pf working, or how to achieve this differently, would be appreciated!
- Evan Rowley