Port forwarding doesn't work from external network [SOLVED]

Started by wusikijeronii, November 05, 2021, 12:34:06 PM

Previous topic - Next topic
November 05, 2021, 12:34:06 PM Last Edit: November 05, 2021, 10:55:48 PM by wusikijeronii
Hello. I am an OPNsense beginner.
I installed OPNsense instance to the laptop (one physical port) and added NAT forwarding for a port. It works if I try to reach a destination from my local network. Bur when I try to reach the destination from an external network I get a timeout error.
I also tried to add allow firewall rule for the destination subnet. It didn't help. And I also tried to launch a TCP dump from an external client. I send requests but I don't get replies. In the firewall log, no errors are shown.

Out of interest, why would you run something like OPNsense on a laptop?

November 05, 2021, 12:40:06 PM #2 Last Edit: November 05, 2021, 12:46:42 PM by wusikijeronii
I broke the display from the laptop and bought a new one. But this one - i7, 16 GB RAM, SSD looks like a good hardware for a firewall.

November 05, 2021, 02:01:28 PM #3 Last Edit: November 05, 2021, 03:33:02 PM by wusikijeronii
I fixed it by adding a LAN interface to the Captive Portal. I think it is because I don't have a WAN port (only LAN). Am I right?
UPD: No. I tried to use the HTTP port. When I changed the port it doesn't work again
UPD: Removed all rules and recreated these again. Works!

November 05, 2021, 10:32:44 PM #4 Last Edit: November 05, 2021, 10:56:35 PM by wusikijeronii
Removed masquerade from the router and it doesn't work again.
Requested packet forwards from router to OPNsense. OPN forward packet to need port to destination. Destination host returns packet (out packet) to OPNsense. OPNsense does nothing. I don't understand why.
From the OPNsense ssh session, I also get a timeout error.
Router (Mikrotik) tcp dump:
https://drive.google.com/file/d/1_Z0rAlLSwVEEg1YFQbfIgOCqtRNdUJwy
OPNsense tcpdump:
https://drive.google.com/file/d/1aBRO_Vch8Ryx_BmdIlO1ZY8NMh5aWd2M/view?usp=sharing

UPD: Found a solution. I added a rule to out NAT (don't know the exact name 'cos I use non-English language in OPNsense web. I mean reverse NAT)