• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: July 25th, 2023

help-circle

  • I recommend adding hostname: app-name lines for each container then you can just use the hostname and the native port (even if you don’t pass it through with a port: line).

    It’s super useful if you want to expose any apps with a reverse proxy like Caddy. That way the ONLY way to access an apps web interface is via the reverse proxy. Then look at filter rules to deny access unless the client has a LAN IP.

    Poof, you’ve got SSL and custom subdomains for all your apps, but still only on your LAN or personal VPN (like Wireguard or Tailscale).




  • Here’s an example of what I use across multiple networks, with roaming and static devices. They all use a common /24 subnet (that doesn’t overlap with any of the common LAN subnets), and each gets it’s one /32 address in that subnet. That way each one accepts traffic from any other WG clients in the same subnet as local traffic to the host device. Essentially each PC, server, or phone thinks it’s on the same local network as every other WG client.

    [Interface]
    PrivateKey = XXX
    ListenPort = 51820
    Address = 10.172.43.11/24
    ### Every client gets an address in the 10.172.43.x network
    
    [Peer]
    PublicKey = XXXX
    AllowedIPs = 10.172.43.15/32
    ### This device is a roaming phone or laptop, so it will be able to talk to the server when it wants to, but must initiate all traffic.
    
    [Peer]
    PublicKey = XXXX
    AllowedIPs = 10.172.43.11/32, 192.168.1.0/24 
    #### This device is a router which is configured to NAT any traffic from WG to the LAN, so any WG device can talk to the LAN as if it's local 
    
    Endpoint = my.dynamic.dns.addres:51820
    #### Use dynamic dns for any device that has a semi-permanent public IP and hosts ANY amount of content, files, or needs to be accessible to SSH
    

    WireGuard is **WAY ** faster than any other VPN I’ve tested, and much more flexible. But at the cost of a little extra setup.



  • Make sure the Allowed-IPs is as small a subnet as possible. Your device will only route traffic over your VPN that has a destination IP in that subnet.

    That way you’re only tunneling the traffic that needs to go over it. Everything else will go out the normal route.

    Having your device package up and encrypt every packet takes some overhead and will inherently lower your bandwidth throughput, so it’s worth minimizing the number of packets that have to go through that process.