Giter Club home page Giter Club logo

Comments (4)

dceara avatar dceara commented on August 19, 2024 1

So, essentially, this doesn't mean "DNAT only traffic destined to IP 1.1.1.1 and port range 22-23", it means "DNAT traffic destined to IP 1.1.1.1 and select a new destination port from range 22-23".

Ah, okay. The term PAT got me confused and I thought it was like traditional port-forwarding. Is there a way to accomplish said thing, though?

Hmm, probably the only way is to add a (stateless maybe) ACL in the switch connecting to the router that does the DNAT. I guess that's a security group rule in OpenStack terminology.

from ovn.

dceara avatar dceara commented on August 19, 2024 1

Closing this as it's working as expected. Please feel free to continue the discussion but you might get more feedback by posting this question as an email to [email protected].

from ovn.

dceara avatar dceara commented on August 19, 2024

@modzilla99 If I understand correctly your use case I guess there's a confusion of terms here. The external_port_range attribute on a NAT entry instructs OVN (and indirectly conntrack) what range of ports it should use when (D)NATing traffic destined to that IP:

ovn/ovn-nb.xml

Lines 3763 to 3767 in dc34b4d

<p>
Range of ports, from which a port number will be picked that will
replace the source port of to be NATed packet. This is basically
PAT (port address translation).
</p>

With your example, ovn-nbctl --portrange lr-nat-add neutron-e6777adf-ec9f-4cf1-b954-736133ce5c3f dnat 1.1.1.1 10.0.0.250 22-23, it's expected that NAT will change the destination IP to 10.0.0.250 and will select a destination port from the range 22, 23.

So, essentially, this doesn't mean "DNAT only traffic destined to IP 1.1.1.1 and port range 22-23", it means "DNAT traffic destined to IP 1.1.1.1 and select a new destination port from range 22-23".

Or did I misunderstand your scenario?

As a side note, it shouldn't be round-robin, it should be random. But maybe that's because you're missing this recent fix:
0ef388c

Thanks,
Dumitru

from ovn.

modzilla99 avatar modzilla99 commented on August 19, 2024

So, essentially, this doesn't mean "DNAT only traffic destined to IP 1.1.1.1 and port range 22-23", it means "DNAT traffic destined to IP 1.1.1.1 and select a new destination port from range 22-23".

Ah, okay. The term PAT got me confused and I thought it was like traditional port-forwarding. Is there a way to accomplish said thing, though?

As a side note, it shouldn't be round-robin, it should be random. But maybe that's because you're missing this recent fix: 0ef388c

Yes, we don't have that patch applied. Seems like its causing it.

Or did I misunderstand your scenario?

No you did not. Thanks for the clarification.

Best regards

from ovn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.