Unix Technical Forum

pf and rdr on pppoe behind router

This is a discussion on pf and rdr on pppoe behind router within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Hi. This is how my network is organized: Internet --> ADSL Modem --> ext_if --> Bridged OPENBSD --> int_if ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 06:04 AM
Nicolas
 
Posts: n/a
Default pf and rdr on pppoe behind router

Hi.

This is how my network is organized:

Internet --> ADSL Modem --> ext_if --> Bridged OPENBSD --> int_if -->
Linksys router WRT54G --> Internal Network

The connection to ADSL is being done by the Linksys router (not by
OpenBSD). So I don't have a tun0 or pppoe interface.

With tcpdump, I get this information for each packet

[...]
10:10:10.316450 PPPoE-Session
code Session, version 1, type 1, id 0xae39, length 42
IP: 200.xxx.xxx.xxx.1935 > 200.xxx.xxx.xxx.xxx: R
1324406928:1324406928(0) win 0
1100 ae39 002a 0021 4500 0028 9353 0000
2e06 19b1 f637 6a1b c8ba 8fd5 0d8f 0050
4e3a 9ae4 4e36 98ed 5004 0000 4aee 0000
[...]

I need to redirect each packet from int_if port 80 to 127.0.0.1 port
8080
I've tried tons of pf rule like :
rdr on $int_if proto tcp from any to any port 80 -> 127.0.0.1 port
8080

I've even tried:
rdr on $inf_if from any to any -> 127.0.0.1

and still nothing...

I want to force each packet from the internal network to be redirected
before going out, and vice-versa for the incoming: redirect it before
coming in.

Any hints will be appreciated.

Thanks in advance,

Nicolas.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 06:04 AM
Peter Matulis
 
Posts: n/a
Default Re: pf and rdr on pppoe behind router

On 16 Sep 2004 13:16:51 -0700, nicomv@gmail.com (Nicolas) wrote:

>I need to redirect each packet from int_if port 80 to 127.0.0.1 port
>8080
>I've tried tons of pf rule like :
>rdr on $int_if proto tcp from any to any port 80 -> 127.0.0.1 port
>8080
>
>I've even tried:
>rdr on $inf_if from any to any -> 127.0.0.1
>
>and still nothing...
>
>I want to force each packet from the internal network to be redirected
>before going out, and vice-versa for the incoming: redirect it before
>coming in.


Your rules will redirect lan traffic attempting to connect to
$int_if:80 to 127.0.0.1:8080. Then what? What do you have running
there? Some kind of proxy server I guess. As for incoming traffic,
your rules don't apply. Kindly provide more info as to what you are
really trying to do.

/pm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com