Changing Gateway temporarilly
dweimer at dweimer.net
Sat Feb 27 13:34:36 UTC 2016
On 2016-02-27 7:17 am, JosC wrote:
> Running FreeBSD v9 using Gateway1 (50/10Mbit) with Postfix and Apache2
> Don't have two NICs in my server.
> Running IPFW.
> I have another Gateway2 (200/35Mbit) which I would like FreeBSD to use
> for certain internet traffic (download ports and some uploads).
> Can you tell me how I could realize this? 2nd Nic is no option.
> Thanks for your reply,
> Jos Chrispijn
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
I believe the term you are looking for is policy based routing, have a
look at man pf.conf(5)
<https://www.freebsd.org/cgi/man.cgi?query=pf.conf&sektion=5>. Using pf
will allow you to set up rules that route traffic out different
gateways. As for getting the second gateway accessible, you can simply
use an alternate IP address on the interface. Use vlans if you have a
switch supporting it. or use the same internal subnet for both gateways,
but of course different IPs for the gateway itself.
I haven't done it myself on FreeBSD, but I do use a similar setup on a
pfSense box on one of the remote manufacturing plants where I work. in
that case its in a small town, best download rate we can get is on DSL,
but upload is very limited so we have a bundled T1 for VPN back to main
office, and use the DSL line with HTTP & HTTPS traffic routed to DSL.
Dean E. Weimer
More information about the freebsd-questions