We need to configure certain IP addresses to only run on WAN01.

Started by gunking2, November 23, 2026, 05:00:04 AM

Previous topic - Next topic
I have a setup with 3 WAN connections (WAN01, WAN02, and WAN03).

I need to create a rule that forces traffic from a specific server (with IP xx) to exit exclusively via WAN01.

Currently, I am encountering an issue: when only WAN01 is active, external users can consistently access the server. However, as soon as WAN02 or WAN03 come online, external access is disrupted, and users are no longer able to reach the server.

Could you please provide a solution for this?

Hello, you have an asymmetric-routing issue.

Create a LAN firewall rule: Source = server IP xx, Destination = Any, Gateway = WAN01. Place it above any Multi-WAN rules.

In Firewall → NAT → Destination NAT, open the server's rule and set Firewall rule to Manual.

Then go to Firewall → Rules → WAN01, open the rule for the redirected service, click Show advanced options, and set Reply-to gateway to the WAN01 gateway.

This forces replies back through WAN01, preventing the issue when WAN02 or WAN03 are online.

I hope this helps
Hardware: N5105 Intel Celeron  
                       OPNsense | Home Lab | Linux & Home Automation
                               "Secure the network, automate the rest."

Quote from: (MARLOO) on November 23, 2026, 05:46:46 AMHello, you have an asymmetric-routing issue.

Create a LAN firewall rule: Source = server IP xx, Destination = Any, Gateway = WAN01. Place it above any Multi-WAN rules.

In Firewall → NAT → Destination NAT, open the server's rule and set Firewall rule to Manual.

Then go to Firewall → Rules → WAN01, open the rule for the redirected service, click Show advanced options, and set Reply-to gateway to the WAN01 gateway.

This forces replies back through WAN01, preventing the issue when WAN02 or WAN03 are online.

I hope this helps




Thank you very much.

However,

Regarding the instructions provided—specifically, going to Firewall → NAT → Destination NAT, opening the server's rule, and setting the "Firewall rule" to "Manual"—this did not work. I tried an alternative:

I went to Firewall → NAT → Destination NAT, opened the server's rule, and set the "Firewall rule" to "Register rule." (This got the system working again.)

Quote from: gunking2 on November 23, 2026, 05:00:04 AMCurrently, I am encountering an issue: when only WAN01 is active, external users can consistently access the server. However, as soon as WAN02 or WAN03 come online, external access is disrupted, and users are no longer able to reach the server.
Quote from: gunking2 on November 23, 2026, 05:00:04 AMI need to create a rule that forces traffic from a specific server (with IP xx) to exit exclusively via WAN01.
This wouldn't solve your issue as long as you don't set "sloppy state" in the rule, because the rule would only affect traffic initiated by the server itself, but not replies from it.

In a multi-WAN setup you need a to define rules for incoming traffic on each unique interface. And you must not use floating or group pass rules for incoming traffic.
Remember that floating and group rules have priority over interface rules. I.e. no floating or group pass rule must match the incoming traffic. So best practice is to not define any.

"Register rule" in the destination NAT means that OPNsense adds a respective rule to the interface automatically. With "Manual" you have to add it by yourself.

Exactly, for inbound connections, set Reply-to gateway = WAN01 in the WAN01 rule created by the Register rule

enable sloppy state if needed.
Hardware: N5105 Intel Celeron  
                       OPNsense | Home Lab | Linux & Home Automation
                               "Secure the network, automate the rest."