vip="192.168.1.200" pass in quick from $vip to !192.168.1.0/24 route-to tun0 pass out quick on tun0 from $vip to any nat-to tun0
Best regards, Zhi-Qiang Lei > On Mar 12, 2015, at 1:34 PM, Zhi-Qiang Lei <zhiqiang....@gmail.com> wrote: > > Thank you. This fix my problem. > > pass in quick from $vip to !192.168.1.0/24 route-to tun0 > pass out quick on tun0 from $vip to any nat-to tun0 > > Best regards, > Zhi-Qiang Lei > >> On Mar 12, 2015, at 4:54 AM, Giancarlo Razzolini <grazzol...@gmail.com <mailto:grazzol...@gmail.com>> wrote: >> >> On 11-03-2015 12:39, Zhi-Qiang Lei wrote: >>> I have a OpenBSD 5.6 router with two external interfaces pppoe0 and tun0. >> >> I am assuming the pppoe0 connects directly to the internet and tun0 also >> has internet connectivity at the other end of the tunnel, right? >> >>> >>> Generally, all packets will go through pppoe0. However, now I have a special >>> client with IP 192.168.1.200, is it possible to force it to use tun0? Thanks. >> You can do this with a simple route-to rule: >> >> pass in quick from 192.168.1.200 to any route-to tun0 >> >> If tun0 has a fixed gateway address you can change the rule to: >> >> pass in quick from 192.168.1.200 to any route-to (tun0 gateway) >> >> Cheers, >> Giancarlo Razzolini