I want to create a Jail with a public IP address. But as we have IPv4 address shortage. I want to only make the jail able to bind to a range of ports (say 700 to 750).
I asked in the IRC and one answer was to use pf to NAT ports from/to the jail.
No particular reason. It's just a "VPS" I give to friends that's actually a jail. So they can use the jail to use some port agnostic services. Such as XMPP, or a Minetest server.
NATing the jail worked. If someone also wants to do this, this is the configuration that worked for me:
Code:
nat on $ext_if from 127.0.0.0/24 to any -> $SERVER_ADDRESS
rdr on $ext_if proto tcp from any to any port 1700:1720 -> 127.0.0.255
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.