NHAS / wag

Simple Wireguard 2FA
BSD 3-Clause "New" or "Revised" License
499 stars 27 forks source link

Overwrite ips which should be routed in wireguard config #28

Closed bluecraank closed 1 year ago

bluecraank commented 1 year ago

Your current version takes all ips which the client has to access and put them into AllowedIPs. It would be nice to overwrite them. So e.g instead of:

Simply 10.0.0.0/8 if needed

e.g ConfigKey OverwriteAllowedIPs= 10.0.0.0/8, 192.168.0.0/16

I hope its understandable

NHAS commented 1 year ago

So there are a couple problems with this suggestion, first off if you supply a /8 it means you're effectively capturing that entire range making it unusable for any other application which might not be super great for users who run services on their own internal networks.

Its best to be as specific as possible when capturing IPv4 routes.

Secondly, there is no good mechanism to determine what routes would overlap well instead of capturing massive blocks.

Thirdly, you can already do this by creating a road warrior sort of config where you capture all routes 0.0.0.0/0 and then define specific MFA routes later as MFA routes take precedence.

Im going to mark this as not-planned as Its not something I want to add to the project for these reasons.