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

problems with ip-forwarding #93

Open
schnapper79 opened this issue Jul 20, 2020 · 1 comment
Open

problems with ip-forwarding #93

schnapper79 opened this issue Jul 20, 2020 · 1 comment

Comments

@schnapper79
Copy link

schnapper79 commented Jul 20, 2020

Hi there,

i seem to have a strange behavior which I narrowed down to this library even if it makes no sense in the first place.

I wrote an application where clients can add themselves to the wireguard vpn via gprc calls.I want to have ipforwarding within the private network using the "wireguard -server" where the application is running as a "router". It's a machine running Arch linux, IP-forwarding is activated via sysctl and iptables, routes for the network (lets say 172.15.0.0/16) get set when firing up the device with wg-quick up wg0.

When server is up the clients can connect the server via gprc, give their public key, get their associated IP and the public key of server and are added to the server wireguard configuration using this library (adding a new peer like shown in the examples). So far everything works fine, i get a connection, I can ping or ssh from server to client and backwards, just like a dream. BUT: i can not ping from Client A to Client B. I use the same configuration for allowedIPs as I do when configuring manually via wg0.conf. Configuring the wireguard device on server 100% via wg0.conf, IP-forwarding works 100% (I tested by using wg showconf wg, stored configuration into wg0.conf and started again without using this library.) Is there any flag I have to set when adding a peer with this library i may have overlooked? Any Ideas what might be wrong?

Just to clearify: i am using wireguard as a kernel module

@WireGuard WireGuard deleted a comment from AkaCyberRat Oct 23, 2022
@SaadAhmedGit
Copy link

I am probably late but this is because you need to add a rule in the routing table to route that particular ip to the wireguard interface. This is not the job of this library and wg-quick does it automatically.

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