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

help-circle








  • I’ve worked on both, and as long as I can plug the laptop in a nice monitor, with keyboard and mouse I don’t care that much. Laptops great for mobility, and the keyboard and trackpad, well you get used to it, and doesn’t bother you that much. For myself, its wfh and then going to the office, isn’t a big deal, all stuff is on the laptop and things are synced if I need to do disaster recovery. It depends on the situation, would you benefit from it. if not, desktop’s fine


  • I’d say, what kind of security are you talking about? Apart from standard HTTPS to keep things encrypted, there are other layers if you want to keep your service exposed to the internet.

    Also how things are installed and if they are correct, proper file permissions. nothing different than having it on the server somewhere. You just need to keep thing up to date and you’ll be fine.










  • I’m running both, via docker.

    Here’s the basic setup:

    NGiNX is standard installation, using certbot to manage the SSL certificates for the domains. Setup is via Nginx virtual hosts (servers), separate for Lemmy and Mastodon. Lemmy and Mastodon run each in their Docker containers, with different listning ports on localhost.

                      lemmy.domain.tld+------------------------+
                   +------------------+                        |
                   |                  |         Lemmy          |
                   |                  |         127.0.0.1:3000 |
                   |                  +------------------------+
                   |
    +--------------+----+
    |NGiNX with SSL     |   mastodon.domain.tld
    |and separate VHOSTS+--------------+-----------------------+
    |                   |              |          Mastodon     |
    +-------------------+              |          127.0.0.1:3001
                                       +------------------------
    
    

  • No problem. I’ll just go with a oversimplification.

    The idea is that you just take whatever traffic hits port 443 and use iptables rules to route the traffic elsewhere, or in this case

    Client --> [port 443] --> [iptables] --> [ port 443 home server]

    So, it’s basically just traffic forwarding from the VPS directly to your home server, being directly to your ISP IP address, or via wireguard IP address.

    So all the traffic you are sending back from the VPS is in its original state, and the actual processing happens on your local/home server.

    On the home server you have a Web Server of your choice listening on port 443 with, loaded with your SSL certificates. So, request is made to the VPS IP address, iptables just forward the packets to your home server, and there is where the SSL/TLS termination happens. The client negotiates the TLS connection directly with your home server, and web server on your home server then sends the request where you tell it to ( reverse proxy to a docker container, or it serves the content directly).

    With this, you basically turn the VPS into a passtrough for traffic.

    Here’s a quick test I did… the two servers are connected with Wireguard mesh.

    On the VPS you need have net.ipv4.ip_forward=1 .

    net.ipv4.ip_forward=1
    

    Your iptables rules should be. Obviously on the home server you can run the webserver on any port you like, doesn’t have to be 443. But let’s keep it 443 for the sake of argument.

    iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination HOME_SERVER_IP:443
    iptables -t nat -A POSTROUTING -j MASQUERADE
    

    If you want to drop the rules:

    iptables -t nat -F