Hi all,

I have a OpenBSD machine working as a gateway and which has two data
links, an adsl (sis0 192.158.254.254) and an E1 (rl0 10.3.0.68). There
is a machine in the private network (10.3.0.62) that needs a route
through the adsl link. I have configured NAT using the following
command:

nat on sis0 from 10.3.0.62 to any -> sis0

But the rule is not working. I do have route for both outputs and my
IP forwarding is enabled.

I have searched on the net but I could not find anything similar to my
problem. If anyone could give me a hint about it, I'd be very
thankful.

[ host ]
    |
  -------------------- rl0 [ OpenBSD ] --> rl0 (Link E1) --- (internet)
                                 |
                                 |---------------> sis0 (link adsl)
---- (internet)

My pf.conf

    #
    # Macros
    #

    e1_link=rl0
    adsl_link=sis0
    int_if=lo0
    e1_ip="10.3.0.68"
    adsl_ip="192.168.254.10"
    host=" 10.3.0.62"

    #
    # Optimizations
    #

    set timeout interval 10
    set timeout frag 30
    set limit { frags 5000, states 2500 }
    set optimization aggressive
    set block-policy drop
    set loginterface rl0
    set skip on lo0
    set state-policy if-bound

    #
    # Scrub
    #

    scrub in all

    #
    # Nat.
    #

    nat on $adsl_link from $host to any -> $adsl_link

    #
    # Default Policy
    #

    block log all

    #
    # Rules.
    #

    pass quick on $int_if all

    pass in log on $e1_link inet proto { tcp, udp, icmp } from $host to
    any flags S/SA keep state

    pass out log on { $e1_link, $adsl_link } inet proto { tcp, udp, icmp }
    from any to any flags S/SA keep state




--
Joco Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://www.openbsd-pa.org
e-mail: [EMAIL PROTECTED]

Reply via email to