Skip to content

fix(migration): rename NS7 hairpin zones and drop VPN ones - #2035

Open
gsanchietti wants to merge 3 commits into
mainfrom
migration-blue-reflection
Open

gsanchietti wants to merge 3 commits into
mainfrom
migration-blue-reflection

Conversation

@gsanchietti

@gsanchietti gsanchietti commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

When a NethServer 7 system with a blue or orange interface and hairpin NAT enabled is migrated, every port forward lists the blue or orange zone as a hairpin zone.
The blue zone becomes guest and the orange zone becomes dmz on NethSecurity, so the firewall rejects the unknown zone and skips all port forwards.
The migration now renames blue to guest and orange to dmz in the hairpin zones of each port forward.
VPN zones are no longer added as hairpin zones: the firewall cannot determine their addresses, so it disabled reflection on them anyway and logged "internal rewrite IP cannot be determined" for each rule, zone and protocol.

Fixes #2034

How to test

  • On NethServer 7.9, configure a blue and an orange interface, a few port forwards, a VPN (OpenVPN road warrior, OpenVPN or IPsec tunnel) and enable hairpin NAT, then export the configuration
  • Import it on NethSecurity with ns-import
  • Run fw4 check: no port forward is skipped, reflection_zone lists guest and dmz instead of blue and orange, and no VPN zone is listed
  • Hairpin NAT rules are created for the lan, guest and dmz networks, and no "internal rewrite IP cannot be determined" warning is logged

Generated by Claude Code:claude-opus-5-5 with nethserver-pr

https://claude.ai/code/session_01MSZ8Qo9Px5cXUv61AxqVcT

NethServer 7 exports port forwards with the blue zone in their hairpin
NAT zones, but the blue zone is migrated as guest. fw4 rejects the
unknown zone and skips every port forward.

Assisted-by: Claude Code:claude-opus-5-5
Claude-Session: https://claude.ai/code/session_01MSZ8Qo9Px5cXUv61AxqVcT
@m-dilorenzi m-dilorenzi changed the title fix(migration): rename blue hairpin zone to guest fix(migration): rename NS7 hairpin zones and drop VPN ones Nov 20, 2026
@m-dilorenzi
m-dilorenzi requested a review from Tbaile November 20, 2026 16:40
@m-dilorenzi
m-dilorenzi marked this pull request as ready for review November 20, 2026 16:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration from NethServer 7.9: all port forwards are skipped when hairpin NAT and a blue zone are configured

2 participants