OPNsense Forum

English Forums => General Discussion => Topic started by: testccc on July 11, 2022, 06:13:09 PM

Title: port forwarding not work
Post by: testccc on July 11, 2022, 06:13:09 PM
here is my config:

opnsense as the default gateway, A, B, C 3 machines are under the same Lan and machine B is openwrt.

gateway configuration:
- A configures the gateway as B
- B, C configure the gateway as opnsense

port forwarding configuration:
- opnsense(4000)->A(22)
- opnsense(4001)->C(22)

According to the above configuration, after the port forwarding is enabled in opnsense, the external network can access the port of C normally, but cannot access the port of A. does anyone know what the problem is?
Title: Re: port forwarding not work
Post by: Patrick M. Hausen on July 11, 2022, 07:16:48 PM
What's the "associated firewall rule" in the port forwarding page set to? It should be "pass".
Title: Re: port forwarding not work
Post by: testccc on July 12, 2022, 02:41:00 PM
thank you for your reply.
you means this option should be selected to `Pass`?  i will try it later.
(https://image.sendev.cc/hackmd/uploads/upload_6484a699d234f0f0f081d4ec98d5d57f.png)
Title: Re: port forwarding not work
Post by: testccc on July 12, 2022, 07:31:31 PM
this is the log after I modified the rule to pass, but it still doesn't work.

the ip starting with 80 is the external network test machine (machine X)
the ip starting with 183 is my external network ip (opnsense)
the ip starting with 192.168 is the internal test machine (machine A)
machine B is not listed above, it is the gateway of A, and its gateway points to opnsense

The port forwarding test link looks like this
X->opnsense(PORT:36000)->A(PORT:22)


(https://image.sendev.cc/hackmd/uploads/upload_2bed1b918269320fb2a25e3740af07a0.png)