• 0 Posts
  • 45 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle
  • Docker Swarm encryption doesn’t work for your use case. The documentation says that the secret is stored encrypted but can be decrypted by the swarm manager nodes and nodes running services that use the service, which both apply to your single node. If you’re not having to unlock Docker Compose on startup, that means that the encrypted value and the decryption key live next to each other on the same computer and anyone who has access to the encrypted secrets can also decrypt them.



  • Be careful with doing this. X-Real-IP and X-Forwarded-For are good for when the client is a trusted proxy, but can be easily faked if you don’t whitelist who’s allowed to use those headers. Somebody with IPv6 access could send “X-Real-IP: 127.0.0.1” or something and if the server believes it then you’ll see 127.0.0.1 in logs and depending on what you’re running the user may gain special permissions.

    Also be careful with the opposite problem. If your server doesn’t trust the proxy, it will show the VPS IP in logs, and if you’re running something like fail2ban you’ll end up blocking your VPS and then nobody will be able to connect over IPv4.



  • There’s a lot of wrong advice about this subject on this post. Forgejo, and any other Git forge server, have a completely different security model than regular SSH. All authenticated users run with the same PID and are restricted to accessing Git commands. It uses the secure shell protocol but it is not a shell. The threat model is different. Anybody can sign up for a GitHub or Codeberg account and they will be granted SSH access, but that access only allows them to push and pull Git data according to their account permissions.







  • Don’t laptops with batteries use slightly more energy than equivalent PCs? The battery will drain because it loses charge over time or because the laptop is designed to draw power from the battery during normal operation, and then energy is lost when recharging the battery because battery charging is not 100% efficient.

    I don’t know how searxng works, but if it’s making many requests and aggregating the results, you will probably get much worse performance running it on your phone, even if the phone is with you. Instead of making one request over a bad cell connection, you would be making many requests over a bad cell connection.





  • My favorite is when IT deploys software that replaces all the links in your e-mails with https://example.com/phishing/YiCdMdsY so you can’t tell whether the e-mail is phishing or not, frequently sends you very obvious fake phishing e-mails that interrupt your work by going straight to your priority inbox, and punishes anyone caught clicking on phishing e-mails. Then HR sends out e-mails that have all the indicators of low effort phishing and you’re supposed to click on those.





  • Normally this is bad advice, but if you already have CGNAT you’d be going from double NAT to triple NAT and it probably won’t make anything worse. At least it shouldn’t make things worse for IPv4. If you have 5G internet with CGNAT there’s no excuse for your ISP not giving you proper IPv6. Putting a second router between will complicate your IPv6 setup.

    There are some tricks you can do for IPv4 in the precense of hostile DHCP servers. Serious OSes should allow you to configure a second IP address on the same physical interface, so you could have a dynamic 192.168.0.x assigned by the ISP’s DHCP server and a static 192.168.1.y assigned statically by you, and then you should be able to set up an additional route table entry to access 192.168.1.0/24 using the source address 192.168.1.y. As long as the ethernet/wifi switching between devices doesn’t filter ARP packets based on IP subnet, you should be able to communicate between your machines using fixed IPs on the second subnet.