I've never used FreeBSD in my life but it's neccesary for me to deploy an HTTP API on FreeBSD. The API is deployed on port 3002.
What do I need to do to forward requests from port 80 to port 3002?
I tried adding this to my /etc/natd.conf file:
interface le0
use_sockets yes
dynamic yes
redirect_port tcp 192.168.1.8:80 192.168.1.8:3002
I also have this in my /etc/ipfw.rules file:
ipfw add 1000 fwd 127.0.0.1,80 tcp from any to any 3002
When I run ipfw -q -f flush
I get:
ipfw: setsockopt(IP_FW_XDEL): Protocol not available
I don't know what any of this means, but it's not working.
Can somebody please tell me (in simple newbie terms) how to forward requests from 80 to 3002 in FreeBSD?
(I'm assuming port 80 is both open and the default port for HTTTP requests on a brand new FreeBSD installation)