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

ICMP checks fail when using IPv6 literal #111

Closed
jortgies opened this issue May 12, 2021 · 5 comments
Closed

ICMP checks fail when using IPv6 literal #111

jortgies opened this issue May 12, 2021 · 5 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@jortgies
Copy link

I am using this simple config.yaml:

storage:
  file: /data/persistence
services:
  - name: crimson v4
    url: "icmp://31.24.148.107"
    conditions:
      - "[CONNECTED] == true"
  - name: crimson v6
    url: "icmp://[2a06:e881:5806:42:4c0:deff:fe2e:5910]"
    conditions:
      - "[CONNECTED] == true"
  - name: crimson.ortg.de
    url: "icmp://crimson.ortg.de"
    conditions:
      - "[CONNECTED] == true"
  - name: crimson tcp v6
    url: "tcp://[2a06:e881:5806:42:4c0:deff:fe2e:5910]:443"
    conditions:
      - "[CONNECTED] == true"

Only the ICMP-Check using the v6 literal is failing, everything else is working fine. Even the TCP-Check using the v6 literal.
I've seen that in client/client.go (here) you set the Network to ip4, maybe this could cause my check to fail?

@TwiN
Copy link
Owner

TwiN commented May 12, 2021

When you say Even the TCP-Check using the v6 literal., do you mean that crimson tcp v6 works?

When I try it from my end, neither of them work. Might be a firewall or something, but when I try icmp://[::1], it works regardless of whether I use pinger.SetNetwork("ip4"), pinger.SetNetwork("ip6") or pinger.SetNetwork("ip")

@jortgies
Copy link
Author

When you say Even the TCP-Check using the v6 literal., do you mean that crimson tcp v6 works?

Yes, checking TCP for IPv6 works for me.

When I try it from my end, neither of them work. Might be a firewall or something, but when I try icmp://[::1], it works regardless of whether I use pinger.SetNetwork("ip4"), pinger.SetNetwork("ip6") or pinger.SetNetwork("ip")

This should not be a firewall issue, the host (or at least tcp port 443) is not firewalled. Are you using docker for testing this? If you don't explicitly enable IPv6 your container may not be able to reach the IPv6 internet.

I can reproduce the same behaviour using the Google DNS. ICMP does not work, while TCP Port 53 works fine.

  - name: google v6 icmp
    url: "icmp://[2001:4860:4860::8888]"
    conditions:
      - "[CONNECTED] == true"
  - name: google v6 tcp
    url: "tcp://[2001:4860:4860::8888]:53"
    conditions:
      - "[CONNECTED] == true"

@TwiN
Copy link
Owner

TwiN commented May 14, 2021

Turns out that my ISP doesn't support IPv6, hence why it wasn't working.

That being said, after trying on a my laptop while connecting to another router , both of them work on windows:

2021/05/13 20:01:56 [watchdog][monitor] Monitored group=; service=google v6 icmp; success=true; errors=0; duration=174ms
2021/05/13 20:01:57 [watchdog][monitor] Monitored group=; service=google v6 tcp; success=true; errors=0; duration=169ms

On Docker, however, I wasn't able to make either work.
I can't promise I'll be able to find a fix anytime soon, as working on it requires me to work on it outside of my house, but at least you can use TCP for now, right?

If you or anybody else would like to have a go at fixing the issue, be my guest 😇

@TwiN TwiN added the bug Something isn't working label Jul 7, 2021
@eKristensen
Copy link

I have the same issue even when running outside of a docker container on a machine with full IPv6 connectivity.

@TwiN TwiN added the duplicate This issue or pull request already exists label Apr 28, 2024
@TwiN
Copy link
Owner

TwiN commented Apr 28, 2024

The privilege issue is discussed in #697

As for specifying ipv6/ipv4, this was implemented in #661

@TwiN TwiN closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants