[nycbug-talk] Jails | FreeBSD | fxp0 | alias | Apache 2.2

H. G. tekronis at gmail.com
Sun Dec 28 12:06:36 EST 2008


On Sun, Dec 28, 2008 at 10:31 AM, Greg Robinson <greg at ltcc.com> wrote:

>  All:
>
> Re: FreeBSD 7, PCBSD, jail, internal network i.e. 192.168.1.149, rc.conf,
> alias fxp0 with said IP, Apache 2.2 in jail
>
> Issue: apache serves 192.168.1.149 to browser on computer but not to
> outside browsers, ping to 149 works
>
> Question: Anyone know of well documented how-to on Jails?
>
> My first thought on solving this problem is the pf.conf, which I want to
> approach cautiously.
>
> Warmest Regards,
>
> Greg
>
> - - - -  - - - - - - -
>
> Greg Robinson
>
> Lucrosol
>
>
What I remember doing was creating a vlan interface, and a assigning a block
of addresses to it as a pool for use by all the jails.
Snippet from rc.conf:

cloned_interfaces="vlan1"
ifconfig_vlan1="vlan 1 vlandev rl0"
ipv4_addrs_vlan1="10.0.1.10-15/27"  # (Assign IPs 10.0.1.10/27 to
10.0.1.15/27)

Then I created a vlan interface on the main gateway machine on the network
and simply gave it an address on that network:

ifconfig_vlan1="vlan 1 vlandev dc0"
ipv4_addrs_vlan1="10.0.1.1/27"

So now any packets destined for the jails are routed over VLAN 1.

Again, thats just how I approached the problem.  For what you're dealing
with, you might perhaps only need to enable packet forwarding in the jail
host by:

Either:

In rc.conf:
gateway_enable="YES"

or

sysctl.conf:
net.inet.ip.forwarding=1

Hope this helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20081228/e5c096c0/attachment.html>


More information about the talk mailing list