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

Automatic NAT rules vanish when upstream gateway is auto-detect #7339

Closed
2 tasks done
Saarbremer opened this issue Mar 21, 2024 · 3 comments
Closed
2 tasks done

Automatic NAT rules vanish when upstream gateway is auto-detect #7339

Saarbremer opened this issue Mar 21, 2024 · 3 comments
Assignees
Labels
cleanup Low impact changes

Comments

@Saarbremer
Copy link

Important notices

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

Describe the bug

WAN IF is setup with static IPv4: Bug occurs when selecting upstream gateway = Auto-detect: All automatic outbound NAT rules disappear and IPv4 usage in public internet relying on NAT fails to work. Tested on latest 24.1.4_amd64. Defining the gateway manually as upstream gateway makes these rules to reappear and NAT works again.

To Reproduce

  1. Set up WAN IF with static public IPv4
  2. Set up an upstream gateway in System -> gateway
  3. Set Outbound NAT to automatic
  4. Define auto-detect as "IPv4 Upstream Gateway" for WAN IF
  5. Check Outbound NAT page.
    ---> No rules displayed
    ---> No outgoing IPv4 traffic to public internet

Expected behavior

Automatic outbound NAT rules remain where they are.

Describe alternatives you considered

In step 4 use the defined gateway from step 2 instead of auto-detect. IPv4 outbound NAT works again and rules are visible.

Screenshots

N/A

Relevant log files

N/A - I don't know which files might be interesting, please let me know.

Additional context

Since auto-detect is recommended by the docs it should also work that way. See also (German) discussion https://forum.opnsense.org/index.php?topic=39528.0

Environment

Software version used and hardware type if relevant, e.g.:
OPNsense 24.1.4-amd64
FreeBSD 13.2-RELEASE-p10
OpenSSL 3.0.13
Intel(R) Celeron(R) CPU N3450 @ 1.10GHz (4 cores, 4 threads)

@AdSchellevis AdSchellevis added the support Community support label Mar 21, 2024
@AdSchellevis
Copy link
Member

which part of the docs are we referring to here? changing this behavior will break most people setup, so fixing the docs (or the text in the gui) might be wiser here.

@Saarbremer
Copy link
Author

The docs state for the interface configuration

In addition outbound nat will be set up automatically when mode is set to Automatic or Hybrid

which is ok.

But in outbound NAT there is no word about that specific required setting in order to get automatic rules to work. And unfortunately - which I find most important - the web ui says

If this interface is a multi-WAN interface, select an existing gateway from the list. For single WAN interfaces a gateway must be created but set to auto-detect.

which would render automatic outbound NAT useless if followed in single WAN setups with static configuration.

@AdSchellevis
Copy link
Member

help text and documentation could use some attention indeed, actually behavior not so much.

@AdSchellevis AdSchellevis self-assigned this Mar 21, 2024
@AdSchellevis AdSchellevis added cleanup Low impact changes and removed support Community support labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

No branches or pull requests

2 participants