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

Peers can't contact eachother over the network #180

Open
Twi opened this issue Jun 27, 2024 · 3 comments
Open

Peers can't contact eachother over the network #180

Twi opened this issue Jun 27, 2024 · 3 comments

Comments

@Twi
Copy link

Twi commented Jun 27, 2024

Describe the bug
I want to create a network such that peers can contact eachother as if they were on the same physical network segment.

To Reproduce
Steps to reproduce the behavior:

apiVersion: v1
kind: Namespace
metadata:
  name: wireguard
---
apiVersion: vpn.wireguard-operator.io/v1alpha1
kind: Wireguard
metadata:
  name: "ponyville"
  namespace: wireguard
spec:
  mtu: "1380"
  serviceType: "NodePort"
  enableIpForwardOnPodInit: true
---
apiVersion: vpn.wireguard-operator.io/v1alpha1
kind: WireguardPeer
metadata:
  name: rainbow-dash
  namespace: wireguard
spec:
  wireguardRef: "ponyville"
---
apiVersion: vpn.wireguard-operator.io/v1alpha1
kind: WireguardPeer
metadata:
  name: rarity
  namespace: wireguard
spec:
  wireguardRef: "ponyville"

Expected behavior
Node rainbow-dash to be able to ping node rarity and connect over TCP/UDP/IP.

Additional context
Add any other context about the problem here.

@jodevsa
Copy link
Owner

jodevsa commented Jun 30, 2024

Hi @Twi,

Thank you for openning the issue. I have tried to reproduce and at least I can verify that ICMP connectivity (ping) between the nodes is possible.

Screenshot 2024-07-01 at 00 15 04

How are you verifying this?

@jodevsa
Copy link
Owner

jodevsa commented Jun 30, 2024

HTTP (TCP) is also possible between the peers

@jodevsa
Copy link
Owner

jodevsa commented Jun 30, 2024

Can you try to also check connectivity from the wireguard pod itself. here are some tips on how you can debug this:

find out the wireguard pod

kubectl get pods -lapp=wireguard -n NAMESPACE_YOU_USED
Screenshot 2024-07-01 at 00 32 02

bash into the wireguard pod

kubectl exec -it <POD_NAME> -c agent -- bash

Screenshot 2024-07-01 at 00 32 30

list connected peers

wg
Screenshot 2024-07-01 at 00 32 42

list iptables rules

iptables -L

those should be similar to what I have as you haven't configured any networkpolicy

Screenshot 2024-07-01 at 00 35 47

connectivity check

ping 10.8.0.2
ping 10.8.0.3
Screenshot 2024-07-01 at 00 36 17

You could also do a tcpdump on the pod and analyse the logs. I'll be happy to help you debug this further and available for a quick call if needed

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

2 participants