View Single Post
  #1   (View Single Post)  
Old 5th March 2010
Simon Simon is offline
Port Guard
 
Join Date: Jan 2010
Posts: 30
Wink No redirection pass with one interface ?

Hi,

I m doing some tests with my virtualbox machine.
I use a virtual machine with only one interface. (I use OpenBSD 4.6)
I try to redirect all webpage to my website.
But my rdr pass on... doesnt' work.
Perhaps, it works with more than one interface. ?
When i do pfctl -nf /etc/pf.conf : no errors
i can go to my website, ping works.
But redirection doesn't work for example, when i type :
lynx www.google.fr, it doesn't send me to my website.
can you help me ?

here my pf ruleset
---------------------
Code:
me="egress:network"
mywebsite="www.mywebsite.com"
set skip on lo
set drop policy drop
match in scrub all (no-df max-mss 1440)
rdr pass on egress proto tcp from $me to ! $mywebsite \
                 port 80 -> $mywebsite port 80
block log all
pass out on egress proto icmp all icmp-type { echoreq unreach }
pass out on egress proto tcp from $me to $mywebsite port 80

Last edited by Simon; 5th March 2010 at 06:23 PM. Reason: more info
Reply With Quote