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

Conversation

stephan2012
Copy link

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 commented Jun 25, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. system System category labels Jun 25, 2019
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Jun 25, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 3, 2019
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Oct 27, 2019
@relrod
Copy link
Member

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

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

@ansibot ansibot added pre_azp This PR was last tested before migration to Azure Pipelines. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 4, 2020
@ophum
Copy link

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 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

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.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. pre_azp This PR was last tested before migration to Azure Pipelines. support:core This issue/PR relates to code supported by the Ansible Engineering Team. system System category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants