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

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@stephan2012
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.