Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Forward reply to not getting set correctly #7448

Open
2 tasks done
EkiciLP opened this issue May 9, 2024 · 3 comments
Open
2 tasks done

Port Forward reply to not getting set correctly #7448

EkiciLP opened this issue May 9, 2024 · 3 comments

Comments

@EkiciLP
Copy link

EkiciLP commented May 9, 2024

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

In a Multi-Lan setup with a VPN und a WAN:
When Port-Forwarding (IPv4) from the VPN to any internal device the replies from that device always get routed through the default WAN (The Policy routing that should route all the traffic from that machine through VPN is ignored).

To Reproduce

Steps to reproduce the behavior:

  1. Have a Wireguard VPN and normal WAN
  2. Create a Port-Forward from the VPN to any machine in the local network.
  3. See (using tcpdump) that replies to these requests get routed through the normal WAN

Expected behavior

The Replies should go back to their sender.

Describe alternatives you considered

When removing the auto-generated the traffic rule from the port forward and defining one myself setting reply-to to the VPN Gateway works. So maybe the reply-to in the auto generated rule is not set correctly?

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 24.7.a_388 (amd64).
Intel® Core™ i3-4160 3.6Ghz Dual Core
Network Intel® I350-T2

@Monviech
Copy link
Sponsor Member

Monviech commented May 9, 2024

@EkiciLP
Copy link
Author

EkiciLP commented May 9, 2024

Does that mean this is intended behavior? In my opinion its kind of tedious to always have to add both a Port Forward and a Firewall Rule. Can't that be automated?

@Monviech
Copy link
Sponsor Member

You could create the Port Forward and the Firewall rule manually, and use Aliases inside of them. Then if you update the aliases, for example adding another port/ip address, both the Port Forward and the Firewall rule would be updated automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants