Adding a default route for a specific NIC

patrick gibblertron at gmail.com
Sun Apr 3 16:17:38 PDT 2005


I have a FreeBSD 4.11 server with two NICs -- one has a real IP (bge0)
and the other has an internal IP (bge1, 192.168.42.6).

The default route for the server (defaultrouter= in rc.conf) is the
gateway for the real IP. How can I set a route such that traffic going
out on bge1 goes through a different router, even if it's to the
outside world?

Basically, I have a jailed setup running with a private IP address. On
the private network, there is a gateway machine that's setup to NAT
the traffic out to the internet. Currently, I cannot get out to the
internet from the jail unless I set the default route of the entire
server to be my internal NAT gateway.

Any ideas?

Thanks,

Patrick


More information about the freebsd-questions mailing list