> Hi all, > > I have a webserver runing apache 2.3 under windows 2003, and one BSD 5.4 > (gateway). > > How to redirect requisitions at 80´s port (200.X.X.X:80) to address > (192.x.x.x:80) with nat and ipfw? > Pretty simple if you are using natd.
In /etc/rc.conf: ### Firewall Settings ### firewall_enable="YES" ipdivert_enable="YES" gateway_enable="YES" firewall_type="MYOWN" natd_enable="YES" natd_interface="xl0" (replace with your external interface) natd_flags="-f /etc/rc.natd" ######################### In /etc/rc.natd: # # NATD configurationfile that supplies NATD whit parameters # log no use_sockets yes same_ports yes # Ports redirected to the internal network redirect_port tcp 192.168.0.100:22 222 redirect_port tcp 192.168.0.111:80 80 ^ redirecting ^ obvious ^ external port ^ type of traffic ^ internal port In the /etc/rc.firewall: divert 8668 ip from any to any via xl0 (will be your external interface) This is all there is to it (put in a simple way...) Regards /Erik > > Att, > Rodrigo Mufalani > > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > _______________________________________________ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "[EMAIL PROTECTED]"