IPFW Access port forwarding from inside network to WAN IP

Dear All,

I configured port forwarding and I can access from outside to my server but I want to connect from inside network with my outside IP.
Code:
ipfw nat 1 config if em0 log redirect_port tcp 192.168.0.66:80 82
How can I configure this with IPFW?
Code:
http://195.x.x.x:82
Code:
ipfw flush
ipfw add 14500 nat 1 ip from any to any via em0
ipfw add 14600 allow all from any to any
Could you possible to send me sample configuration?

Best regards.
 
You may find this helpful. Either "NAT reflection" or "NAT loopback" is what this is often referred as. It can be a bit of an unusual behavior because sending packets back out the interface they just came in on is usually an undesirable behavior. Routing loops are not fun.

http://blog.pcbsd.org/2015/01/using-trueos-as-a-ipfw-based-home-router/

If I remember the discussion right, there was some comments about the above, particularly the recommendation to use a TCP proxy instead of a purely firewall based solution.
http://www.bsdnow.tv/episodes/2015_01_14-common_sense_approach
 
I tried tcpproxy and it is not a good solution for me, because I can use UDP ports and port range cannot be defined at tcpproxy.
I couldn't find documents for NAT reflection and NAT loopback, "NAT reverse" can be use for this aim?
 
Last edited by a moderator:
Back
Top