Building the Network You Need with OpenBSD's PF: BSDCan, Ottawa May 6th, 2009
Prev |  | Next

# Single NAT, web & mail server on the inside: from the inside

Add to the rule set:

    rdr on $int_if proto tcp from $int_if:network to $ext_if \
           port $webports -> $webserver
    rdr on $int_if proto tcp from $int_if:network to $ext_if \
           port $email -> $emailserver
    no nat on $int_if proto tcp from $int_if to $int_if:network
    nat on $int_if proto tcp from $int_if:network to $webserver \
           port $webports -> $int_if
    nat on $int_if proto tcp from $int_if:network to $emailserver \
           port $email -> $int_if