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

Added support for iptables IPVS match #58329

Closed
wants to merge 1 commit into from
Closed

Conversation

@stephan2012
Copy link

@stephan2012 stephan2012 commented Jun 25, 2019

SUMMARY

Added support for the missing IPVS match target in the iptables module

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

iptables

ADDITIONAL INFORMATION

Setting up Source NAT for, e.g. one-armed IPVS-based loadbalancers lacked support for the VIP address and VPort arguments. This PR implements these arguments and allows issueing

- name: "Setup SNAT for LVS"
  iptables:
    table: nat
    chain: POSTROUTING
    match: ipvs
    vaddr: '192.168.1.11/24'
    vport: 443
    jump: SNAT
    to_source: '192.168.1.21'
    comment: "SNAT the VIP"

which is the equivalent of

iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.1.11 --vport 443 -j SNAT --to-source 192.168.1.21

Like other matches it requires a kernel module to be loaded first (xt_ipvs in this case).

@ansibot
Copy link
Contributor

@ansibot ansibot commented Jun 25, 2019

@relrod
Copy link
Member

@relrod relrod commented Oct 23, 2020

Can you rebase this to resolve the conflict, and add a changelog and (if possible) tests?

@stephan2012
Copy link
Author

@stephan2012 stephan2012 commented Nov 10, 2020

@relrod, at the moment I am too busy. Either please take over or wait until I can do it.

@ophum
Copy link

@ophum ophum commented Nov 4, 2021

@stephan2012 Thank you for your feature!. I fixed conflict of your pull request, because I need this, too.

@stephan2012
Copy link
Author

@stephan2012 stephan2012 commented Nov 4, 2021

@stephan2012 Thank you for your feature!. I fixed conflict of your pull request, because I need this, too.

@ophum Big thanks for taking care of this issue!

@stephan2012
Copy link
Author

@stephan2012 stephan2012 commented Nov 4, 2021

Closing in favor of PR #76219.

@stephan2012 stephan2012 closed this Nov 4, 2021
@ansible ansible locked and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants