Malcom - Having different routes per interface

New About Yours API Help
1.2 KB, Plain text
Hello!  I was going to try to figure this out myself, but you've been
asking for emails on the show so I'm being lazy and helping the show,
win-win.

I have a FreeBSD machine that has two interfaces: re0 and wlan0.  The
wlan0 is a Wifi dongle, if that matters.  re0 connects to the internet.
I use wlan0 as an access point and gateway to the internet.  I then run
a VPN through a server in another country.  With that I have a wifi
access point that lets me browse from another part of the world and all
I have to do is connect to it with my devices.  I'm using OpenVPN for
the VPN.

My pf config looks like this:

nat on tun0 from 127.0.0.2 to any -> (tun0)
nat on tun0 from 127.0.0.3 to any -> (tun0)
nat on tun0 from wlan0:network to any -> (tun0) static-port
pass from {lo0, wlan0:network} to any keep state

My question is: while I want all traffic coming in from wlan0 to be
routed through the VPN, I want all traffic originating on the machine to
not be.  This machine does some big downloads for backups and the VPN is
lower and I have to pay for bandwidth.

Is it possible to set this up so my AP traffic goes through the VPN by
traffic from the box itself doesn't?

Thanks,
/Malcolm
Pasted 2 months, 2 weeks ago — Expires in 287 days
URL: http://dpaste.com/15VVVCP