DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Security

OpenBSD Security Functionally paranoid!

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th May 2010
kivi_kmitl kivi_kmitl is offline
Real Name: Kevin Chen
New User
 
Join Date: May 2010
Location: KMITL
Posts: 1
Thanked 0 Times in 0 Posts
Default how to config PF as router and source based routing

i have 4 wan links and i want to use PF as router.
i want to config source based routing using Port number and protocol

example policy

- Port 80, 20, 21, 443 routed by interface1
- Port 1-1023 routed by interface2
- Port 1024-65535 routed by interface3

how do i config this policy but i don't use NAT. i want to use PF replace the old router (static routing).

route-to , dup-to , reply-to can do my policy ?

Quote:
if1 = "em1"
if2 = "em2"
if3 = "em3"
if4 = "em4"
ext_gw1 = "192.168.1.1"
ext_gw2 = "192.168.2.1"
ext_gw3 = "192.168.3.1"
ext_gw4 = "192.168.4.1"

pass out on $if1 route-to $ext_gw1 port {80 21 22 443} from any
pass out on $if2 route-to $ext_gw2 port {1 >< 1024} from any
pass out on $if3 route-to $ext_gw3 port {1025 >= } from any
for this code , i can't achieve my policy
please help me to solve my problem

many many thanks
(i apologize that my english is not too good)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD New Frenzy Live CD based on FreeBSD 8.0 J65nko News 3 11th January 2010 06:15 PM
Installing/configurin RT-73 based wireless card tal-rasha FreeBSD General 0 7th April 2009 02:40 PM
A name for an embedded FreeBSD-based OS nimnod Off-Topic 15 16th March 2009 03:06 PM
Remote OpenBSD ssh-based install problems artix OpenBSD Installation and Upgrading 7 13th March 2009 08:52 PM
FOSS web-based accounting? DraconianTimes Off-Topic 0 16th November 2008 02:20 PM


All times are GMT. The time now is 08:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick