[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Help with jail routing



skridsko grafstrom wrote:
> Hi,
> 
> I need some advice on how to get a jail setup as decribed below:
> 
> 1) single ethernet interface lnc0
>      192.168.1.2 netmask 255.255.255.0
> 2) pptp netgraph interface ng0
>      10.0.0.2 -> 10.0.0.1 (point to point)
> 3) default gateway is 192.168.1.1 via lnc0
> 
> I wish to create a jail which uses ng0 as the gateway, ie. all traffic
> in and out of the jail is routed via pptp. The default gateway cannot
> be changed in my setup (part of the challenge here, since you cannot
> change the default gateway within a jail). How should I go about doing
> this? Thanks a lot!

I think you can do that with the pf packetfilter, something like:

pass out on lnc0 route-to (ng0, 10.0.0.1) from <jailip-addr> to any

greetings,
philipp