OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: opiskala on May 14, 2020, 06:58:01 AM

Title: Port forward with WAN private IP
Post by: opiskala on May 14, 2020, 06:58:01 AM
For test.

WAN - 192.168.0.3
LAN 192.168.1.0/24

NAT  - see Attachment NAT
WAN rule  - see Attachment WAN

And it is not working :(

Title: Re: Port forward with WAN private IP
Post by: marjohn56 on May 14, 2020, 04:16:13 PM
Have you un-ticked  block private networks on the WAN interface settings?
Title: Re: Port forward with WAN private IP
Post by: opiskala on May 15, 2020, 12:36:28 AM
Yes
Title: Re: Port forward with WAN private IP
Post by: Maurice on May 15, 2020, 02:24:15 AM
Is the device you're testing this from in the WAN subnet? Then you might want to try disable reply-to in the advanced firewall settings.
Title: Re: Port forward with WAN private IP
Post by: opiskala on May 15, 2020, 06:58:33 AM
Still not working :(

Title: Re: Port forward with WAN private IP
Post by: marjohn56 on May 15, 2020, 10:14:51 AM
Check your port forward settings. Have a look at this link.


https://forum.opnsense.org/index.php?topic=8783.0 (https://forum.opnsense.org/index.php?topic=8783.0)
Title: Re: Port forward with WAN private IP
Post by: keropiko on May 15, 2020, 04:06:05 PM
Hello,
in addition to this, why nat reflection from internal lan to wan ip (public ip) behind double nat is now working correctly (very slow/not loading)?

mainly in different ports redirected (ex. port 5001 wan (behind double nat) to port 5000 internal )

is there something else to check?
Title: Re: Port forward with WAN private IP
Post by: opiskala on May 15, 2020, 05:23:46 PM
See this
I have no more ideas :(
Title: Re: Port forward with WAN private IP
Post by: marjohn56 on May 15, 2020, 08:23:26 PM
your redirect target up is a wan address, it should be the ip of the lan device your are forwarding to.
Title: Re: Port forward with WAN private IP
Post by: keropiko on May 15, 2020, 09:12:58 PM
Regarding wan nat reflection i have this setup:

Router with public ip x.x.x.x and lan ip 172.16.99.1 and dmz to ip 172.16.99.2 ------ opnsense wan ip 172.16.99.2 and lan ip 192.168.1.1

Port forward on opnsense destination wan ip address port 5001 nat to port 5000 internal ip 192.168.1.10.

From outside networks port forward working correctly. From the inside using wan public ip x.x.x.x (dynamic) nat reflection not working.

I have nat reflection enabled on firewall settings and at the nat rule.

Thanks
Title: Re: Port forward with WAN private IP
Post by: marjohn56 on May 15, 2020, 10:16:11 PM
Quote from: keropiko on May 15, 2020, 09:12:58 PM
Regarding wan nat reflection i have this setup:

Router with public ip x.x.x.x and lan ip 172.16.99.1 and dmz to ip 172.16.99.2 ------ opnsense wan ip 172.16.99.2 and lan ip 192.168.1.1

Port forward on opnsense destination wan ip address port 5001 nat to port 5000 internal ip 192.168.1.10.

From outside networks port forward working correctly. From the inside using wan public ip x.x.x.x (dynamic) nat reflection not working.

I have nat reflection enabled on firewall settings and at the nat rule.

Thanks


Can you create a separate forum topic for this please, answering a question about NAT reflection in a topic about port forwarding is not going to help anyone searching for topics on NAT reflection is it?
Title: Re: Port forward with WAN private IP
Post by: opiskala on May 16, 2020, 05:31:12 AM
I corrected.
Wan IP is 192.168.5.87

Lan 192.168.0.1/24

and target is 192.168.0.3

And still not working
Title: Re: Port forward with WAN private IP
Post by: opiskala on May 16, 2020, 05:59:04 AM
It is workig.
I changed port to 8900 and works.

Thank you. :)