Wireguard over IPv6
from filister@lemmy.world to selfhosted@lemmy.world on 15 Dec 06:20
https://lemmy.world/post/40219685
from filister@lemmy.world to selfhosted@lemmy.world on 15 Dec 06:20
https://lemmy.world/post/40219685
Hi all, I am behind CGNAT, but my ISP router is allocating real IPv6 addresses to my devices that can be exposed. I have a Proxmox and I have installed Wireguard on an LXC container and configured it to listen to the IPv6 address.
I was wondering if I need to do something else to protect my Wireguard installation? I have exposed only the default UDP port to the outside and port scanners are not working on UDP ports as far as I know. Shall I do something else to protect my installation or the attack vector is already minimal and doesn’t require further hardening? What’s your opinion?
threaded - newest
You are pretty much as safe as it gets as long as you update that container. Ip/Port scanning basically isnt a thing in ipv6 land as youd have to scan the entire /64 which amounts to 18,446,744,073,709,551,616 addresses.
Just make sure you’re not using an EUI64 address. That significantly narrows down the number of addresses per subnet to scan. The bots found one of my computers that was using one. It took them 3 years to find it though.
Thanks to both of you, my same thoughts, but I also wanted to hear an outside perspective as I am not so well versed in IPv6. But it sounds reassuring. Shall I also consider exposing some HTTP/S services for media over IPv6 is also relatively safe, as long as I have MFA etc?
@filister You should keep in mind that every "normal" HTTPS certificate is recorded publicly (certificate transparency, see e.g. crt.sh). If you do expose services, you most likely won't get security by obscurity. You might be able to keep your services a bit more hidden when you expose them with IPv6 only, but not when you use a Let's Encrypt certificate with a proper DNS entry.
True, maybe the best way then is to expose them only within your Wireguard network.
Yes, that’s fine as long as whatever you’re hosting is designed to be safely used on the internet. Just keep it up to date and only expose the stuff you need to. I would suggest setting up fail2ban to block IPs that repeatedly fail to log in though. Depending on what you’re hosting, you may need bot protection, but if all they can see is a login page, they shouldn’t be too much of an issue.
Not entirely true! There are ways to scan IPv6 space efficiently without brute force that are in RFCs
As far as I understand, wireguard is designed so that it can’t be portscanned. Replies are never sent to packets unless they pass full auth.
This is both a blessing and a curse. It unfortunately means that if you misconfigure a key then your packets get silently ignored by the other party, no error messages or the likes, it’s as if the other party doesn’t exist.
EDIT: Yep, as per www.wireguard.com/protocol/
After ipsec troubleshooting phase 1 & 2, WG is still a blessing.
You could also secure what peers inside the tunnel can access, particularly if you plan to give other people access. I.e. only allow only port 443 on a given server using a reverse proxy. It’s not a major threat either way but it would reduce the amount of access if someone gets into your phone/laptop etc.
Wireguard has very little attack surface