ipfw natd forward port 80
Clement Laforet
sheepkiller at cultdeadsheep.org
Wed Aug 6 19:33:42 PDT 2003
On Wed, 06 Aug 2003 21:28:19 -0700
boxend at swbell.net wrote:
>
> I want to forward port 80 from an outside ip to an internal ip of
> 192.168.1.150 dc1 is tun0 pppoe / dc0 is lan
> I have read what seems like 5 diff ways to do this but the only
> result has been to lock myself out of the computer.
> What have I missed.
> rc.conf settings
> firewall_enable="YES"
> firewall_script="/etc/firewall/fwrules"
> firewall_quiet="YES"
> firewall_logging_enable="YES"
> #log_in_vain="YES"
> tcp_drop_synfin="NO"
> tcp_restrict_rst="NO"
> icmp_drop_redirect="YES"
> natd_enable="YES"
> natd_interface="tun0"
> natd_flags="-dynamic"
> gateway_enable="YES"
> ppp_enable="YES"
> ppp_mode="ddial"
> ppp_profile="default"
seems to be good.
> ipfw show
> 00050 fwd 192.168.1.150,80 tcp from any to 192.168.1.150 in via tun0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = BAD
use this
natd_flags="-dynamic -redirect_port 192.168.1.150:80 80"
More information about the freebsd-questions
mailing list