mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 21:10:29 +01:00
Overlapping/Multiple NAT Support #971
Closed
opened 2025-12-29 16:27:26 +01:00 by adam
·
20 comments
No Branch/Tag Specified
main
update-changelog-comments-docs
feature-removal-issue-type
20911-dropdown
20239-plugin-menu-classes-mutable-state
21097-graphql-id-lookups
feature
fix_module_substitution
20923-dcim-templates
20044-elevation-stuck-lightmode
feature-ip-prefix-link
v4.5-beta1-release
20068-import-moduletype-attrs
20766-fix-german-translation-code-literals
20378-del-script
7604-filter-modifiers-v3
circuit-swap
12318-case-insensitive-uniqueness
20637-improve-device-q-filter
20660-script-load
19724-graphql
20614-update-ruff
14884-script
02496-max-page
19720-macaddress-interface-generic-relation
19408-circuit-terminations-export-templates
20203-openapi-check
fix-19669-api-image-download
7604-filter-modifiers
19275-fixes-interface-bulk-edit
fix-17794-get_field_value_return_list
11507-show-aggregate-and-rir-on-api
9583-add_column_specific_search_field_to_tables
v4.5.0
v4.4.10
v4.4.9
v4.5.0-beta1
v4.4.8
v4.4.7
v4.4.6
v4.4.5
v4.4.4
v4.4.3
v4.4.2
v4.4.1
v4.4.0
v4.3.7
v4.4.0-beta1
v4.3.6
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.9
v4.3.0-beta2
v4.2.8
v4.3.0-beta1
v4.2.7
v4.2.6
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.1.11
v4.1.10
v4.1.9
v4.1.8
v4.2-beta1
v4.1.7
v4.1.6
v4.1.5
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.11
v4.0.10
v4.0.9
v4.1-beta1
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.7.8
v3.7.7
v4.0-beta2
v3.7.6
v3.7.5
v4.0-beta1
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.6.9
v3.6.8
v3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0.3
1.0.0
Labels
Clear labels
beta
breaking change
complexity: high
complexity: low
complexity: medium
needs milestone
netbox
pending closure
plugin candidate
pull-request
severity: high
severity: low
severity: medium
status: accepted
status: backlog
status: blocked
status: duplicate
status: needs owner
status: needs triage
status: revisions needed
status: under review
topic: GraphQL
topic: Internationalization
topic: OpenAPI
topic: UI/UX
topic: cabling
topic: event rules
topic: htmx navigation
topic: industrialization
topic: migrations
topic: plugins
topic: scripts
topic: templating
topic: testing
type: bug
type: deprecation
type: documentation
type: feature
type: housekeeping
type: translation
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/netbox#971
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @engageant on GitHub (May 18, 2017).
Issue Type: Feature Request
Currently, netbox only allows a 1:1 mapping of inside IPs to outside IPs. If an inside IP is homed to several ISPs each with their own address space, we cannot accurately represent the NAT configuration in netbox:
IP address with this NAT IP (inside) already exists.
Currently, what I'm doing is adding the primary outside IP as the NAT address, then I add the secondary outside IP as an additional IP on the interface - not ideal. Would it be possible to extend the NAT functionality to allow one-to-many (inside to outside) mappings?
@jeremystretch commented on GitHub (Jun 1, 2017):
Not sure how I feel about this. The outside-to-inside mapping is currently one-to-one. Relaxing this constraint so that multiple outside IPs can share a single inside IP opens the door for ambiguity. If A and B are both outside IPs for C, then we have no way of discerning what our outside IP will be in a scenario where we only know C.
@engageant commented on GitHub (Jun 2, 2017):
Hmmm...any ideas on how to better accomplish this with the functionality
already in place?
On Thu, Jun 1, 2017 at 4:38 PM Jeremy Stretch notifications@github.com
wrote:
@traveler3468 commented on GitHub (Jun 16, 2017):
Thanks for getting me on the right discussion @jeremystretch. Sorry I missed it.
For me since this is a documentation tool I think it would be helpful to just be able to see that information.
IP C is NAT'd to both A and B, but for different destinations. On the IP address page for IP C you can look in the NAT (outside) section and see the IP's that it may be getting NAT'd to. But if you look at one of the outside addresses it will only be related to the one inside address
@cslingerland commented on GitHub (Sep 13, 2018):
What if you were to add a "destination" IP field for the NATs. Then you could have multiple NATs sourcing from a single IP, and you'd be able to tell the difference based on the destination.
@achard commented on GitHub (Jul 13, 2019):
I would point out that the ambiguity you are talking about is already there in the real world that is being modelled. If you only know C, and only one of the outside NAT addresses is listed in Netbox, somebody looking at Netbox may not realise that there are other addresses that could be a NAT outside address for this inside address.
This seems pretty straight forward on the surface.. change the OneToOneField to a ForeignKey.. plus the UI changes to accommodate multiple values :/
@vsvetlov commented on GitHub (Nov 26, 2019):
Hello,
@jeremystretch
As a temp solution, I would suggest updating a list of the roles for IP address object type with something like:
The reason for it is that a NAT IP address is usually served by a network device (router or firewall) and should be assigned to its interface but this use case is not covered by VIP, Secondary or HSRP roles.
@JNR8 commented on GitHub (Feb 24, 2020):
Did this ever get implemented?
We have soo many instances of multuiple outside IPs NAT'ing to a single Inside I which just can;t be documented in NetBox.
I have been trying to get colleauges to adopt NetBox as a documentation source for years now and they will not buy into it if it can't document what is percevied to be (rightly or wrongly) a standard within the industry.
@jeremystretch any chance this can be be revisited?
@JNR8 commented on GitHub (Feb 24, 2020):
To add to my issues, I also have 1:Many NATs that route to different internal IPs fro a single external IP based on the service (port number) that is used. I would like to be able to respresent this also.
@achard commented on GitHub (Apr 27, 2020):
This is not just an issue for Overloaded NATs. It seems a little like you have made a decision that static 1:1 NAT is the only legitimate use of NAT.
The world I am trying to model in Netbox is AWS. I need to be able to assign Elastic IPs (Which are essentially DNATs) to VPC addresses. Sometimes an internal address will have multiple EIPs. I dont think its Netbox's job to resolve the above mentioned ambiguity.
@agowa commented on GitHub (Jun 10, 2020):
We're also having this issue right now.
The NAT types nearly everybody is using today are NAT-PAT (RFC 3022) and NAT-PT (RFC 2766), basically a many to many relationship that we want to store within Netbox. A literal NAT (RFC 1631) is mostly the exception.
I therefore propose:
A mapping within the database could look like this internally:
Table 1: Defined Services including there Protocol Identifier (full list e.g. 6 for TCP)
Table 2: IPv6 Prefixes (IPv4 addresses could be stored as IPv4-Mapped Addresses for simplicity) with all other attributes they currently have (like unicast/anycast status, associated interface, ...) (This is the simplest option that allows to create NAT-PT relationships later, and the UI can simply derive the IPv4 addresses from that)
Table 3 (NAT-Mappings): With these attributes:
Constraints:
Note:
@BatmanAMA commented on GitHub (Aug 11, 2020):
to add to the support, we have many services that are offered internally to multiple private networks managed by different groups and those services are natted into their networks - documenting this mass of nats is critical to being able to support it and even more critical to automating DNS management
@noide35 commented on GitHub (Feb 18, 2021):
Hello,
no news for this request ?
I currently have the same need which is NOT PAT but be able to NAT one real/inside IP to multiple outside/natted IP.
So this is not PAT but NAT depending on the external network/isp/view. And it is the subject of the first message of this issue.
So in that case we still have a one-to-one IP mapping regarding the outside IP.
To do that, we need to be able to have a list of outside NAT IP in the Real IP. The opposit of today where we indicate a real/inside IP in the outside one.
@dmoranf commented on GitHub (Jun 1, 2021):
Hi,
Same use case here, it would be great if we can associate and have a list of multiple inside/outside NATs for a unique real IP since we are doing different statics NAT (1:1) for different source networks / clients.
@agowa commented on GitHub (Jul 4, 2021):
Is everything ok within netbox-community? There are so many deleted comments.
Was an account of the organization hacked?
@jeremystretch commented on GitHub (Jul 4, 2021):
Per our contributing policy, comments with no substance or which do not relate to the topic at hand are removed to preserve the conversation's focus.
@apellini commented on GitHub (Sep 14, 2021):
Also for me this feature could be useful.
I have multiple customer that I see using NAT 1:1 but Customer sees my services with different NAT IP of my service.
For example:
Service A Real IP on VRF PROD: 10.1.1.1
NAT IP Service A on VRF CustomerA: 10.20.20.1
NAT IP Service A on VRF CustomerB: 10.20.30.1
So I need to correlate 10.20.20.1 and 10.20.30.1 to 10.1.1.1 so I could have the correct NAT Table represented on NetBox.
Thanks in advance. If I could help tell me.
@maw1146 commented on GitHub (Nov 2, 2021):
Hi Guys,
why my comment was deleted? I have just asked if there was any update on this case...
@jeremystretch commented on GitHub (Nov 2, 2021):
Per the contributing guide:
If there were any updates on this issue, they would appear here. There is no reason to ask.
@jsenecal commented on GitHub (Dec 3, 2021):
As discussed over in Slack, I would be willing to take ownership of this Feature Request if contributions are accepted.
@jeremystretch commented on GitHub (Apr 8, 2022):
I'm going to tag this for v3.3 with the understanding that its implementation is limited to extending the current model to allow many-to-one NAT mapping. Because it has come up in conversation, I want to be clear that this FR does not entail L4 port mapping: Some additional data model (to be proposed in a future FR) would be needed to support that.