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

Write cmd-nse-istio-proxy #1

Open
edwarnicke opened this issue May 8, 2022 · 1 comment
Open

Write cmd-nse-istio-proxy #1

edwarnicke opened this issue May 8, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@edwarnicke
Copy link
Member

edwarnicke commented May 8, 2022

Write a simple cmd-nse-istio-proxy which is basically a variation of cmd-icmp-responder but returns a kernel.Mechanism with:

  1. SetRouteLocalNet(true) (see Add ROUTE_LOCALNET parameter to kernel.Mechanism api#134 )
  2. SetIPTables4NatTemplate(tmpl) ( see Enable kernel.Mechanism to specify IP Tables ipv4 Nat Chains/Rules api#133 )

where:

tmpl := `-N NSM_PREROUTE
-A NSM_PREROUTE -j ISTIO_REDIRECT
-I PREROUTING 1 -p tcp -i {{ .NsmInterfaceName }} -j NSM_PREROUTE
-N NSM_OUTPUT
-A NSM_OUTPUT -j DNAT --to-destination {{ .NsmSrcIps[0] }}
-A OUTPUT -p tcp -s 127.0.0.6 -j NSM_OUTPUT
-N NSM_POSTROUTING
-A NSM_POSTROUTING -j SNAT --to-source ${NsmDstIPs[0]}
-A POSTROUTING -p tcp -o ${NSM_INTERFACE} -j NSM_POSTROUTING`

This depends on networkservicemesh/sdk-vpp#573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants