I am new to jails and I need some guidance getting the following scenario working:
I have a VPS running FreeBSD 10.2 64-Bit. That VPS has one public IPv4 and one public IPv6 address. I can get additional IPv4 addresses for $2 per month and additional IPv6 addresses for free. So of course I would like to use IPv6 in the following setup.
Right now the FreeBSD 10.2 installation on the VPS is working fine. It is running a PF firewall that blocks all incoming traffic beside SSH and HTTP and allows all outgoing traffic.
I want to create a jail using EzJail. In that jail I would like to run a webserver (Nginx, PHP-FPM, MySQL). Note that currently there's already an Nginx installation running on the host itself.
First thing I did is getting an additional free IPv6 address. Now
Then I created the jail using EzJail. In the configuration I use the newly acquired IPv6 address and assign it to the interface em0 of the jail.
Now, my question is: How do I configure my host (namely PF) to pass everything on that new IPv6 address to the jail so from the outside the jail behaves like a dedicated host?
Do I want to setup some NAT/PAT on the host that passes everything on that IPv6 to the jail and run a dedicated PF instance on the jail?
Also, the host is accessible via SSH using port 22. As I am having a second public IP I guess I can make the jail become accessible via SSH using port 22 too, is that correct?
I hope that somebody understood what I'd like to ask
I have a VPS running FreeBSD 10.2 64-Bit. That VPS has one public IPv4 and one public IPv6 address. I can get additional IPv4 addresses for $2 per month and additional IPv6 addresses for free. So of course I would like to use IPv6 in the following setup.
Right now the FreeBSD 10.2 installation on the VPS is working fine. It is running a PF firewall that blocks all incoming traffic beside SSH and HTTP and allows all outgoing traffic.
I want to create a jail using EzJail. In that jail I would like to run a webserver (Nginx, PHP-FPM, MySQL). Note that currently there's already an Nginx installation running on the host itself.
First thing I did is getting an additional free IPv6 address. Now
ifconfig
on the host shows multiple IPs (the IPv4 and the two IPv6 but on the same interface).Then I created the jail using EzJail. In the configuration I use the newly acquired IPv6 address and assign it to the interface em0 of the jail.
Now, my question is: How do I configure my host (namely PF) to pass everything on that new IPv6 address to the jail so from the outside the jail behaves like a dedicated host?
Do I want to setup some NAT/PAT on the host that passes everything on that IPv6 to the jail and run a dedicated PF instance on the jail?
Also, the host is accessible via SSH using port 22. As I am having a second public IP I guess I can make the jail become accessible via SSH using port 22 too, is that correct?
I hope that somebody understood what I'd like to ask