mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/opsec-blogposts.git
synced 2025-07-02 03:56:40 +00:00
vpn selfhosted + vpnqemu changes + vpsvpn routing new tutorials
This commit is contained in:
parent
4ae04fd8dc
commit
24abac7aaf
12 changed files with 118 additions and 23 deletions
BIN
vpnqemu/20.png
Normal file
BIN
vpnqemu/20.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
BIN
vpnqemu/21.png
Normal file
BIN
vpnqemu/21.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 200 KiB |
|
@ -1,14 +1,21 @@
|
|||
---
|
||||
author: nihilist
|
||||
date: 2024-08-08
|
||||
gitea_url: "http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions/issues/94"
|
||||
author: Anonymous
|
||||
date: 2025-01-31
|
||||
gitea_url: "http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions/issues/260"
|
||||
xmr: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8
|
||||
---
|
||||
# Route QEMU VMs through a Host OS VPN
|
||||
|
||||

|
||||
# Prevent IP leaks using a VPN on the Clientside Host OS
|
||||
|
||||
## **Initial Setup**
|
||||
When you are using your laptop and segmenting your internet uses with VMs, you need to take into account that the services that you are running inside your VMs may try to connect to external services:
|
||||
|
||||

|
||||
|
||||
## **Targeted Setup**
|
||||
|
||||
What we need here is a VPN on the Host OS level, that way every connection that any of the VMs try to make will be routed through the VPN, to prevent direct IP connection leaks from being percieved by the ISP and the external websites.
|
||||
|
||||

|
||||
|
||||
First, install the VPN like we saw previously [here](../vpn/index.md), but the only difference being that we now install it on the Host OS, rather than inside the VM.
|
||||
|
||||
|
@ -24,34 +31,37 @@ First, install the VPN like we saw previously [here](../vpn/index.md), but the o
|
|||
# Install the package
|
||||
sudo apt update
|
||||
sudo apt install mullvad-vpn
|
||||
|
||||
|
||||
# Connect to Mullvad VPN
|
||||
mullvad account login
|
||||
Enter an account number: 91320912809328832
|
||||
Mullvad account "91320912809328832" set
|
||||
|
||||
|
||||
Then, configure mullvad as follows to prevent IP leaks from happening:
|
||||
|
||||
# Connect to the VPN:
|
||||
mullvad lockdown-mode set on
|
||||
mullvad connect
|
||||
|
||||
curl ifconfig.me
|
||||
194.127.199.92
|
||||
|
||||
|
||||
curl icanhazip.com -4
|
||||
91.90.40.158
|
||||
|
||||
|
||||
Then, configure mullvad as follows:
|
||||
From there you can check from the host OS that you have access to the internet via the VPN:
|
||||
|
||||
  
|
||||

|
||||
|
||||
From there you can check from the host OS that you have a access to the internet via the VPN:
|
||||
Here as you can see there are no ip leaks from the Host OS anymore, but as you're going to see, it is also the case from the VM aswell:
|
||||
|
||||

|
||||

|
||||
|
||||
From there, you need to make sure that your VM has it's network interface set as "NAT" as it is by default (be aware that if the VM network interface is configured as macvtap or bridge, the traffic won't go through the VPN!):
|
||||
|
||||

|
||||
From there, you need to make sure that your private VM has it's network interface set as "NAT" as it is by default (be aware that if the VM network interface is configured as macvtap or bridge, the traffic won't go through the host OS VPN!):
|
||||
|
||||

|
||||
|
||||
And then once applied, you can check if it works as intended from inside the VM (all that's required is for the VM to have a NAT connection), by going to <https://mullvad.net/en/check> from inside the VM:
|
||||
|
||||

|
||||

|
||||
|
||||
And here as you can see, there are no IP leaks either from the guest OS ! That concludes our tutorial.
|
Loading…
Add table
Add a link
Reference in a new issue