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

errors in the logs after installing 2 contiguous cidr ranges #4

Open
dylanscott opened this issue May 18, 2018 · 2 comments
Open

errors in the logs after installing 2 contiguous cidr ranges #4

dylanscott opened this issue May 18, 2018 · 2 comments

Comments

@dylanscott
Copy link

I don't know if this was actually causing any problems but I noticed the logs for the k8s-custom-iptables pods had errors every time the configuration was being printed after I installed it with 2 CIDR ranges. I ran

TARGETS="10.0.0.0/29 10.0.0.8/29" ./install.sh

(These were the two ranges printed out by two Cloud Memorystore instances - I was following this documentation). In the logs I was getting:

screen shot 2018-05-18 at 9 39 40 am

This went away after I reconfigured to combine the blocks into 10.0.0.0/28

@bvanhoekelen
Copy link

We also got this problem and fixed it with adding a ,.

Solution

TARGETS="10.0.0.0/29,10.0.0.8/29" ./install.sh

Verification
To verify this approach: login the VM instance in the gcloud console (GCP > Compute Engine > VM instances > SSH) and run:

sudo iptables -L -t nat | grep "custom-iptables"

You should see:

MASQUERADE  all  --  anywhere             10.0.0.0/29          /* custom-iptables-1537539514: 10.0.0.0/29,10.0.0.8/29 */
MASQUERADE  all  --  anywhere             10.0.0.8/29          /* custom-iptables-1537539514: 10.0.0.0/29,10.0.0.8/29 */

@sudermanjr
Copy link

I can also verify that the solution above works.

lucaong added a commit to lucaong/k8s-custom-iptables that referenced this issue Mar 17, 2023
The README was showing a space-separated list of IP ranges in `TARGETS` or in `nat.rules`, which does not work and causes issue bowei#4 . Instead, the correct solution is to use a comma-separated list. This commit updates the README accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants