On Sun, Dec 28, 2008 at 10:31 AM, Greg Robinson <span dir="ltr"><<a href="mailto:greg@ltcc.com">greg@ltcc.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">All:</font></span></p>
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Re: FreeBSD 7, PCBSD, jail, internal network i.e. 192.168.1.149</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">, rc.conf, alias fxp0</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2"> with said IP, Apache 2.2 in jail</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Issue:</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font color="#000080" face="Tahoma" size="2">apache serves 192.168.1.149 to b</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">rowser on</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font color="#000080" face="Tahoma" size="2">computer but not to outside</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font color="#000080" face="Tahoma" size="2">browsers</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">, ping to</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font color="#000080" face="Tahoma" size="2">149 works</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Question: Anyone know of well documented how-to on Jails?</font></span></p>
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">My first thought on solving this problem is the</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"> <font color="#000080" face="Tahoma" size="2">pf.conf, which I want to approach cautiously.</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span></p>
<p dir="ltr"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Warmest Regards,</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Greg</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">- - - - - - - - - - -</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Greg Robinson</font></span></p>
<p dir="ltr"><span lang="en-us"><font color="#000080" face="Tahoma" size="2">Lucrosol</font></span></p>
<p dir="ltr"><span lang="en-us"></span></p></div></blockquote><div><br>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.<br>Snippet from rc.conf:<br>
<br>cloned_interfaces="vlan1" <br>ifconfig_vlan1="vlan 1 vlandev rl0"<br>ipv4_addrs_vlan1="10.0.1.10-15/27" # (Assign IPs <a href="http://10.0.1.10/27">10.0.1.10/27</a> to <a href="http://10.0.1.15/27">10.0.1.15/27</a>)<br>
<br>Then I created a vlan interface on the main gateway machine on the network and simply gave it an address on that network:<br><br>ifconfig_vlan1="vlan 1 vlandev dc0"<br>ipv4_addrs_vlan1="<a href="http://10.0.1.1/27">10.0.1.1/27</a>"<br>
<br>So now any packets destined for the jails are routed over VLAN 1.<br><br>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:<br>
<br>Either:<br><br>In rc.conf:<br>gateway_enable="YES"<br><br>or<br><br>sysctl.conf:<br>net.inet.ip.forwarding=1<br><br>Hope this helps.<br></div></div><br>