bridging two subnets in freebsd host

I have subnet 192.168.50.0/24 for the jails and 192.168.8.0/24 for the VM's. I need two subnets able to connect each other. For example, a server running in a jail needs to dispatch loads to servers running on multiple Linux VM's.

Right now I can ping a Jail from a VM, but not the other way around.

Thanks.
 
Please learn about subnetting and routing. A bridge(4) is a layer 2 connection, what you want to do here happens on layer 3/4 (routing).
 
There is no default route in a jail. Host's default route is pointing to ISP gw. I use the fib setting in jail conf:
Code:
export jail_km_fib="1"

But get error

Code:
setfib: Invalid argument
 
Host's default route is pointing to ISP gw.
The host is directly connected to the two subnets. So it has two implied routes, see netstat -rn.

And keep in mind that ping(8) doesn't work in a 'standard' jail.

Code:
             allow.raw_sockets
                     The jail root is allowed to create raw sockets.  Setting
                     this parameter allows utilities like ping(8) and
                     traceroute(8) to operate inside the jail.  If this is
                     set, the source IP addresses are enforced to comply with
                     the IP address bound to the jail, regardless of whether
                     or not the IP_HDRINCL flag has been set on the socket.
                     Since raw sockets can be used to configure and interact
                     with various network subsystems, extra caution should be
                     used where privileged access to jails is given out to
                     untrusted parties.
 
Back
Top