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

Helm deployement, client connect but not routed/nat correctly #140

Open
sarce666 opened this issue Jul 13, 2021 · 5 comments
Open

Helm deployement, client connect but not routed/nat correctly #140

sarce666 opened this issue Jul 13, 2021 · 5 comments

Comments

@sarce666
Copy link

hello

i use the helm chart to deploy it
my client is connected , i can see it in my gui wireguard interface in green
in my client i can ping it gateway 10.44.0.1
in my pods i can ping my client 10.44.0.6
but my client cannot go to iinternet

in my wireguard server , if i do a tcpdum in wg0 i can see the packet for the port 443
but in my eth0 i have nothing , like the packet is not routed/nat ?

thanks for your help

here is my values.yaml

config:
dns:
upstream:
- "8.8.8.8"
loglevel: debug
externalHost: "xxx"
vpn:
cidr: 10.44.0.0/24
allowedIPs:
- 0.0.0.0/0
- ::/0

web:
config:
adminUsername: ""
adminPassword: ""
wireguard:
config:
privateKey: ""
service:
type: "LoadBalancer"
#loadBalancerIP: ""
persistence:
enabled: true

Persistent Volume Storage Class

If defined, storageClassName:

If set to "-", storageClassName: "", which disables dynamic provisioning

If undefined (the default) or set to null, no storageClassName spec is

set, choosing the default provisioner. (gp2 on AWS, standard on

GKE, AWS & OpenStack)

storageClass: "-"

size: 100Mi
annotations: {}
accessModes:
- ReadWriteOnce
subPath: ""

@mattlathrop
Copy link

I'm having the same issue. Did you find a solution?

@mattlathrop
Copy link

Adding a bit of color here:
Logging into the shell of the pod, it seems forwarding has not been enabled on the container (i.e. cat /proc/sys/net/ipv4/ip_forward returns 0)? Is that normal @Place1? Attempts to change it give me errors that the file system is read only.

@rtrox
Copy link

rtrox commented Nov 18, 2021

another +1 here.

@AlexisDucastel
Copy link

For everyone still having the problem, here is a workaround that does not involve sysctl admin tricks with PSPs and other.

Just patch your wg-access-server deployment with this initContainer :

      initContainers:
      - command:
        - sysctl
        - -w
        - net.ipv4.ip_forward=1
        image: busybox
        imagePullPolicy: IfNotPresent
        name: init-sysctl
        securityContext:
          privileged: true
          runAsNonRoot: false
          runAsUser: 0

It will works fine, and even if it need privileged container, it's just the time to set the sysctl, after that the main container remains not privileged as expected !

@AlexisDucastel
Copy link

Just added a Pull Request to fix this : #162

DasSkelett added a commit to DasSkelett/wg-access-server that referenced this issue Apr 2, 2022
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

4 participants