Mason Loring Bliss <ma...@blisses.org> wrote: > > I've got a vnet jail that's set up to use that x.y.z.50 address, and I've > assigned x.y.z.50 to epair0b in the jail, but I ran into a problem. I > couldn't tell that jail to use a.b.c.1 as its default gateway and that that > was out through epair0a without assigning an a.b.c address to epair0a, even > though I don't actually have a spare assigned to me.
Unless I've misread, you simply want to route through an IP that is physically "on your lan", but isn't configured as being "on your lan". try adding this static route: route add -host a.b.c.1 -iface em0 (replace em0 with the name of the network interface that is physically connected to the a.b.c.1 Ip address) Then simply set the default gateway to a.b.c.1 as you tried to do already. Basically, you were trying to set the default to the IP of your router which wasn't within your configured IP subnet. route add -host a.b.c.1 -iface em0 basically means 'to get to this out-of-scope ip address, just send the packets down interface em0, as it's directly accessable that way, even though the normal config doesn't imply it' For rc.conf in the jail, this should be all you need to add: static_routes="defaultrouter" route_defaultrouter="-host a.b.c.1 -iface em0" defaultrouter="a.b.c.1" (modified as appropriate, of course) .