Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2008 17:40:53 +0100
From:      usleepless@gmail.com
To:        "Richard Yang" <kusanagiyang@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: nat and ipfw, port forwarding
Message-ID:  <c39ec84c0812270840r2d66c423p7c9929e2705322e8@mail.gmail.com>
In-Reply-To: <abd417bf0812261227s52c0e950o2821ade2951abc5c@mail.gmail.com>
References:  <abd417bf0812261227s52c0e950o2821ade2951abc5c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ricard,

On Fri, Dec 26, 2008 at 9:27 PM, Richard Yang <kusanagiyang@gmail.com>wrote:

> hi,
> i have a ssh machine behind a freebsd firewall with nat and ipfw.
> how do i make port forwarding so internet can access the ssh machine?
> thanx
>

i think you need to configure /etc/ipnat.conf ( read 'man ipnat' ). this is
a example definition:
rdr em1 0.0.0.0/0 port 2223 -> 192.168.1.96 port 22

( this redirects incoming traffic on outside-interface em1 port 2223 to an
internal machine on port 22 )

also, include "firewall_nat_enable" in your rc.conf ( read 'man rc.conf' )

to configure the settings from ipnat.conf, run "ipnat -C -f /etc/ipnat.conf"

regards,

usleep


> --
>
> Best Regards
>
> Richard Yang
> richardyang@richardyang.net
> kusanagiyang@gmail.com
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0812270840r2d66c423p7c9929e2705322e8>