I'm strongly considering adding another backup location in the form of an old Raspberry Pi and a USB HDD.
I want the Pi to exclusively use the available network to connect to my Wireguard Server, so other devices (local to the Wireguard Server and remote connected to the server) can use it as a secondary backup location.
I'm kind of worried about a scenario, where my network is compromised and, through the VPN connection of the Pi in the external network, the external network is as well.
What are the best practices to secure such a setup?
https://www.msn.com/en-us/news/politics/breaking-donald-trump-runs-for-cover-as-shots-fired-at-pennsylvania-rally/ar-BB1pWbYg
https://www.msn.com/en-us/news/politics/breaking-donald-trump-runs-for-cover-as-shots-fired-at-pennsylvania-rally/ar-BB1pWbYg
https://www.msn.com/en-us/news/politics/breaking-donald-trump-runs-for-cover-as-shots-fired-at-pennsylvania-rally/ar-BB1pWbYg
Currently, I have two VPN clients on most of my devices:
I usually stay connected to the commercial VPN on all my devices, unless I need to access something on that LAN.
This setup has a few drawbacks:
One possible solution for this would be to route all internet traffic through a VPN client on the router in the LAN and figuring out how to still be able to at least have a port open for the VPN docker container allowing access to the LAN. But then the ability to split tunnel around that would be pretty hard to achieve.
I want to be able to connect to a VPN host container on the LAN, which in turn routes all internet traffic through another VPN client container while allowing LAN traffic, but still be able to split tunnel specific applications on my Android/Linux/iOS devices.
Basically this:
+---------------------+ internet traffic +--------------------+
| | remote LAN traffic | |
| Client |------------------->|VPN Host Container |
| (Android/iOS/Linux) | |in remote LAN |
| | | |
+---------------------+ +--------------------+
| | |
| remote LAN traffic| | internet traffic
split tunneled traffic| |-------- |
| | v
v | +---------------------------+
+---------------------+ v | |
| regular LAN or | +-----------+ | VPN Client Container |
| internet connection | |remote LAN | | connects to commercial VPN|
+---------------------+ +-----------+ | |
| |
+---------------------------+
Any recommendations on how to achieve this, especially considering client apps for Android and iOS with the ability to split tunnel per application?
Update:
Got it by following this guide.
Ended up modifying this setup to have better control over potential IP leakage
@elvith@feddit.org und ich haben mehr oder weniger unabhängig zwei Web Apps entwickelt , welche beide bis auf gewisse Extrafeatures den Accountumzug so einfach wie möglich gestalten sollten:
https://stablenarwhal.github.io/Lemmy-Userdata-Migration/
Features:
https://elvith-de.github.io/lemmy-migration/
Features:
@elvith@feddit.org und ich haben mehr oder weniger unabhängig zwei Web Apps entwickelt , welche beide bis auf gewisse Extrafeatures den Accountumzug so einfach wie möglich gestalten sollten:
https://stablenarwhal.github.io/Lemmy-Userdata-Migration/
Features:
https://elvith-de.github.io/lemmy-migration/
Features:
https://stablenarwhal.github.io/Lemmy-Userdata-Migration/
https://stablenarwhal.github.io/Lemmy-Userdata-Migration/
An dieser Stelle reposte ich auch auf der neuen deutschen Main-Instanz zwei einfache Wege, um seinen User (Settings und abonnierte/geblockte Communities) von einer Lemmy Instanz auf eine andere umzuziehen, beispielsweise von feddit.de auf feddit.org, von meinem ursprünglichen Post unter feddit.de/c/main ( https://alexandrite.app/feddit.de/post/11325409)
Update: Ich habe für die erhöhte Userfreundlichkeit noch eine Web Applikation erstellt, welche den Prozess so einfach wie möglich gestalten soll. Zu finden hier:
https://stablenarwhal.github.io/Lemmy-Userdata-Migration/
Features:
Update 2: @elvith@feddit.org hat auch eine Web Applikation mit ähnlicher Funktionalität entwickelt. Zu finden hier:
https://elvith-de.github.io/lemmy-migration/
Features:
Weg 1, falls man noch einen Browser mit aktiver Session auf feddit.de hat:
Lemmy bietet seit Version 0.19 eine Funktion an, um die user data zu ex- und importieren. Das geht normalerweise über einen Button in den Settings des Webinterfaces, das geht aktuell bei feddit.de nicht.
Aber der zugrundeliegende API-Aufruf funktioniert noch, solange man noch mit einem Browser auf feddit.de eingeloggt ist:
Das funktioniert mit jeder Instanz >=0.19, man muss lediglich das "feddit.de" in der URL ersetzen. Und wenn das Webinterface funktioniert, geht das auch über den Export- Button in den Settings.
Weg 2:
Für die Leute, die keine offene Browser Session haben, hier ein kleines, aber funktionales Bash Script, welches im Ausführungsverzeichnis eine myFedditUserData.json
erstellt, welche bei anderen Instanzen importiert werden kann.
Anforderungen:
sudo apt install -y jq
Anleitung:
.sh
Endung abspeichern, z.B. getMyFedditUserData.sh
chmod +x getMyFedditUserData.sh
ausführen (Namen eventuell anpassen)./getMyFedditUserData.sh
im Terminal eingebenmyFedditUserData.json
Anmerkung: Das Script ist recht simpel, es wird ein JWT Bearer Token angefragt und als Header bei dem GET Aufruf von https://feddit.de/api/v3/user/export_settings mitgegeben. Wer kein Linux/Mac OS X zur Verfügung hat, kann den Ablauf mit anderen Mitteln nachstellen.
Das Script:
#!/bin/bash
# Basic login script for Lemmy API
# CHANGE THESE VALUES
my_instance="https://feddit.de" # e.g. https://feddit.nl
my_username="" # e.g. freamon
my_password="" # e.g. hunter2
########################################################
# Lemmy API version
API="api/v3"
########################################################
# Turn off history substitution (avoid errors with ! usage)
set +H
########################################################
# Login
login() {
end_point="user/login"
json_data="{\"username_or_email\":\"$my_username\",\"password\":\"$my_password\"}"
url="$my_instance/$API/$end_point"
curl -H "Content-Type: application/json" -d "$json_data" "$url"
}
# Get userdata as JSON
getUserData() {
end_point="user/export_settings"
url="$my_instance/$API/$end_point"
curl -H "Authorization: Bearer ${JWT}" "$url"
}
JWT=$(login | jq -r '.jwt')
printf 'JWT Token: %s\n' "$JWT"
getUserData | jq > myFedditUserData.json
@elvith@feddit.org hat mein Script auch in PowerShell nachgebaut, welches unter Windows ohne WSL auskommt: https://gist.github.com/elvith-de/89107061661e001df659d7a7d413092b
# CHANGE THESE VALUES
$my_instance="https://feddit.de" # e.g. https://feddit.nl
$target_file = "C:\Temp\export.json"
########################################################
#Ask user for username and password
$credentials = Get-Credential -Message "Logindata for $my_instance" -Title "Login"
$my_username= $credentials.UserName
$my_password= $credentials.GetNetworkCredential().Password
# Lemmy API version
$API="api/v3"
# Login
function Get-AuthToken() {
$end_point="user/login"
$json_data= @{
"username_or_email" = $my_username;
"password" = $my_password
} | ConvertTo-Json
$url="$my_instance/$API/$end_point"
(Invoke-RestMethod -Headers @{"Content-Type" = "application/json"} -Body $json_data -Method Post -Uri $url).JWT
}
# Get userdata as JSON
function Get-UserData() {
$end_point="user/export_settings"
$url="$my_instance/$API/$end_point"
Invoke-RestMethod -Headers @{"Authorization"="Bearer $($JWT)"} -Method Get -Uri $url
}
$JWT= Get-AuthToken
Write-Host "Got JWT Token: $JWT"
Write-Host "Exporting data to $target_file"
Get-UserData | ConvertTo-Json | Out-File -FilePath $target_file
@Emotet
@slrpnk.net