Thread: pf.conf and nat
View Single Post
  #1   (View Single Post)  
Old 25th November 2012
latux latux is offline
New User
 
Join Date: Nov 2012
Posts: 2
Default pf.conf and nat

Hello Community,
i am a newbie with BSD and i try to understand how a system at work is running.
I have a "OpenBSD 4.5 GENERIC#1749 i386" to work.
This host is running as a firewall with 4 ethernet ports.
Now i have to realise a NAT between 2 networks: mgt_if and extra_if
Code:
#macros:
mgt_if="10.1.0.254"
extra_if="192.168.50.254"

#host on extra_if
host1="192.168.50.100"
#pool auf clients on mgt_if
table <client> const {10.1.0.11, 10.1.0.12, 10.1.0.21, 10.1.0.31}
No host from "extra" should communicate with hosts on "mgt_if"
only "host1" can do it with the clients defined in the "<client>" table, realising ssh, vnc, snmtp (monitoring)

i try a lot of nat settings, but it´s not working:
Code:
nat on $mgt_if from $host1 to any -> ($mgt_if:0)
nat on $mgt_if from ($extra_if:0:network) to any -> ($mgt_if:0)
nat on $mgt_if inet from $host1 to any -> ($mgt_if:0)
nat on $mgt_if inet from ($extra_if:0:network) to any -> ($mgt_if:0)
nat on $mgt_if inet proto { tcp, udp } from $host to any -> ($mgt_if:0)
nat on $mgt_if inet proto { tcp, udp } from ($extra_if:0:network) to any -> ($mgt_if:0)
can someone help me?
thanks in advance
Laurent
Reply With Quote