4 ms·
It's seriously weird that `Address=10.0.1.2/32` works at all. An Address should have a correct subnet mask (like your IP at home might be 192.168.1.25/24, not 1
by moviuro 7y ago
It's seriously weird that `Address=10.0.1.2/32` works at all. An Address should have a correct subnet mask (like your IP at home might be 192.168.1.25/24, not 192.168.1.25/32).
The documentation is complete, but I think the most important topic is `AllowedIPs`. The rest is pretty standard and unsurprising (if you have any networking knowledge at all). I had written a bit about AllowedIPs when I switched to WG myself: https://try.popho.be/wg.html https://try.popho.be/wg.html , with examples too.
- eptcyka 7y agoYou're specifying subnets that are reachable rather than _specific IPs_.
- alias_neo 7y agoYou're aware that /32 is the correct way of specifying one, single IPv4 address using this notation? There is nothing weird about it at all. If you've used IPv6 you'll see the equivalent /128 for a single address.
- moviuro 7y agoTry setting 192.168.1.25/32 on your eth0 interface, you're in for a bad time.
- alias_neo 7y agoYou're correct, but you're confusing the notation and the implementation. On your (eth0) network interface you're specifying a network that your interface belongs to, its used to determine routing on that interface, if you give it a single /32, there is no "network" for it to route to. WireGuard isn't using the CIDR notation in the address value for routing, it's using allowed-ips.
- Hikikomori 7y ago2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 inet 192.168.101.12/24 brd 192.168.101.255 scope global eth0 valid_lft forever preferred_lft forever inet 192.168.1.25/32 scope global eth0 valid_lft forever preferred_lft forever inet 192.168.1.32/31 scope global eth0 valid_lft forever preferred_lft forever Seems to work fine, added a /31 just for fun.
- moviuro 7y agoif you remove the /24 you'll have a nice surprise
- Hikikomori 7y agoNot really a surprise. The point is that it is a completely valid address to use, and in this case it just defines a range. /32 are commonly used in routers (even servers in some cases) and /31 for linknets.
- nikisweeting 7y agoI just added a section to clarify this common confusion under the CIDR entry in the glossary: https://github.com/pirate/wireguard-docs#CIDR-Notation https://github.com/pirate/wireguard-docs#CIDR-Notation