I am currently working with FreeBSD for the first time. My plan is to set up a server where I have several jails. Currently, I am planning on running three of them: a webserver, an owncloud server and a Teamspeak 3 server.
I got it running so far that I currently have one jail with an NGINX server which is accessible over the internet with my main IP 46.165.XXX.XXX. This is my pf.conf:
This works perfectly, I can access it via the IP, both HTTP and HTTPS work.
Now my next step would be to create another jail (no problems there) but it has to be accessible via another IP 37.58.XXX.XXX.
What changes would I have to introduce into my pf.conf?
I got it running so far that I currently have one jail with an NGINX server which is accessible over the internet with my main IP 46.165.XXX.XXX. This is my pf.conf:
Code:
# INTERFACES
ext_if="bge0"
int_if="lo1"
jailnet=$int_if:network
# Name and IP of jails
WEBSERVER="10.1.1.1"
# NAT
nat on $ext_if from $jailnet to any -> ($ext_if)
# Redirect any packets requesting port 80 or 443 to jail "WEBSERVER"
rdr pass on $ext_if inet proto tcp to port http -> $WEBSERVER port http
rdr pass on $ext_if inet proto tcp to port https -> $WEBSERVER port https
This works perfectly, I can access it via the IP, both HTTP and HTTPS work.
Now my next step would be to create another jail (no problems there) but it has to be accessible via another IP 37.58.XXX.XXX.
What changes would I have to introduce into my pf.conf?