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

Netclient v0.21.0 on Windows - False Egress Routes #595

Open
pankios opened this issue Sep 24, 2023 · 0 comments
Open

Netclient v0.21.0 on Windows - False Egress Routes #595

pankios opened this issue Sep 24, 2023 · 0 comments

Comments

@pankios
Copy link

pankios commented Sep 24, 2023

The netclient do not passes correctly the external routes of the egress nodes on my network.

The problem is on file wireguard_windows.go

 mask := net.IP(addr.Network.Mask)

slog.Info("adding route to interface", "route", fmt.Sprintf("%s -> %s", addr.IP.String(), addr.Network.String()))
cmd := fmt.Sprintf("route -p add %s MASK %v %s", addr.IP.String(),mask,addr.IP.String())
_, err := ncutils.RunCmd(cmd, false)
if err != nil { slog.Error("failed to apply", "egress range", addr.IP.String()) }

The command that is created above
route -p add %s MASK %v %s", addr.IP.String(),mask,addr.IP.String()

Passes two times the addr.IP.String() that is the windows netmaker interface address

it should be like following

route -p add %s MASK %v %s", addr.Network.String(),mask,addr.IP.String()

The wrong route that is produced it is indeed passing to the routing table of the windows machine

@pankios pankios changed the title Netclient on Windows - Egress Routes passing - BUG Netclient v0.21.0 on Windows - Egress Routes passing - BUG Sep 24, 2023
@pankios pankios changed the title Netclient v0.21.0 on Windows - Egress Routes passing - BUG Netclient v0.21.0 on Windows - False Egress Routes - BUG Sep 24, 2023
@pankios pankios changed the title Netclient v0.21.0 on Windows - False Egress Routes - BUG Netclient v0.21.0 on Windows - False Egress Routes #bug Sep 24, 2023
@pankios pankios changed the title Netclient v0.21.0 on Windows - False Egress Routes #bug Netclient v0.21.0 on Windows - False Egress Routes Dec 5, 2023
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

1 participant