Thread: port forwarding
View Single Post
  #1   (View Single Post)  
Old 15th November 2008
ikevmowe ikevmowe is offline
New User
 
Join Date: Nov 2008
Posts: 5
Default port forwarding

[ COMP1 ] [ COMP3 ]
| |
---+------+-----+------- xl0 [ OpenBSD ] fxp0 -------- ( Internet )
|
[ COMP2 ]



Please help me to configure the /etc/pf.conf that my OpenBSD can forward port 55555 to port 22. I have sshd installed on COMP3, and I want to ssh to COMP3 from Internet. I have following rules, but it doesn't work. Please help.

# macros
ext_if="fxp0"
int_if="xl0"

comp3="192.168.0.3"

# options
set block-policy return
set loginterface $ext_if

set skip on lo

# scrub
scrub in

## my port forwarding rule
rdr on $ext_if proto tcp from any to any port 55555 -> 192.168.0.3 port 22


# filter rules
block in

pass out keep state

pass in quick on $int_if
Reply With Quote