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

Problem connecting to wireguard server #20

Closed
damarges opened this issue Jan 11, 2023 · 3 comments
Closed

Problem connecting to wireguard server #20

damarges opened this issue Jan 11, 2023 · 3 comments

Comments

@damarges
Copy link

damarges commented Jan 11, 2023

Receiving error message when connecting to my wireguard vpn server. Server works properly I can connect from other devices.

here is my config.

Interface:

private_key: myprivatekey=
address: 10.8.0.5/24
dns:
  - 1.1.1.1
post_up: iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE
post_down: iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE

Peers:

 - public_key: mypublickey=
  pre_shared_key: thepresharedkey=
  endpoint: myserversdomain.com:51820
  allowed_ips:
    - 0.0.0.0/0
  persistent_keep_alive: "25"`

Error output:

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] config.sh: executing... 
[18:49:53] INFO: Ended to write Wireguard configuration into: [/etc/wireguard/wg0.conf]
[cont-init.d] config.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[18:49:53] INFO: Starting WireGuard Client...
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.5/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl: error setting key 'net.ipv4.conf.all.src_valid_mark': Read-only file system
[#] resolvconf -d wg0 -f
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] ip link delete dev wg0
@gabaweb
Copy link

gabaweb commented Jan 11, 2023

I'm having the exact same problem, if you find a solution let me know.

@bigmoby
Copy link
Owner

bigmoby commented Jan 11, 2023

Please try to avoid 0.0.0.0/0 as allowed ip and try again.

@damarges
Copy link
Author

damarges commented Jan 11, 2023

Thanks, that worked out. Maybe worth to document on readme page

Now using 10.8.0.0/24 as allowed IPs and it works.
Thanks for your work on this add-on.

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